staff-level-elixir

v2026.09.24

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.

GitHub
安装命令
npx skhub add pproenca/staff-level-elixir
Markdown
SKILL.md

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

#CategoryPrefixCovers
1Process & OTP Designotp-Whether a problem needs a process, and which one; supervision
2Error Handling & Let-It-Crasherr-Signalling failure; when to raise, rescue, or crash
3Idioms & Design Choicesdata-Pattern matching, Stream/Enum, iolists, pipes, macros
4Concurrency & the Schedulerconc-Bounded/isolated parallelism; atom-table safety
5Ecto & Data Accessecto-N+1, atomic writes, constraint races, large sets
6Phoenix & LiveViewphx-Context boundaries, socket memory, mount lifecycle

Quick Reference

1. Process & OTP Design

2. Error Handling & Let-It-Crash

3. Idioms & Design Choices

4. Concurrency & the Scheduler

5. Ecto & Data Access

6. Phoenix & LiveView

How to Use

Read a reference file when its decision comes up. Each rule names the wrong default it corrects, then shows the canonical way (with an incorrect/correct contrast only where the wrong way is a real trap).

Reference Files

FileDescription
references/_sections.mdCategory definitions and ordering
assets/templates/_template.mdTemplate for new rules
metadata.jsonVersion and source references
发现
标签

此技能尚未发布标签。

版本
最新版本元数据

版本

v2026.09.24

发布时间

2026年9月24日

分类

未分类

许可证

MIT

源路径

skills/.experimental/staff-level-elixir

默认分支

master

最新提交

cf93c57

Tree SHA

afbb575