Skip to main content
skill CX Codex

elixir-code-review — Claude Code skill: what it does, how to install

elixir-code-review reviews Elixir files for OTP conventions, security caveats, and idiomatic style across .ex and .exs code.

Apache-2.0 124 installs ★ 89 updated 2026-09-15

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add existential-birds/beagle --skill elixir-code-review -a claude-code
Open on GitHub

What elixir-code-review does

This skill supplies an inspection checklist tailored for Elixir codebases. It monitors function head destructuring, guard clauses, and error branches inside with statements. In concurrent code, it verifies that expensive initialization in GenServer offloads into handle_continue and flags synchronous calls where asynchronous casts belong.

Several accepted Elixir idioms are explicitly excluded from reporting. Single transformations via |> or missing @spec attributes on internal functions do not trigger alerts. The rules also spot risky functions like String.to_atom/1 and unvetted Code.eval_string/1 execution on outside payloads.

Every reported issue demands concrete anchors such as path:line identifiers. Substantive claims must include file search evidence before submitting findings.

What it helps with

  • detect atom table exhaustion and unsanitized evaluation risks
  • verify GenServer callbacks against blocking operations
  • spot missing @moduledoc and @spec declarations on public functions
  • refactor nested conditional branching into pattern matches

Example prompts for the agent

  • Review lib/account/supervisor.ex using the elixir-code-review checklist
  • Check lib/parser.ex for pattern matching, guard usage, and doc coverage
  • Inspect lib/server.ex for blocking calls in GenServer handlers

How to install elixir-code-review

1Skills CLI (Vercel)

npx skills add existential-birds/beagle --skill elixir-code-review -a claude-code

2Manually: put the files in place

~/.claude/skills/elixir-code-review/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/elixir-code-review/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about elixir-code-review

How to install elixir-code-review in Claude Code?

Run npx skills add existential-birds/beagle --skill elixir-code-review -a claude-code. The skill file lands in ~/.claude/skills/elixir-code-review/SKILL.md.

What does elixir-code-review do?

It equips the coding agent with guidelines to evaluate Elixir syntax, OTP lifecycle handling, doc coverage, and risky functions.

Which patterns does this skill deliberately ignore?

It preserves single-step pipe chains, empty function clauses used as guards, @doc false on behaviour callbacks, and private functions lacking type specs.

Source text

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

Similar skills

All skills for Code review and refactoring →

From the same set68

The whole set →
healthkit-code-review healthkit-code-review walks HealthKit code through a fixed sequence: authorization, queries, observers, background delivery. Handy when you are the one reviewing health data work. CX Codex +1 134installs cloudkit-code-review cloudkit-code-review audits CloudKit code for custom zones, batching, error backoff, and asset size limits. CX Codex +1 127installs prometheus-go-code-review The prometheus-go-code-review skill reviews Prometheus instrumentation in Go, covering metric types, labels, naming, and registration. Use it when checking prometheus/client_golang code. CX Codex +1 126installs review-skill-improver review-skill-improver reviews code-review feedback logs, spots recurring rejection patterns, and proposes changes to review skills. Use it after feedback has accumulated and you want to refine review rules. CX Codex +1 125installs app-intents-code-review app-intents-code-review reviews Swift App Intents code for intent structure, shortcuts phrases, entity queries, and iOS deployment quirks. CX Codex +1 124installs review-feedback-schema review-feedback-schema — a skill for recording code review outcomes in CSV and checking the evidence behind each verdict. Use it when review decisions need a history. CX Codex +1 124installs combine-code-review combine-code-review is a Claude Code skill that checks Combine code for subscription, operator, memory, and error-handling issues during Swift code review. CX Codex +1 123installs receive-feedback receive-feedback takes review comments from another model, a human or a CI tool and checks each one against the real code before anything is edited. CX Codex +1 123installs

Project sponsors

Companies that keep this analytics open