tdd-workflow
Skill5 starsChanged 2 months agoMITView on GitHub
Enforces test-driven development with 80%+ coverage across unit, integration, and E2E tests. Use when the user says: 'write tests first', 'TDD', 'add test coverage', 'test this feature', 'write unit tests', 'create integration test', 'add E2E test', 'fix with TDD', 'red green refactor', 'increase coverage'. Guides the RED-GREEN-REFACTOR cycle for new features, bug fixes, and refactoring. Do NOT use for running existing tests without changes, CI/CD pipeline setup, or code review without test focus.
128 other projects use a version of this.
Adopted by
Most recently taken up by
- Rojios/everything-claude-codetheir own version, first seen Nov 8, 2026
- lhbsaa/apex-unifiedtheir own version, first seen Nov 8, 2026
- ahmadvahidi/skill-atlastheir own version, first seen Nov 8, 2026
- mahsumaktas/agent-evolution-kittheir own version, first seen Nov 8, 2026
- ControllableModel/SWE-Skills-Benchtheir own version, first seen Nov 8, 2026
- LuisSambrano/antigravity-configtheir own version, first seen Nov 8, 2026
Used with
Projects with it also use brand-discovery, configure-ecc and 10 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.
ysyecustSkillbrand-discovery
Use when a brand needs to discover or articulate its identity through structured multi-session interviews. Covers purpose, positioning, audience, personality, voice, narrative, and founder-brand tension across 8 modules using laddering, 5 Whys, and projective techniques. Produces a resumable session with disk-persisted state and a master brandbook (90_SYNTHESIS.md).
Also in 6 projects that use this
royaluniondesign-sysSkillconfigure-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
junimnjwSkillralphinho-rfc-pipeline
RFC-driven multi-agent DAG execution pattern with quality gates, merge queues, and work unit orchestration.
Also in 12 projects that use this
loulanyueSkillnuxt4-patterns
Nuxt 4 app patterns for hydration safety, performance, route rules, lazy loading, and SSR-safe data fetching with useFetch and useAsyncData.
Also in 10 projects that use this
royaluniondesign-sysSkillcontent-hash-cache-pattern
Cache expensive file processing results using SHA-256 content hashes — path-independent, auto-invalidating, with service layer separation.
Also in 16 projects that use this
RojiosSkilldart-flutter-patterns
Production-ready Dart and Flutter patterns covering null safety, immutable state, async composition, widget architecture, popular state management frameworks (BLoC, Riverpod, Provider), GoRouter navigation, Dio networking, Freezed code generation, and clean architecture.
Also in 7 projects that use this
Other versions128 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 128
- affaan-m/ECC★ 246ksame name
- vudovn/ag-kit★ 8.2ksame name
- vudovn/antigravity-kit★ 8.2ksame name
- xu-xiang/everything-claude-code-zh★ 1.9ksame name
- loulanyue/awesome-claude-notes★ 272same name
- ab604/claude-code-r-skills★ 202same name
- cloudnative-co/claude-code-starter-kit★ 153same name
- xenitV1/Antigravity-Workflows★ 130same name
- cohen-liel/hivemind★ 108same name
- travisjneuman/.claude★ 106same name
118 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 repository25 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adk-engineerSkill
- agent-orchestratorSkill
- brainstormingSkill
- bugfixSkill
- classify-reviewSkill
- code-reviewerSkill
- codex-reviewSkill
- context7-skillsSkill
- developer-growth-analysisSkill
- file-organizerSkill
- gcp-deploy-guardianSkill
- gws-workspaceSkill
- handoverSkill
- modern-architectureSkill
- planSkill
- repo-cleanSkill
- review-loopSkill
- security-reviewSkill
- skill-creatorSkill
- supabase-nextjs-debuggerSkill
- test-falsifySkill
- ui-design-systemSkill
- ui-skillsSkill
- ux-researcher-designerSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 6 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 117 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 38
Run tests -- they MUST fail:
- Distinctive: line 45
Write just enough code to make all tests pass.
- Distinctive: line 60
Run tests after each change to confirm nothing broke.
- Distinctive: line 84
Check branches, functions, lines, and statements individually.
- Distinctive: line 128
If tests pass immediately (no RED phase): the test is not testing anything meaningful.
- Very specific: line 129
If coverage is below 80%: run npm run test:coverage and check the uncovered lines report.
- Very specific: line 130
If E2E tests are flaky: replace waitForTimeout with waitForSelector or expect().toBeVisible().
- Very specific: line 131
If mocks leak between tests: add vi.restoreAllMocks() in afterEach or use vi.mock at module level.
- Distinctive: line 132
If tests are slow (unit > 50ms): check for unmocked network calls or missing test isolation.
“Common” is measured: kept by at least 6 in 10 of the 117 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
TDD Workflow
Enforce test-driven development: write tests first, implement to pass, then refactor.
<important if="writing new tests or implementing a new feature with TDD">
## The Cycle: RED -> GREEN -> REFACTORRED: Write Failing Tests
Define expected behavior before writing any implementation:
describe('searchMarkets', () => {
it('returns relevant markets for query', async () => {
const results = await searchMarkets('election')
expect(results).toHaveLength(5)
expect(results[0].relevanceScore).toBeGreaterThan(0.8)
})
it('returns empty array for no matches', async () => {
const results = await searchMarkets('zzz_nonexistent')
expect(results).toEqual([])
})
it('handles empty query gracefully', async () => {
const results = await searchMarkets('')
expect(results).toEqual([])
})
})Run tests -- they MUST fail:
npm test -- --run [test-file]GREEN: Write Minimal Implementation
Write just enough code to make all tests pass. No more.
npm test -- --run [test-file]
# All tests should now passREFACTOR: Improve While Green
Improve code quality with tests as safety net:
- Remove duplication
- Improve naming
- Optimize performance
- Extract helpers
Run tests after each change to confirm nothing broke.
</important>
<important if="choosing which test type to write or classifying existing tests">
## Test Types and When to Use| Type | What to Test | Tool | Speed Target |
| Unit | Single function/class, pure logic | Vitest/Jest | < 50ms each |
| Integration | API endpoints, DB operations, service interactions | Vitest + mocks | < 500ms each |
| E2E | Critical user flows through browser | Playwright | < 30s each |
IMPORTANT: curl tests are integration tests, NOT E2E. E2E requires browser verification.
</important>
<important if="measuring coverage or checking if coverage targets are met">
## Coverage RequirementTarget 80%+ across all metrics:
npm run test:coverageCheck branches, functions, lines, and statements individually.
</important>
<important if="writing new tests or refactoring existing tests">
## Testing Rules- Test behavior, not implementation
- WRONG:
expect(component.state.count).toBe(5) - RIGHT:
expect(screen.getByText('Count: 5')).toBeInTheDocument()
- WRONG:
- Each test is independent -- set up own data, no shared mutable state
- Use semantic selectors
- WRONG:
page.click('.css-xyz') - RIGHT:
page.click('[data-testid="submit"]')orpage.click('button:has-text("Submit")')
- WRONG:
- Mock external dependencies -- isolate the unit under test
- Test edge cases -- null, undefined, empty, boundary values, error paths
- Arrange-Act-Assert structure in every test
</important>
<important if="writing tests that need to mock databases or external APIs">
## Mocking PatternsDatabase/ORM
vi.mock('@/lib/prisma', () => ({
prisma: { user: { findUnique: vi.fn() } }
}))External APIs
vi.mock('@/lib/external-api', () => ({
fetchData: vi.fn(() => Promise.resolve({ data: 'mocked' }))
}))</important><important if="debugging failing tests, flaky tests, or slow test suites">
## Error Handling- If tests pass immediately (no RED phase): the test is not testing anything meaningful. Add assertions that verify specific behavior.
- If coverage is below 80%: run
npm run test:coverageand check the uncovered lines report. Add tests for missed branches. - If E2E tests are flaky: replace
waitForTimeoutwithwaitForSelectororexpect().toBeVisible(). Never use fixed timeouts. - If mocks leak between tests: add
vi.restoreAllMocks()inafterEachor usevi.mockat module level. - If tests are slow (unit > 50ms): check for unmocked network calls or missing test isolation.
</important>
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.

