staff-level-elixir
БесплатноБез исполняемых скриптовНе проверенUse this skill when writing, reviewing, or refactoring Elixir, OTP, Ecto, or Phoenix/LiveView code. It corrects the staff-level judgment calls a capable model…
от pproenca★ 231 звезда на GitHubОб этом скилле
Staff-Level Elixir
Distilled staff-level judgment for Elixir on the BEAM — the design decisions Elixir, OTP, Ecto, and Phoenix force, and how an experienced engineer settles them, written so an agent applies them while writing or reviewing code. Each rule corrects a specific wrong default; there is no rule for things the model already gets right (syntax, basic idioms, the standard library).
When to Apply
- Writing or reviewing OTP code — deciding whether something needs a process, and which (GenServer, Task, Agent, ETS, supervisor)
- Handling failure — choosing between tagged tuples, exceptions,
with, and letting a process crash - Writing Ecto — queries, associations, transactions, changesets, large result sets
- Building Phoenix controllers and LiveViews — context boundaries, socket state, mount lifecycle
- Running concurrent work — parallel fan-out, fire-and-forget tasks, handling untrusted input
- Any request to make Elixir code more idiomatic, more fault-tolerant, or "staff-level"
Rule Categories
| # | Category | Prefix | Covers |
|---|---|---|---|
| 1 | Process & OTP Design | otp- |
Whether a problem needs a process, and which one; supervision |
| 2 | Error Handling & Let-It-Crash | err- |
Signalling failure; when to raise, rescue, or crash |
| 3 | Idioms & Design Choices | data- |
Pattern matching, Stream/Enum, iolists, pipes, macros |
| 4 | Concurrency & the Scheduler | conc- |
Bounded/isolated parallelism; atom-table safety |
| 5 | Ecto & Data Access | ecto- |
N+1, atomic writes, constraint races, large sets |
| 6 | Phoenix & LiveView | phx- |
Context boundaries, socket memory, mount lifecycle |
Quick Reference
1. Process & OTP Design
otp-genserver-not-default— a GenServer is a serialization point, not the default abstractionotp-ets-for-shared-reads— read-heavy shared state belongs in ETS, not behind a GenServer.getotp-supervise-over-manual-restart— child specs + DynamicSupervisor/Registry, not hand-rolled restart logicotp-handle-continue-init— defer heavy startup tohandle_continue;init/1blocks the supervisor
2. Error Handling & Let-It-Crash
err-tagged-tuples-vs-raise—{:ok/:error}for expected failures, raise only for invariant violationserr-let-it-crash— don't rescue to mask bugs; let the supervisor restart clean stateerr-with-happy-path— chain fallible steps withwith; keep the error term intact
3. Idioms & Design Choices
data-pattern-match-over-conditionals— function clauses + guards over if/cond on argument shapedata-stream-vs-enum— Stream for large/lazy/early-exit, Enum for small concrete listsdata-iolists-over-concat— build large output as iolists;<>in a loop is O(n²)data-pipe-idioms— pipe a data subject through transformations, not to save a variabledata-functions-over-macros— solve it with a function before reaching for a macro
4. Concurrency & the Scheduler
conc-async-stream-bounded—Task.async_streamwithmax_concurrency+ explicittimeoutconc-task-supervised-nolink— supervised, unlinked Task for fire-and-forget workconc-atom-exhaustion— never build atoms from external input; useto_existing_atom
5. Ecto & Data Access
ecto-preload-n-plus-one— preload up front, never inside an Enum loopecto-multi-for-transactions—Ecto.Multifor atomic multi-step writes with failure attributionecto-db-constraints-over-validation— DB constraint +unique_constraint, not a racy validation queryecto-stream-large-sets—Repo.stream/batch large sets;Repo.allOOMs at scaleecto-atomic-counters—update_allwithinc:for counters; read-modify-write loses updates
6. Phoenix & LiveView
phx-context-boundary— web layer calls contexts, never Repo or schemas directlyphx-liveview-streams— streams for large/growing collections, not full lists in assignsphx-mount-twice-connected— gate side effects onconnected?/1; mount runs twic
Установить staff-level-elixir в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл staff-level-elixir?
Use this skill when writing, reviewing, or refactoring Elixir, OTP, Ecto, or Phoenix/LiveView code. It corrects the staff-level judgment calls a capable model gets wrong by default — reaching for a GenServer as the universal tool, rescuing instead of letting processes crash, N+1 Ecto access, non-atomic writes, unbounded/linked Task fan-out, atom exhaustion from user input, eager Enum where Stream fits, and calling Repo from the web layer. Applies whenever the work touches process design, error handling, concurrency, data access, or LiveView, even if the user doesn't name them.
Как установить скилл staff-level-elixir?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл staff-level-elixir запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic