elixir-code-review — скилл для Claude Code
Скилл elixir-code-review проверяет код на Elixir по правилам OTP, безопасности и стиля. Помогает при разборе файлов .ex и .exs.
Apache-2.0 124 установок ★ 89 обновлён 2026-09-15
npx skills add existential-birds/beagle --skill elixir-code-review -a claude-codeЧто делает elixir-code-review
Скилл задаёт строгий чеклист для инспекции кода на Elixir. Он оценивает оформление пайплайнов, сопоставление с образцом во фрагментах with и заголовках функций, а также структуру процессов OTP. Например, агент проверяет перенос тяжелой инициализации в handle_continue и следит, чтобы в коллбэках GenServer не оставалось блокирующих вызовов.
В правилах прописан фильтр ложных срабатываний: пустые функции-гарды, единичные |> или отсутствие @spec у приватных функций ошибками не считаются. Для уязвимостей настроен запрет на вызовы String.to_atom/1 и Code.eval_string/1 поверх внешних данных.
Каждое замечание требует точной привязки к path:line и подтверждения найденными артефактами. Без протокола проверки замечания публиковать запрещено.
Какие задачи решает
- найти уязвимости с атомами и небезопасной десериализацией в Elixir
- проверить реализацию GenServer и Supervisor на блокирующие вызовы
- выявить отсутствие спецификаций @spec и документации @doc у публичных функций
- убрать лишние условия в пользу сопоставления с образцом и гардов
Примеры запросов агенту
- Проверь модуль
lib/app/worker.exс помощью скилла elixir-code-review - Сделай ревью изменений в
lib/auth.ex, проверь безопасность сопоставления с образцом - Оцени код
lib/cache/server.exпо чек-листу OTP и GenServer
Как установить elixir-code-review
1Через Skills CLI (Vercel)
npx skills add existential-birds/beagle --skill elixir-code-review -a claude-code2Вручную: положить файлы
~/.claude/skills/elixir-code-review/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/elixir-code-review/
1Через Skills CLI (Vercel)
npx skills add existential-birds/beagle --skill elixir-code-review -a codex2Вручную: положить файлы
.agents/skills/elixir-code-review/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add existential-birds/beagle --skill elixir-code-review -a cursor2Вручную: положить файлы
.cursor/skills/elixir-code-review/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install existential-birds/beagle plugins/beagle-elixir/skills/elixir-code-review2Вручную: положить файлы
.github/skills/elixir-code-review/SKILL.md1Через Skills CLI (Vercel)
npx skills add existential-birds/beagle --skill elixir-code-review -a gemini-cli2Командой платформы
gemini skills install https://github.com/existential-birds/beagle --path plugins/beagle-elixir/skills/elixir-code-reviewВручную: положить файлы
.devin/skills/elixir-code-review/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add existential-birds/beagle --skill elixir-code-review -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы об elixir-code-review
Как установить elixir-code-review в Claude Code?
Выполните команду npx skills add existential-birds/beagle --skill elixir-code-review -a claude-code. Файл настроек сохранится по пути ~/.claude/skills/elixir-code-review/SKILL.md.
Что делает скилл elixir-code-review?
Он предоставляет агенту чеклист для проверки Elixir-кода, охватывающий стиль, сопоставление с образцом, базовые принципы OTP, наличие документации и безопасность.
Какие шаблоны кода скилл считает допустимыми?
Он запрещает ругать пустые клозы функций для паттерн-матчинга, одиночные пайплайны |>, @doc false для реализаций коллбэков и отсутствие @spec у приватных функций.
Исходный текст
SKILL.md · Apache-2.0
--- name: elixir-code-review description: Reviews Elixir code for idiomatic patterns, OTP basics, and documentation. Use when reviewing .ex/.exs files, checking pattern matching, GenServer usage, or module documentation. --- # Elixir Code Review ## Quick Reference | Issue Type | Reference | |------------|-----------| | Naming, formatting, module structure | [references/code-style.md](references/code-style.md) | | With clauses, guards, destructuring | [references/pattern-matching.md](references/pattern-matching.md) | | GenServer, Supervisor, Application | [references/otp-basics.md](references/otp-basics.md) | | @moduledoc, @doc, @spec, doctests | [references/documentation.md](references/documentation.md) | ## Review Checklist ### Code Style - [ ] Module names are CamelCase, function names are snake_case - [ ] Pipe chains start with raw data, not function calls - [ ] Private functions grouped after public functions - [ ] No unnecessary parentheses in function calls without arguments ### Pattern Matching - [ ] Functions use pattern matching over conditionals where appropriate - [ ] With clauses have else handling for error cases - [ ] Guards used instead of runtime checks where possible - [ ] Destructuring used in function heads, not body ### OTP Basics - [ ] GenServers use handle_continue for expensive init work - [ ] Supervisors use appropriate restart strategies - [ ] No blocking calls in GenServer callbacks - [ ] Proper use of call vs cast (sync vs async) ### Documentation - [ ] All public functions have @doc and @spec - [ ] Modules have @moduledoc describing purpose - [ ] Doctests for pure functions where appropriate - [ ] No @doc false on genuinely public functions ### Security - [ ] No `String.to_atom/1` on user input (use `to_existing_atom/1`) - [ ] No `Code.eval_string/1` on untrusted input - [ ] No `:erlang.binary_to_term/1` without `:safe` option ## Valid Patterns (Do NOT Flag) - **Empty function clause for pattern match** - `def foo(nil), do: nil` is valid guard - **Using `|>` with single transformation** - Readability choice, not wrong - **`@doc false` on callback implementations** - Callbacks documented at behaviour level - **Private functions without @spec** - @spec optional for internals - **Using `Kernel.apply/3`** - Valid for dynamic dispatch with known module/function ## Context-Sensitive Rules | Issue | Flag ONLY IF | |-------|--------------| | Missing @spec | Function is public AND exported | | Generic rescue | Specific exception types available | | Nested case/cond | More than 2 levels deep | ## When to Load References - Reviewing module/function naming → code-style.md - Reviewing with/case/cond statements → pattern-matching.md - Reviewing GenServer/Supervisor code → otp-basics.md - Reviewing @doc/@moduledoc → documentation.md ## Gates — before reporting Do these **in order** for the review batch. Do not publish findings until each step passes. 1. **Protocol loaded** — Read [review-verification-protocol](../review-verification-protocol/SKILL.md) and apply its checks for each finding category you use (unused, validation, security, performance, etc.). **Pass:** For every substantive finding, you can name which protocol subsection you satisfied or state **N/A** with reason (pure style). 2. **Anchored evidence** — **Pass:** Each finding includes a concrete locator: `path:line` (or line range), or `Module.function/arity` plus a short quoted snippet from the file. 3. **Claims backed by artifacts** — For assertions like unused code, missing validation, or security risk, **Pass:** You attach the supporting artifact (e.g. search results, file read scope) or downgrade the item to an explicit **question** / **uncertain** with what you did not verify. ## Before Submitting Findings Complete **Gates — before reporting** (section above) first; the verification protocol is mandatory input to those gates.
© existential-birds · Apache-2.0 · existential-birds/beagle