tdd-change
Skill3 starsChanged 3 months agoApache-2.0View on GitHub
Use when changing behavior where a focused failing test or golden fixture must prove RED before implementation and GREEN after the minimal fix.
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- final-reviewSkill
- grill-changeSkill
- implement-nextSkill
- request-to-spec-issuesSkill
- sdd-changeSkill
- subagent-driven-changeSkill
- final-reviewSkill
- grill-changeSkill
- implement-nextSkill
- request-to-spec-issuesSkill
- sdd-changeSkill
- subagent-driven-changeSkill
- tdd-changeSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. About 0 are common, 17 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈17
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Add or update one focused failing test or golden fixture before changing behavior code.
- Distinctive: line 14
Run the narrowest relevant test command and confirm RED: the test fails for the expected reason, not because of a typo, setup error, or …
- Distinctive: line 16
Run the same focused test command and confirm GREEN: the test passes without new warnings or unrelated failures.
- Distinctive: line 18
Do not update golden files only to hide an unexplained behavior change.
- Distinctive: line 22
Do not write a tautological test: expected values must come from an independent source, never recomputed the way the code under test …
- Distinctive: line 23
Do not assert on mock elements or mock call counts when a real behavior assertion is possible.
- Distinctive: line 24
Do not add production methods, flags, or exports that exist only for tests.
- Distinctive: line 25
Do not mock a dependency until you understand the side effects the test needs.
- Distinctive: line 26
Keep test doubles structurally complete enough to match the real data shape consumed by the code.
- Distinctive: line 27
If mock setup is larger than the behavior under test, consider a narrower integration test or a simpler production boundary.
- Distinctive: line 32
Prefer a fake over a stub, and a stub over a mock or spy.
- Distinctive: line 33
Use a spy only where outbound communication is itself the tested contract.
- Distinctive: line 34
Never introduce an abstraction that exists only for a test.
- Very specific: line 38
Read CONTEXT.md when it exists.
- Distinctive: line 39
Test only at the seam declared in the issue brief.
- Very specific: line 40
If implementation shows the declared seam is wrong, stop and report BLOCKED with the reason.
- Distinctive: line 48
Do not install dependencies automatically.
- Distinctive: line 49
Do not run broad or destructive commands without explicit approval.
- Distinctive: line 50
Do not include secrets, environment variable values, or production endpoints in tests or fixtures.
≈ “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
<!-- Generated by Agent Profile Compiler. Do not edit by hand. -->TDD Change
Instructions
- Identify the smallest observable behavior covered by the approved spec.
- Add or update one focused failing test or golden fixture before changing behavior code.
- Run the narrowest relevant test command and confirm RED: the test fails for the expected reason, not because of a typo, setup error, or unrelated failure.
- Implement the smallest change that satisfies the failing test and the spec.
- Run the same focused test command and confirm GREEN: the test passes without new warnings or unrelated failures.
- Refactor only after GREEN, then rerun the focused test command.
- Do not update golden files only to hide an unexplained behavior change.
Testing Anti-Patterns
- Do not write a tautological test: expected values must come from an independent source, never recomputed the way the code under test computes them.
- Do not assert on mock elements or mock call counts when a real behavior assertion is possible.
- Do not add production methods, flags, or exports that exist only for tests.
- Do not mock a dependency until you understand the side effects the test needs.
- Keep test doubles structurally complete enough to match the real data shape consumed by the code.
- If mock setup is larger than the behavior under test, consider a narrower integration test or a simpler production boundary.
Mock Boundary
- Mock only unmanaged external dependencies, such as network, clock, or filesystem you do not own.
- Prefer a fake over a stub, and a stub over a mock or spy.
- Use a spy only where outbound communication is itself the tested contract.
- Never introduce an abstraction that exists only for a test.
Seam Discipline
- Read
CONTEXT.mdwhen it exists; test names and interface names must match its glossary terms. - Test only at the seam declared in the issue brief; do not re-decide the seam inside the loop.
- If implementation shows the declared seam is wrong, stop and report
BLOCKEDwith the reason. Never silently move or redesign the seam.
Output
Report the RED command and expected failure, the GREEN command and passing result, any refactor rerun, and any TDD exception that required human approval.
Safety
- Do not install dependencies automatically.
- Do not run broad or destructive commands without explicit approval.
- Do not include secrets, environment variable values, or production endpoints in tests or fixtures.
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.

