swe-programming-elixirlisted
Install: claude install-skill wahidyankf/ose-primer
# Elixir Stack Coding Standards
## Purpose
Progressive disclosure of Elixir stack coding standards for agents writing Elixir code.
**Coverage**: Elixir language → Phoenix Framework → Phoenix LiveView (full technology stack)
**Usage**: Auto-loaded for agents when writing any Elixir/Phoenix code. Provides quick reference to idioms, best practices, and antipatterns across the full stack.
---
## Elixir Language Standards
**Authoritative Source**: [docs/explanation/software-engineering/programming-languages/elixir/README.md](../../../docs/explanation/software-engineering/programming-languages/elixir/README.md)
### Naming Conventions
**Modules**: PascalCase
- `UserAccount`, `PaymentProcessor`
**Functions and Variables**: snake_case
- Functions: `calculate_total/1`, `find_user_by_id/1`
- Variables: `user_name`, `total_amount`
**Atoms**: lowercase with underscores
- `:ok`, `:error`, `:not_found`
**Private Functions**: Prefix with `def` (not `defp` for documentation)
- Use `@doc false` for private but need to document
### Modern Elixir Features (1.14+)
**Pattern Matching**: Use extensively
```elixir
case result do
{:ok, value} -> process_value(value)
{:error, reason} -> handle_error(reason)
_ -> :unknown
end
```
**Pipe Operator**: Chain transformations
```elixir
data
|> parse()
|> validate()
|> process()
|> format()
```
**With Statement**: Handle multiple operations
```elixir
with {:ok, user} <- find_user(id),
{:ok, account} <- find_account(user.accou