Agent skill
write-test-cases
Research and write test cases for a rule. Spawns a test-researcher to produce a coverage matrix, then test-case-writers (one per category) to create the files.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/write-test-cases
SKILL.md
Write Test Cases for a Rule
Rule ID: $ARGUMENTS
Step 1: Spawn the test-researcher agent
Spawn the test-researcher agent with:
- The rule ID:
$ARGUMENTS - The plan path (if known)
The researcher will produce a coverage matrix at tests/Spire.Analyzers.Tests/$ARGUMENTS/coverage-matrix.md.
Step 2: Review the coverage matrix
Read the coverage matrix. Check:
- Are all relevant detection methods covered?
- Are all syntactic contexts enumerated?
- Are there enough should_pass cases for edge cases and false positives?
- Are the file names clear and consistent?
Add or remove cases as needed by editing the matrix.
Step 3: Spawn test-case-writer agents
For each category in the matrix, spawn one test-case-writer agent in parallel:
- Tell it the rule ID:
$ARGUMENTS - Tell it which category to write (reference the section in the coverage matrix)
Step 4: Verify
After all writers complete:
- Run
dotnet build— the test project must compile cleanly. - Count total case files vs matrix entries — ensure nothing was missed.
- Note: tests will FAIL at this stage because no analyzer exists yet. That is expected and correct (TDD).
Constraints
- Review the matrix before spawning writers — this is the quality gate.
- If a writer runs out of budget, spawn another to continue the remaining cases from its category.
- Do NOT write case files yourself — delegate to the writer agents.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?