skill-tdd
SkillAI & modelsLets your agent follow test-driven development: write a failing test first, then the smallest code to pass it.
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; ahel provides instructions and does not run this skill.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
Then ask your AI: use the skill-tdd skill
About this skill
Build a behavior change with observed red, minimal green, and measured test consolidation
What this skill tells your AI
The instructions your AI receives, as published by nyldn/claude-octopus in skills/skill-tdd/SKILL.md and read by ahel’s review.
Host: Codex CLI — This skill was designed for Claude Code and adapted for Codex. Cross-reference commands use installed skill names in Codex rather than
/octo:*slash commands. Use the active Codex shell and subagent tools. Do not claim a provider, model, or host subagent is available until the current session exposes it. For host tool equivalents, seeskills/blocks/codex-host-adapter.md.
Test-driven development
Read skills/blocks/engineering-method-selection.md from the installed plugin
for review admission. Natural-language requests and --peer-review share that
policy. Honor host-only requests; risk alone does not authorize paid usage.
Run the red, green, and refactor cycle on the current host. Routine TDD makes
zero additional provider dispatches. Use one external reviewer only when the
user passes --peer-review, explicitly requests independent review, or an
existing risk policy requires it. Explicit debate, council, and multi-model
commands retain their own execution contracts.
The rule
Do not change production behavior until a focused test fails for the expected reason. Existing implementation outside the requested change remains intact.
- Name the observable behavior and the smallest public boundary that proves it.
- Write one focused test. Directly test an internal invariant only when the public boundary cannot isolate its failure mode.
- Run it and record the expected failure, command, and exit status.
- Implement the smallest change that passes.
- Run the focused test, then the affected suite.
- Refactor only while the tests remain green.
If a test passes before implementation, it is not red evidence. If it errors due to fixture or syntax problems, repair the test until it fails on the missing behavior.
Consolidating tests
Do not equate similar assertions with duplicate guarantees. Keep separate OS,
security, cancellation, and integration boundaries. For every removed test,
record old_test, behavior, replacement, mutant, red_observed,
baseline_ms, candidate_ms, and reason. The retained test must kill the
named mutant at the intended caller boundary.
After one warm-up, measure five isolated runs and report every sample and the median. Review a slowdown only when it exceeds both 20 percent and 100 ms.
Completion requires observed red and green evidence, affected-suite results, and the consolidation ledger when tests were removed. A missing reviewer is reported as incomplete review, never simulated.
Strategy rotation
If the same test remains red after two implementation attempts, stop and recheck the test boundary, fixture, and expected behavior. The strategy-rotation hook is a signal to try a fundamentally different hypothesis, not another variation of the same patch.
Adapted from DEEPENING in mattpocock/skills at commit
3cca18b368ae95cdbdebbff572ccafa662551015 under the MIT License. See
THIRD_PARTY_NOTICES.md.
Signals
- GitHub stars
- 4k
- Forks
- 390
- Last commit
- Sep 2026
Others that do the same job
Advanced
- Item type
- skill
- Key
skill-tdd-nyldn- Source
- github.com/nyldn/claude-octopus
github.com/nyldn/claude-octopus
More in AI & models
Skill · anthropics
More in AI & modelswayfinder
Skill · mattpocock
More in AI & modelswizard
Skill · mattpocock
More in AI & modelsalgorithmic-art
Skill · anthropics
More in AI & modelscode-review-and-quality
Skill · addyosmani
More in AI & modelsai-first-engineering
Skill · affaan-m
More in AI & models