Borrowing it
Nothing to install: this file belongs to Piyush8296/claude-workspace. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Piyush8296/claude-workspace/main/.claude/commands/tdd.mdgit clone --depth 1 https://github.com/Piyush8296/claude-workspaceWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/piyush8296/claude-workspace/tdd)<a href="https://agentmods.dev/commands/piyush8296/claude-workspace/tdd"><img src="https://agentmods.dev/badge/commands/piyush8296/claude-workspace/tdd.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00013 | $0.00500 |
| Opus 5 | $0.00006 | $0.00250 |
| Sonnet 5 | $0.00003 | $0.00100 |
| Haiku 4.5 | $0.00001 | $0.00050 |
Grade A, and why
tdd scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
TDD Workflow
Develop with TDD: $ARGUMENTS
Instructions
1. Understand the requirement
Clarify with the user if needed:
- What should this feature/function do?
- What are the inputs and expected outputs?
- What edge cases matter?
2. RED — Write a failing test
Create the test file first. The test should:
- Describe the expected behavior in plain English
- Use factory functions for test data:
getProps(),getMockX() - Cover the happy path AND at least one edge case
- Use accessible queries:
getByRole>getByText>getByTestId
# Run the test — it MUST fail
npx vitest run <test-file> --reporter=verbose
If the test passes without implementation, the test is wrong. Rewrite it.
3. GREEN — Write minimal code to pass
Implement the minimum code that makes the test pass:
- No extra features
- No premature optimization
- No refactoring yet
- Just make it green
# Verify it passes
npx vitest run <test-file> --reporter=verbose
4. REFACTOR — Clean up while green
Now improve the code:
- Extract helper functions
- Improve naming
- Remove duplication
- Apply project patterns (check relevant skills)
# Tests must still pass after refactoring
npx vitest run <test-file> --reporter=verbose
5. Expand coverage
Add more test cases:
- Error states
- Loading states
- Empty states
- Boundary values
- Invalid inputs
Repeat RED → GREEN → REFACTOR for each new case.
6. Commit
git add -A
git commit -m "feat: implement $ARGUMENTS with TDD"
7. Report
Summarize:
- Tests written (count)
- All passing? (yes/no)
- Edge cases covered
- Files created/modified
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 7d ago First seen · 86 lines · 13 tokens per session scan A 65f25b761ef2
tdd is a command published in the GitHub repository Piyush8296/claude-workspace (2 stars, last pushed 4mo ago), licensed MIT. It adds 13 tokens to every session and 500 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
tdd
Enforce test-driven development workflow. Scaffold interfaces, generate tests FIRST, then implement minimal code to pass. Ensure 80%+ coverage.
tdd-bug
Fix a bug with regression test first.
tdd-feature
Implement a new feature using full TDD loop.
tdd-refactor
Safe refactoring verified by existing tests.
tdd-start
Enable TDD Dev Mode for the session.
tdd-stop
Disable TDD Dev Mode for the session.