Agent skill · Testing & QA

testing

Write or repair Elixir tests with ExUnit, sandbox isolation, async reliability, Mox, ExMachina, and LiveViewTest. Use for test files, test setup, or failing/flaky tests. NOT for investigating an application bug outside the test suite.

oliver-kriskagithub.com/oliver-kriskaGitHub ↗
claude-codeMIT
Install
npx skills add oliver-kriska/claude-elixir-phoenix --skill testing --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 5
SKILL.md size: 3 KB
Bundled scripts: none
Path: plugins/elixir-phoenix/skills/testing/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 515
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Elixir Testing Reference > **Ash projects**: Use `DataCase` with `Ash.Test` helpers; test actions via domain code interfaces, not direct `Repo` calls. See `ash-framework` skill. Quick reference for Elixir testing patterns. ## Iron Laws — Never Violate These 1. **ASYNC BY DEFAULT** — Use `async: true` unless tests modify global state 2. **SANDBOX ISOLATION** — All database tests use Ecto.Adapters.SQL.Sandbox 3. **MOCK ONLY AT BOUNDARIES** — Never mock database, internal modules, or stdlib 4. **BEHAVIOURS AS CONTRACTS** — All mocks must implement a defined `@callback` behaviour 5. **BUILD BY DEFAULT** — Use `build/2` in factories; `insert/2` only when DB needed 6. **NO PROCESS.SLEEP** — Use `assert_receive` with timeout for async operations 7. **VERIFY_ON_EXIT!** — Always call in Mox tests setup 8. **FACTORIES MATCH SCHEMA REQUIRED FIELDS** — Factory definitions must include all fields that have `validate_required` in the schema changeset. Missing fields cause cascading test failures ## Quick Decisions ### Which Test Case? | Testing | Use | |---------|-----| | Controller/API | `use MyAppWeb.ConnCase` | | Context/Schema | `use MyApp.DataCase` | | LiveView | `use MyAppWeb.ConnCase` +

What's inside
Steps it walks through
  1. Iron Laws — Never Violate These
  2. Quick Decisions
  3. Which Test Case?
  4. When to use async: true?
  5. Mock or not?
  6. build() or insert()?
  7. Quick Patterns
  8. Common Anti-patterns
  9. References
Ships with 4 files
  • references/exunit-patterns.md
  • references/factory-patterns.md
  • references/liveview-testing.md
  • references/mox-patterns.md
More from claude-elixir-phoenix
All skills →
About this skill
What does the testing skill do?

Write or repair Elixir tests with ExUnit, sandbox isolation, async reliability, Mox, ExMachina, and LiveViewTest. Use for test files, test setup, or failing/flaky tests. NOT for investigating an application bug outside the test suite.

How do I install it?

Run `npx skills add oliver-kriska/claude-elixir-phoenix --skill testing --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From oliver-kriska/claude-elixir-phoenix, a repository with 515 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going