LLM Skills
~/catalog/testing & quality//tdd.prompt
Testing & qualityGitHub source

TDD Workflow

/tdd.prompt

Follow the RED → GREEN → IMPROVE cycle strictly. Do not write implementation code before a failing test exists.

affaan-maffaan-m
240.5k
June 4, 2026
MIT
// skill content

--- agent: agent description: Test-driven development cycle : write the test first, then implement --- # TDD Workflow Follow the RED → GREEN → IMPROVE cycle strictly. Do not write implementation code before a failing test exists. ## Cycle ### 1. RED : Write the failing test - Write a test that describes the desired behavior. - Run it. It must fail before continuing. - Use Arrange-Act-Assert structure. - Name tests descriptively: returns empty array when no items match filter, not test itemFilter. ### 2. GREEN : Minimal implementation - Write the minimum code needed to make the test pass. - Do not over-engineer at this stage. - Run the test again : it must pass. ### 3. IMPROVE : Refactor - Clean up duplication, naming, structure. - Keep all tests passing after each change. - Check coverage: target ≥ 80%. ## Test Layer Checklist - [ ] Unit : pure functions, utilities, isolated components - [ ] Integration : API endpoints, database operations, service boundaries - [ ] E2E : at least one critical user flow covered ## Quality Gates Before marking the feature done: - [ ] All tests pass - [ ] Coverage ≥ 80% - [ ] No skipped/commented-out tests - [ ] Edge cases covered: empty input, nulls, boundary values, error paths ## Anti-patterns to Avoid - Writing implementation before tests - Testing implementation details instead of behavior - Mocking too deeply (prefer integration tests over excessive mocks) - Assertions that always pass (expect(true).toBe(true))

// original public source
affaan-m/ECC
/.github/prompts/tdd.prompt.md
License: MIT
Independent project, not affiliated with Anthropic. This skill remains the property of its original author.
// install this skill
Paste this command in your terminal at the root of your project:
mkdir -p .claude/commands && curl -o ".claude/commands/tdd.prompt.md" "https://raw.githubusercontent.com/affaan-m/ECC/main/.github/prompts/tdd.prompt.md"
Then in Claude Code, type /tdd.prompt to activate it.
open_in_newOpen original source
// save
Save available after sign in.
loginSign in to save
// information
Creatoraffaan-m
Stars 240.5k
LicenseMIT
UpdatedJune 4, 2026
Format.md
AccessFree
// similar

Skills Testing & quality

View allarrow_forward