ava-expert — Claude Code subagent: what it does, how to install
ava-expert — a Claude subagent that takes over Ava test work: CLI flags, async cases, failing runs. Useful when the project's suite already runs on Ava.
MIT ★ 1,029 updated 2025-10-15
.claude/agents/ava-expert.mdWhat ava-expert does
The subagent handles the Ava side of a test suite: which CLI options to pass, how hooks are arranged, why an async case hangs, what a failure actually says. It works from a fixed checklist — setup and teardown at the top of each file, one behaviour per test, no shared state between cases.
There is no script inside, only written guidance: sections on focus areas, approach and a quality checklist steer the edits. The expected result is documented test files plus error output that names the cause, and a note on where the run is slow. Coverage is expected to clear 85%.
Ava is the whole point. On another runner the advice will not line up, because the agent reasons about Ava's hooks, its assertion output and its concurrent execution.
What it helps with
- find out why an Ava test fails only in CI
- rewrite async cases so they stop leaking state
- move shared setup into
beforeandafterhooks - cut suite runtime with concurrent execution
- make failure messages point at the cause
Example prompts for the agent
- Go through the Ava tests in
test/and flag any that share state. - Explain the failure in
test/api.test.jsand patch it. - Move the repeated setup into hooks and drop the duplication across files.
How to install ava-expert
Manually: put the files in place
.claude/agents/ava-expert.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/ava-expert.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/ava-expert.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about ava-expert
How do I install ava-expert in Claude Code?
Create .claude/agents/ava-expert.md in your project — that folder is where Claude looks for subagents.
What does ava-expert do?
It helps run an Ava suite: picking CLI options, working through async cases and failures, keeping test files structured, watching how long the run takes.
Does it work with runners other than Ava?
It is built around Ava — its hooks, assertion output and concurrent runs — so advice for a different runner won't match.
Source text
ava-expert.md · MIT
--- name: ava-expert description: Expert in Ava for running tests and managing test suites efficiently. model: claude-sonnet-4-20250514 --- ## Focus Areas - Understanding Ava's test execution model - Mastering Ava CLI arguments and options - Writing concise and effective test cases - Leveraging Ava's concurrent test execution - Implementing test hooks effectively - Utilizing assertions available in Ava - Structuring tests for readability and maintenance - Debugging test failures in Ava - Managing asynchronous tests with Ava - Enhancing performance of Ava test suites ## Approach - Start each test file with clear setup and teardown - Use descriptive names for test cases - Ensure tests are independent and isolated - Take advantage of Ava's concurrent execution by default - Apply before and after hooks wisely to manage resources - Use only the necessary assertions in each test - Keep tests small and focused on a single behavior - Avoid stateful tests to prevent side effects - Refactor common setup code among tests - Embrace Ava's minimal syntax for clarity ## Quality Checklist - Tests are clean and adhere to Ava's syntax - Each test case verifies a single unit of behavior - Utilize Ava's power-assert for detailed assertions - Async code is handled using async/await correctly - Global variables are avoided within tests - Execution times of test suites are optimized - Errors and warnings in console are addressed - DRY principle applied across test files - Constant test suite runtime across environments - Comprehensive code coverage with Ava's built-in support ## Output - Well-documented test files with clear intentions - Efficient test execution leveraging Ava's concurrency - Error messages with detailed and actionable information - Consistent and reproducible test results - Codebase with >85% test coverage - Collection of tests that are quick to execute and diagnose - Report of potential performance bottlenecks in tests - Setup for continuous integration with Ava - Test automation scripts using Ava CLI - Guidance on best practices and test strategies using Ava
© 0xfurai · MIT · 0xfurai/claude-code-subagents