tdd-intelligence
Skill6 starsChanged 5 months agoMITView on GitHub
Apply rigorous test-first development. Write failing tests (or characterization tests) that capture desired behavior before implementing. Maintain high test coverage on changed code. Use for new features, refactors, and bug fixes where regression protection matters. Triggers: "TDD this", "test first", "write the test then implement", "add characterization tests".
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- architecture-reviewerSkill
- git-disciplineSkill
- mcp-orchestratorSkill
- plan-mode-orchestratorSkill
- security-auditSkill
- subagent-arenaSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Run the test and confirm it fails for the right reason.
- Distinctive: line 34
Never implement before at least one relevant test exists and is failing appropriately.
- Distinctive: line 35
Prefer focused unit tests over broad integration tests for the core logic.
- Very specific: line 36
When editing UI or complex flows, combine with browser-qa or manual verification steps.
- Distinctive: line 37
Update or add tests in the same diff as the feature when possible.
- Distinctive: line 41
Use a subagent to:
- Distinctive: line 47
Always surface the actual commands the project uses:
- Distinctive: line 56
All tests in the affected area are green at the end.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
TDD Intelligence
True test-driven development with agentic discipline.
Core Loop
- Understand the desired behavior (read existing code, docs, issues).
- Write the smallest failing test (or characterization test for legacy) that expresses the goal.
- Run the test and confirm it fails for the right reason.
- Implement the minimal code to make the test pass.
- Refactor for cleanliness while keeping tests green.
- Add any additional edge-case or regression tests suggested by the implementation.
- Verify the full relevant test suite still passes.
For Refactors and Legacy Code
- First write characterization tests that lock in current (even if imperfect) behavior.
- Then change implementation.
- Confirm the characterization tests still pass (proving behavior preservation).
Rules
- Never implement before at least one relevant test exists and is failing appropriately.
- Prefer focused unit tests over broad integration tests for the core logic.
- When editing UI or complex flows, combine with
browser-qaor manual verification steps. - Update or add tests in the same diff as the feature when possible.
Subagent Support
Use a subagent to:
- Explore the test surface area before writing tests.
- Generate additional edge cases after the happy path is implemented.
Verification Commands
Always surface the actual commands the project uses:
- Python:
pytest ... -q --tb=short - Next.js:
npm testorvitest - Rust:
cargo test
Discover these via the repo rather than assuming.
Success Criteria
- The new/changed behavior is covered by tests that would have failed before the change.
- All tests in the affected area are green at the end.
- Diff size remains reasonable (tests + implementation together).
Anti-Patterns
- Writing implementation then retrofitting tests.
- Skipping tests "because it's simple".
- Large untested refactors justified by "we'll add tests later".
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

