elixir-patterns
Elixir Patterns and Conventions
Pattern Matching
Pattern matching is the primary control flow mechanism in Elixir. Prefer it over conditional statements.
Prefer Pattern Matching Over if/else
Bad:
def process(result) do
if result.status == :ok do
result.data
else
nil
end
end
More from j-morgan6/elixir-claude-optimization
phoenix-uploads
MANDATORY for file upload features. Invoke before implementing upload or file serving functionality.
14elixir-essentials
MANDATORY for ALL Elixir code changes. Invoke before writing any .ex or .exs file.
14phoenix-liveview-essentials
MANDATORY for ALL LiveView work. Invoke before writing LiveView modules or .heex templates.
10phoenix-liveview
INVOKE BEFORE implementing any LiveView feature. REQUIRED for mount, handle_event, handle_info callbacks, file uploads, navigation, PubSub, streams, and LiveView testing. Essential for all LiveView development.
7testing-essentials
MANDATORY for ALL test files. Invoke before writing any _test.exs file.
6ecto-essentials
MANDATORY for ALL database work. Invoke before modifying schemas, queries, or migrations.
5