054-design-tdd
Skill452 starsChanged 3 months agoApache-2.0View on GitHub
Use when Java implementation work should be guided by Test-Driven Development, including maintaining a test list, choosing the next behavior, writing a failing test first, implementing only enough production code to pass, and refactoring while keeping tests green. This should trigger for requests such as Apply TDD; Use test-driven development; Drive this Java change with tests; Write the failing test first; Red-green-refactor this feature. Part of Plinth Toolkit
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
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 25
Keep implementation work inside the red-green-refactor cycle, with one selected behavior driving each small change.
- Very specific: line 27
MUST: read references/054-design-tdd.md before applying TDD guidance
- Distinctive: line 30
MUST: write or describe the failing test first and use it to clarify the public interface or usage
- Distinctive: line 40
Write the failing test first
- Very specific: line 48
Read references/054-design-tdd.md, then list candidate behaviors, edge cases, error paths, integration boundaries, and design questions …
- Distinctive: line 56
Write or describe the failing unit, integration, acceptance, or characterization test before production code.
- Distinctive: line 64
After the selected test passes, refactor new and existing code to improve names, duplication, responsibility placement, type design, and …
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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
Test-Driven Development Design
Guide Java developers through Test-Driven Development for implementation work. This is an interactive SKILL.
What is covered in this Skill?
- Maintaining or refining a list of candidate test cases
- Selecting the next useful behavior or test case before editing production code
- Writing a failing test first to clarify the public interface, API shape, or usage of the code
- Writing only enough functional production code to pass the selected test
- Refactoring new and existing code while tests remain green
- Adding newly discovered test cases to the list without losing the current TDD cycle
- Reporting skipped checks, missing tests, and remaining risks when verification is incomplete
Constraints
Keep implementation work inside the red-green-refactor cycle, with one selected behavior driving each small change.
- MUST read
references/054-design-tdd.mdbefore applying TDD guidance - MUST maintain or refine a test list when more than one behavior, edge case, or question is in scope
- MUST select the next useful behavior or test case before writing production code
- MUST write or describe the failing test first and use it to clarify the public interface or usage
- MUST implement only the functional production code needed to pass the selected failing test
- MUST refactor new and existing code only after the selected test passes and while keeping tests green
- MUST report skipped checks, missing tests, and remaining risks when verification is incomplete
When to use this skill
- Apply TDD
- Use test-driven development
- Drive this Java change with tests
- Write the failing test first
- Red-green-refactor this feature
- Build this behavior test first
Workflow
- Build the Test List
Read references/054-design-tdd.md, then list candidate behaviors, edge cases, error paths, integration boundaries, and design questions that may need tests. Add newly discovered cases to the list as work proceeds.
- Select the Next Behavior
Choose the next useful test case: small enough to implement in one cycle, valuable enough to move the design forward, and specific enough to expose the expected observable outcome.
- Write the Failing Test First
Write or describe the failing unit, integration, acceptance, or characterization test before production code. Use the test to clarify the public interface, API shape, inputs, outputs, errors, or usage of the code.
- Make the Test Pass
Implement the smallest functional production code needed to pass the selected test. Avoid speculative branches, abstractions, framework wiring, or cleanup that is not required by the current failing test.
- Refactor While Green
After the selected test passes, refactor new and existing code to improve names, duplication, responsibility placement, type design, and test clarity while keeping the relevant tests green.
- Report and Continue
Report the selected behavior, failing-test-first signal, code added to pass, refactoring performed, verification results, skipped checks, missing tests, and remaining risks. Return to the test list for the next cycle.
Reference
For detailed guidance, examples, and constraints, see references/054-design-tdd.md.
Other versions1 project uses a version of this.
Word for word · 1
- jabrena/plinth★ 448100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository124 other files it gives its agents.
- AGENTS.mdAGENTS.md
- 001-commands-inventorySkill
- 002-agents-inventorySkill
- 003-skills-inventorySkill
- 004-commands-installationSkill
- 005-agents-installationSkill
- 012-agile-epicSkill
- 013-agile-featureSkill
- 014-agile-user-storySkill
- 021-problem-framingSkill
- 022-root-cause-analysisSkill
- 023-assumption-analysisSkill
- 024-context-mappingSkill
- 025-quality-attribute-discoverySkill
- 030-architecture-adr-generalSkill
- 033-architecture-diagramsSkill
- 041-planning-plan-modeSkill
- 042-planning-openspecSkill
- 043-planning-github-issuesSkill
- 044-planning-jiraSkill
- 045-planning-azure-devopsSkill
- 051-design-two-steps-methodsSkill
- 052-design-hamburger-methodSkill
- 053-design-simple-rulesSkill
- 055-design-parallel-changeSkill
- 056-design-avoid-breaking-changesSkill
- 057-design-feature-togglesSkill
- 058-design-bddSkill
- 059-design-atddSkill
- 110-java-maven-best-practicesSkill
- 111-java-maven-dependenciesSkill
- 112-java-maven-pluginsSkill
- 113-java-maven-documentationSkill
- 114-java-maven-searchSkill
- 121-java-object-oriented-designSkill
- 122-java-type-designSkill
- 123-java-design-patternsSkill
- 124-java-secure-codingSkill
- 125-java-concurrencySkill
- 126-java-exception-handlingSkill
- 128-java-genericsSkill
- 130-java-testing-strategiesSkill
- 131-java-testing-unit-testingSkill
- 132-java-testing-integration-testingSkill
- 133-java-testing-acceptance-testsSkill
- 141-java-refactoring-with-modern-featuresSkill
- 142-java-functional-programmingSkill
- 143-java-functional-exception-handlingSkill
- 144-java-data-oriented-programmingSkill
- 145-java-refactoring-high-performanceSkill
- 151-java-performance-jmeterSkill
- 152-java-performance-gatlingSkill
- 161-java-profiling-detectSkill
- 162-java-profiling-analyzeSkill
- 163-java-profiling-refactorSkill
- 164-java-profiling-verifySkill
- 170-java-documentationSkill
- 181-java-observability-loggingSkill
- 182-java-observability-metrics-micrometerSkill
- 183-java-observability-tracing-opentelemetrySkill
- The first 60 shown.
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.

