Skills may execute instructions and code that could affect your environment. Marketplace scans reduce risk but do not guarantee safety. Always review files, run your own security checks, and use at your own risk.
Elixir Expert
Security Scan Summary
Status: Safe
Source: Syntic Skills registry
Automated security scan completed with no high-risk patterns detected. Manual review is still required.
About This Skill
Use when building fault-tolerant, concurrent applications with Elixir, Phoenix, OTP supervision trees, LiveView, and BEAM.
Downloadable SKILL.md
Download SKILL.md and place it in your Syntic skills folder. For Syntic Code, install in your local skills directory, review contents, and run in a controlled environment first. Acknowledge the risk notice above to enable the download.
---
name: Elixir Expert
description: Use when building fault-tolerant, concurrent applications with Elixir, Phoenix, OTP supervision trees, LiveView, and BEAM.
category: Languages
version: 1.0.0
tools: []
---
# Elixir and BEAM Development
Build fault-tolerant, concurrent applications using OTP, Phoenix, and the BEAM virtual machine.
## Core Principles
- **Let it crash.** Design supervision trees so individual process failures are isolated and automatically recovered.
- **Immutability enforced.** All data is immutable. Transformations create new data. State lives in processes.
- **Pattern matching** as primary control flow. Use in function heads, case expressions, and with clauses.
- **BEAM is your OS.** Use OTP GenServer, Supervisor, Registry instead of external tools for state and coordination.
## OTP Patterns
- **GenServer** for stateful processes: caches, rate limiters, connection pools.
- **Supervisor** with restart strategies: `:one_for_one` (independent children), `:one_for_all` (coordinated restart).
- **DynamicSupervisor** for on-demand processes: per-user sessions, per-room chat servers.
- **Registry** for process lookup by name. Avoid global names in distributed systems.
- **Task** and **Task.Supervisor** for fire-and-forget async work. Use `Task.async/await` for parallel computations.
## Phoenix Framework
- Phoenix 1.7+ with verified routes: `~p"/users/#{user}"` for compile-time route checking.
- **Contexts** (bounded contexts) organize business logic: `Accounts`, `Orders`, `Catalog`.
- Keep controllers thin. Controllers call context functions and render. Business logic in models/services.
- **Changesets** for data validation: `cast`, `validate_required`, `validate_format`, `unique_constraint`.
- **Ecto.Multi** for multi-step database transactions with named operations and rollback.
## Phoenix LiveView
- Maintains WebSocket connection, sends minimal diffs to client for real-time UI.
- `assign` and `assign_async` for state management. `stream` for large lists with efficient DOM patching.
- Implement `handle_event` (user interactions), `handle_info` (PubSub messages), `handle_async` (background tasks).
- Use `live_component` for reusable, stateful UI components with own event handling.
- Use `phx-debounce` and `phx-throttle` on form inputs to reduce server round-trips.
## Ecto and Data
- Schemas with explicit types. Use `embedded_schema` for non-database data structures.
- Use `Repo.preload` or `from(u in User, preload: [:posts])` to avoid N+1 queries.
- Database-level constraints (`unique_constraint`, `foreign_key_constraint`) and handle in changesets.
- `Repo.stream` with `Repo.transaction` for large datasets without loading all records.
## Distributed Systems
- **Phoenix.PubSub** for in-cluster message broadcasting. Works across nodes automatically.
- **libcluster** for automatic node discovery (Kubernetes, DNS, gossip strategies).
- **Horde** for distributed process registries and supervisors across nodes.
- Use `:rpc.call` sparingly. Prefer message passing via PubSub.
## Testing
- ExUnit with `async: true` for tests without shared state. BEAM handles true parallel test execution.
- `Ecto.Adapters.SQL.Sandbox` for concurrent database tests with automatic cleanup.
- **Mox** for behavior-based mocking. Define behaviors (callbacks) for external services.
- `Phoenix.LiveViewTest` with `live/2` and `render_click/2` for LiveView tests.
- **StreamData** for property-based testing on functions with wide input domains.
Bundle Download
Includes SKILL.md and bundled support files where provided. Risk acknowledgement is required.
Install Targets
Syntic App
- 1. Create a dedicated folder for this skill in your local skills library.
- 2. Place SKILL.md into that folder.
- 3. Restart Syntic and invoke this skill on matching tasks.
Syntic Code (CLI)
- 1. Save SKILL.md in your local Syntic Code skills directory.
- 2. Keep related files in the same skill folder.
- 3. Run in a safe environment and validate outputs.
Source
https://github.com/rohitg00/awesome-claude-code-toolkit/blob/main/agents/language-experts/elixir-expert.md
Open Source LinkRelated Skills
Angular Architect
Use when building enterprise applications with Angular 17+, signals, standalone components, RxJS, and NgRx...
LanguagesClojure Developer
Use when building data-oriented systems with Clojure, REPL-driven development, persistent data structures...
LanguagesCsharp Developer
Use when building applications on .NET 8+ with ASP.NET Core, Entity Framework Core, minimal APIs, and async...
LanguagesDjango Developer
Use when building applications with Django 5+ and Django REST Framework, including ORM optimization...