catchup
Rebuild working context fast after /clear or a fresh session — reads the handoff note and the…
Test-Driven Development loop. Write a failing test first, then the minimum code to pass it, then refactor. Repeat.
$ npx -y skills add poshan0126/dotclaude --skill tdd --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/tddContext preview
The summary Claude sees to decide when to auto-load this skill.
Test-Driven Development loop. Write a failing test first, then the minimum code to pass it, then refactor. Repeat.
name: tdd description: Test-Driven Development loop. Write a failing test first, then the minimum code to pass it, then refactor. Repeat. argument-hint: "[feature description or function signature]" disable-model-invocation: true
Build the following using strict Test-Driven Development:
**Feature**: $ARGUMENTS
Repeat this cycle for each behavior. Never skip steps.
1. Write ONE test for the smallest next behavior (not the whole feature) 2. The test must:
3. **Run the test. It MUST fail.** If it passes, either:
4. Verify the failure message makes sense. It should tell you what's missing
1. Write the **simplest, most obvious code** that makes the failing test pass 2. Don't generalize. Don't make it elegant. Don't handle cases the test doesn't cover. 3. Hardcoding is fine if only one test exists for that path. The next test will force generalization 4. **Run the test. It MUST pass.** If it doesn't, fix the code (not the test. The test defined the behavior) 5. Run ALL tests. Nothing previously passing should break.
1. Look for: duplication, unclear names, functions doing too much, magic values 2. Make ONE improvement at a time 3. **Run ALL tests after each change.** If anything breaks, undo immediately. 4. Stop refactoring when the code is clean enough. Don't gold-plate
Work from simple to complex: 1. **Degenerate cases**. Null input, empty collection, zero 2. **Happy path**. The simplest valid input 3. **Variations**. Different valid inputs that exercise different branches 4. **Edge cases**. Boundary values, max sizes, special characters 5. **Error cases**. Invalid input, failures, exceptions 6. **Integration**. How this connects to the rest of the system
Each test should require a small code change. If you need to write more than ~10 lines of production code to pass a test, the test is too big. Split it.
After each cycle, briefly state:
When the feature is complete, provide a summary of all behaviors covered and any gaps that would need integration or manual testing.
A lean .claude/ setup for daily development. Seven specialist agents, twelve workflow skills, six modular rules, and eight safety/productivity hooks. No bloat, no model assignments, no opinions you can't override.
Repo: poshan0126/dotclaude
Rebuild working context fast after /clear or a fresh session — reads the handoff note and the…
Keep CLAUDE.md current and lean — capture this session's durable learnings into it (default),…
Estimate per-turn token cost of `.claude/` and `CLAUDE.md` — always-loaded vs path-scoped vs…
Find and fix a bug. Default is careful (reproduce, investigate, test). Add `--fast` for…
Explain code. Default is a one-sentence summary plus a mental model. Add `verbose` to also…
Take a GitHub issue from number to tested fix — read the issue and comments, reproduce,…