tdd-workflow
Skill3 starsChanged 8 months agoMITView on GitHub
Test-driven development workflow for implementing new features and fixing bugs. Use when the user mentions TDD, "write tests first", "red-green-refactor", or when implementing features that need comprehensive test coverage.
78 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- Lukk17/agent-standardstheir own version, first seen Oct 5, 2026
- mnzralee/claude-multi-agent-architecturetheir own version, first seen Oct 3, 2026
- JameMy0001/antigravity-skills-hubtheir own version, first seen Oct 2, 2026
- kapadias/nonnatheir own version, first seen Oct 1, 2026
- imMamdouhaboammar/tiktok-growth-automation-meshtheir own version, first seen Oct 1, 2026
- smitshivalkar-spectims4567/hsj-agent-skillstheir own version, first seen Sep 29, 2026
Used with
Projects with it also use kotlin-testing, ralphinho-rfc-pipeline and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
tpavanipradeepSkillkotlin-testing
Kotlin testing patterns with Kotest, MockK, coroutine testing, property-based testing, and Kover coverage. Follows TDD methodology with idiomatic Kotlin practices.
Also in 6 projects that use this
InfopibeSkillralphinho-rfc-pipeline
RFC-driven multi-agent DAG execution pattern with quality gates, merge queues, and work unit orchestration.
Also in 10 projects that use this
mryeastcodeSkillnuxt4-patterns
Nuxt 4 app patterns for hydration safety, performance, route rules, lazy loading, and SSR-safe data fetching with useFetch and useAsyncData.
Also in 5 projects that use this
saxon-ySkillconfigure-ecc
Interactive installer for Everything Claude Code — guides users through selecting and installing skills and rules to user-level or project-level directories, verifies paths, and optionally optimizes installed files.
Also in 12 projects that use this
InfopibeSkillcontent-hash-cache-pattern
Cache expensive file processing results using SHA-256 content hashes — path-independent, auto-invalidating, with service layer separation.
Also in 12 projects that use this
mryeastcodeSkillpytorch-patterns
PyTorch deep learning patterns and best practices for building robust, efficient, and reproducible training pipelines, model architectures, and data loading.
Also in 8 projects that use this
- +2 more from Infopibe
- +1 more from mryeastcode
Other versions78 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- talayash/agentrium★ 4212% same
Wrote their own version · 77
- WorldFlowAI/everything-claude-code★ 4ksame name
- xu-xiang/everything-claude-code-zh★ 2ksame name
- zhukunpenglinyutong/ai-max★ 335same name
- loulanyue/awesome-claude-notes★ 272same name
- ab604/claude-code-r-skills★ 205same name
- cloudnative-co/claude-code-starter-kit★ 151same name
- tpavanipradeep/everything-claude-code★ 134same name
- templetongroup/radiant★ 113same name
- hellangleZ/burn-in-cceverywhere-ralph★ 112same name
- cohen-liel/hivemind★ 110same name
67 more not listed
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 repository72 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- api-designerSkill
- backend-patternsSkill
- code-reviewerSkill
- debugging-assistantSkill
- golang-testingSkill
- project-guidelines-exampleSkill
- python-testingSkill
- refactoring-guideSkill
- spec-driven-developmentSkill
- verification-loopSkill
- update-docsSkill
- api-docsSkill
- changelog-writerSkill
- readme-generatorSkill
- django-patternsSkill
- django-securitySkill
- django-tddSkill
- django-verificationSkill
- fastapi-patternsSkill
- nextjs-patternsSkill
- react-patternsSkill
- springboot-patternsSkill
- springboot-securitySkill
- springboot-tddSkill
- branch-strategySkill
- changelogSkill
- commit-helperSkill
- pr-creatorSkill
- prSkill
- evolveSkill
- instinct-exportSkill
- instinct-importSkill
- instinct-statusSkill
- cleanupSkill
- lint-fixSkill
- refactor-cleanSkill
- update-depsSkill
- continuous-learningSkill
- continuous-learning-v2Skill
- eval-harnessSkill
- iterative-retrievalSkill
- strategic-compactSkill
- golang-patternsSkill
- python-patternsSkill
- rust-patternsSkill
- typescript-patternsSkill
- accessibility-checkerSkill
- build-fixSkill
- code-reviewSkill
- e2eSkill
- performance-reviewerSkill
- security-auditorSkill
- security-reviewSkill
- test-coverageSkill
- checkpointSkill
- deploySkill
- evalSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 12 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 72 edited versions we read keep these.
12
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 28
When high test coverage is required
- Distinctive: line 50
Before writing any code:
- Distinctive: line 68
Run the test - it should fail (RED).
- Distinctive: line 78
Run the test - it should pass (GREEN).
- Distinctive: line 94
Add test for edge case → implement
- Distinctive: line 95
Add test for error handling → implement
- Distinctive: line 96
Add test for complex scenario → implement
- Distinctive: line 106
Critical: Run tests after each change to ensure they still pass.
- Distinctive: line 157
Write a test that reproduces the bug
- Distinctive: line 161
Ensure no other tests broke
- Distinctive: line 166
Write test for simplest behavior
- Distinctive: line 168
Write test for next behavior
“Common” is measured: kept by at least 6 in 10 of the 72 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Test-Driven Development Workflow
A systematic approach to writing code guided by tests.
When to Use
- User explicitly requests TDD approach
- Implementing new features with clear requirements
- Fixing bugs (write failing test first)
- Refactoring existing code safely
- When high test coverage is required
The TDD Cycle
┌─────────────────────────────────────────┐
│ │
│ 1. RED: Write a failing test │
│ ↓ │
│ 2. GREEN: Write minimal code to pass │
│ ↓ │
│ 3. REFACTOR: Improve while green │
│ ↓ │
│ (repeat) │
│ │
└─────────────────────────────────────────┘Instructions
Step 1: Understand Requirements
Before writing any code:
- Clarify the expected behavior with the user
- Identify edge cases and error conditions
- Break down into small, testable units
Step 2: Write the First Failing Test
// Start with the simplest case
describe('calculateTotal', () => {
it('should return 0 for empty cart', () => {
const result = calculateTotal([]);
expect(result).toBe(0);
});
});Run the test - it should fail (RED).
Step 3: Write Minimal Code to Pass
function calculateTotal(items: CartItem[]): number {
return 0; // Simplest implementation that passes
}Run the test - it should pass (GREEN).
Step 4: Add Next Test Case
it('should sum item prices', () => {
const items = [{ price: 10 }, { price: 20 }];
expect(calculateTotal(items)).toBe(30);
});This test fails, so update implementation.
Step 5: Iterate
Continue the cycle:
- Add test for edge case → implement
- Add test for error handling → implement
- Add test for complex scenario → implement
Step 6: Refactor
Once all tests pass, refactor:
- Extract helper functions
- Improve naming
- Reduce duplication
- Optimize if needed
Critical: Run tests after each change to ensure they still pass.
Test Quality Checklist
- Tests are independent (no shared mutable state)
- Test names describe the behavior being tested
- Each test verifies one specific behavior
- Edge cases are covered (empty, null, boundary values)
- Error conditions are tested
- Tests run fast (mock external dependencies)
Common Test Patterns
Arrange-Act-Assert
it('should apply discount to total', () => {
// Arrange
const items = [{ price: 100 }];
const discount = 0.1;
// Act
const result = calculateTotal(items, discount);
// Assert
expect(result).toBe(90);
});Testing Errors
it('should throw on negative price', () => {
const items = [{ price: -10 }];
expect(() => calculateTotal(items)).toThrow('Price cannot be negative');
});Testing Async Code
it('should fetch user data', async () => {
const user = await fetchUser(123);
expect(user.name).toBe('John');
});Examples
Bug Fix with TDD
- Write a test that reproduces the bug
- Verify test fails
- Fix the bug
- Verify test passes
- Ensure no other tests broke
New Feature with TDD
- List all behaviors the feature needs
- Write test for simplest behavior
- Implement
- Write test for next behavior
- Implement
- Continue until feature complete
Anti-Patterns to Avoid
- ❌ Writing implementation before tests
- ❌ Writing all tests at once before any implementation
- ❌ Tests that test implementation details, not behavior
- ❌ Skipping the refactor step
- ❌ Tests that depend on execution order
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.

