exunit-code-review

exunit-code-review is a skill for Claude Code from existential-birds/beagle. It costs 38 tokens per session (804 once invoked), scanned A, original, Apache-2.0.

A review guide for ExUnit tests, the testing framework commonly used in Elixir. It covers test structure, Mox-based mocks for external services, and test adapters for tools such as email and job queues.

In plain words
What is it for?
Use it when reviewing Elixir test files or test configuration, especially tests using Mox, HTTP clients, email, background jobs, or database sandboxes.
Why use it?
It helps distinguish external dependencies that should be replaced in tests from internal code that should be tested directly. It also checks setup, asynchronous tests, expectations, and integration-test boundaries.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the beagle-elixir plugin — 10 skills shipped together

Good fit Use it when reviewing Elixir test files or test configuration, especially tests using Mox, HTTP clients, email, background jobs, or database sandboxes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/existential-birds/beagle/exunit-code-review
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add existential-birds/beagle --skill exunit-code-review
Clone the repo
git clone --depth 1 https://github.com/existential-birds/beagle

Made for: Claude Code.

Or install beagle-elixir, the plugin that ships this one along with the rest of its 10 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for exunit-code-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/existential-birds/beagle/exunit-code-review/github.svg)](https://agentmods.dev/skills/existential-birds/beagle/exunit-code-review)
Your own site
<a href="https://agentmods.dev/skills/existential-birds/beagle/exunit-code-review"><img src="https://agentmods.dev/badge/skills/existential-birds/beagle/exunit-code-review/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for exunit-code-review

Your own site · 80×15
<a href="https://agentmods.dev/skills/existential-birds/beagle/exunit-code-review"><img src="https://agentmods.dev/badge/skills/existential-birds/beagle/exunit-code-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 804 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00038 $0.00804
Opus 5.5 $0.00015 $0.00322
Sonnet 5.5 $0.00008 $0.00161
Haiku 4.5 $0.00004 $0.00080

Measured 1mo ago against content hash ba48590c718b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

exunit-code-review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/beagle-elixir/skills/exunit-code-review/SKILL.md · 84 lines

How it starts

The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ExUnit Code Review

Quick Reference

Issue Type Reference
Async tests, setup, describe, tags references/exunit-patterns.md
Behavior-based mocking, expectations references/mox-boundaries.md
Bypass, Swoosh, Oban testing references/test-adapters.md
What to mock vs real, Ecto sandbox references/integration-tests.md

Mock Boundary Philosophy

Mock at external boundaries:

  • HTTP clients, external APIs, third-party services
  • Slow resources: file system, email, job queues
  • Non-deterministic: DateTime.utc_now(), :rand

DO NOT mock internal code:

  • Contexts, schemas, GenServers
  • Internal modules, PubSub
  • Anything you wrote

Review Checklist

Test Structure

  • Tests are async: true unless sharing database state
  • Describe-blocks group related tests
  • Setup extracts common test data
  • Tests have clear arrange/act/assert structure

Mocking

  • Mox used for external boundaries (HTTP, APIs)
  • Behaviors defined for mockable interfaces
  • No mocking of internal modules
  • verify_on_exit! in setup for strict mocking

Test Adapters

  • Bypass for HTTP endpoint mocking
  • Swoosh.TestAdapter for email testing
  • Oban.Testing for background job assertions

Database

  • Ecto.Adapters.SQL.Sandbox for isolation
  • Async tests don't share database state
  • Fixtures/factories used consistently

Valid Patterns (Do NOT Flag)

  • Mock in unit test, real in integration - Different test levels have different needs
  • Not mocking database in integration tests - Database is internal
  • Simple inline test data - Not everything needs factories
  • Testing private functions via public API - Correct approach

Context-Sensitive Rules

Issue Flag ONLY IF
Not async Test actually needs shared state
Missing mock External call exists AND no mock/bypass
Mock internal Module being mocked is internal code

Read the full file on GitHub · 84 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 84 lines · 38 tokens per session scan A ba48590c718b

Subscribe to this mod's changes

exunit-code-review is a skill published in the GitHub repository existential-birds/beagle (82 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 38 tokens to every session and 804 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-16.

Related

Other skills, from other repositories