Install command
Not provided
A user-created custom slash command that runs a red-green-refactor TDD loop in Claude Code: write failing tests first, implement until they pass, then refactor. Built with the documented custom-command frontmatter and $ARGUMENTS substitution, not a built-in feature.
Open the source and read safety notes before installing.
Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.
Decision playbook
Signals are present but mixed. Use the checklist below to confirm the source and operational safety for your environment.
0
78
—
No baseline selected
No major trust-signal divergence detected in the current selection.
Confirm ownership and provenance before trusting install instructions.
Source link availableRequired
Open the canonical repository and verify ownership.
Source provenance statusRequired
Marked as source-backed.
Metadata reviewed
Registry metadata indicates a reviewed listing.
Validate risk disclosures before installation or API wiring.
Safety notes presentRequired
Review the listed safety guidance before running commands.
Privacy notes presentRequired
Review data handling notes before connecting accounts or secrets.
Trust level risk gateRequired
Trust level does not block evaluation.
Check package metadata and artifact integrity signals.
Install payload available
Install or copy payload is available for review.
Package verification flag
No package verification flag provided.
Checksum metadata
No checksum provided for downloaded artifact.
Use compare context to validate trade-offs before adoption.
Compare tray has multiple entries
Add at least one more entry to compare trust differences.
Baseline comparison available
No baseline peer selected yet.
Diverging trust signals identified
No major trust-signal divergence found.
Setup at a glance
Copy-ready — paste the snippet to get started.
Install command
Not provided
Config snippet
Not provided
Copy snippet
Provided
Prerequisites
None
Platforms
1 listed
Difficulty
100/100
Adoption plan
Current risk score 16/100. Use staged verification before broader rollout.
Validate source and review signals before any execution.
Confirm source provenanceRequired
Source URL/provenance metadata is present.
Confirm metadata review state
Listing has review metadata.
Verify install payload
Install/config payload exists and can be inspected.
Confirm safety, privacy, and package integrity signals.
Review safety notesRequired
Safety notes are present.
Review privacy notesRequired
Privacy notes are present.
Verify package integrity metadata
No package verification/checksum metadata.
Adopt in controlled steps based on the selected plan.
Run in isolated sandbox firstRequired
Use a constrained sandbox and observe behavior across multiple tasks.
Roll out graduallyRequired
Roll out to a small cohort before wider usage.
Set monitoring and fallback
Define rollback path and monitor errors after adoption.
Evidence readiness
Required evidence gates are covered (5/6 signals complete).
Source repository/provenance is listed.
Required in this preset
Review metadata is present.
Required in this preset
Safety notes are present.
Required in this preset
Privacy notes are present.
Optional in this preset
Package integrity metadata is missing.
Optional in this preset
Install payload is available.
Required in this preset
Required evidence gates are covered for this preset.
Decision timeline
5/6 steps complete with no blocking gaps for this preset.
triage
Source/provenance metadata is available.
triage
Review metadata is available.
verify
Safety notes are available.
verify
Privacy notes are available.
verify
Package integrity metadata is missing.
rollout
Install payload is available.
No required blockers for this timeline preset.
Safety & privacy surface
3 safety and 1 privacy notes across 3 risk areas. Review closely: permissions & scopes.
/tdd-workflow add a slugify() helper that strips punctuation/tdd-workflow is not a built-in Claude Code command. There is no shipped TDD command and no built-in TDD flags. This entry is a custom slash command recipe: you save a Markdown prompt file in your repo and Claude Code exposes it as /tdd-workflow. It works by injecting a fixed red-green-refactor prompt into the session, then letting Claude drive your existing test runner.
Custom commands are documented here: https://code.claude.com/docs/en/slash-commands
.claude/commands/<name>.md (project scope, checked into the repo) or ~/.claude/commands/<name>.md (personal scope) becomes the slash command /<name>. The command name is the file name without the .md extension.description, argument-hint, arguments, allowed-tools, disallowed-tools, disable-model-invocation, model, and shell.$ARGUMENTS expands to everything you typed after the command; $1/$2 (shorthand for $ARGUMENTS[1]/$ARGUMENTS[2], 0-based) access positional arguments; named placeholders like $feature work when you declare them in the arguments frontmatter.!`command` and reference files with @path/to/file.Note: As of the current docs, custom commands have been merged into skills. A file at
.claude/commands/tdd-workflow.mdand a skill at.claude/skills/tdd-workflow/SKILL.mdboth create/tdd-workflowand behave the same way; existing.claude/commands/files keep working. Use the skill form if you want supporting files or automatic invocation.
Save this as .claude/commands/tdd-workflow.md:
---
description: Drive a red-green-refactor TDD loop for the requested change
argument-hint: [feature description]
allowed-tools: Read, Edit, Write
disable-model-invocation: true
---
Follow strict test-driven development for: $ARGUMENTS
1. RED — Before writing any implementation, add focused failing tests that
describe only the requested behavior. Run the project's test command and
show me the failing output. Do not implement yet.
2. GREEN — Write the minimum implementation needed to make those tests pass.
Re-run the tests and show that they pass. Do not add behavior the tests
do not require.
3. REFACTOR — Clean up names and structure while keeping the tests green.
Re-run the tests after refactoring.
Use the test framework already configured in this project. First inspect the
project's test scripts or documented test command with me, then run only the
exact command I approve. Stop and ask me before changing test configuration,
adding new dependencies, or running a different command.
disable-model-invocation: true keeps Claude from triggering the loop on its own; you invoke it deliberately. The base recipe intentionally does not pre-approve Bash test commands. Let Claude Code prompt you on the first run, review the exact command and project script it will execute, and only then approve or narrow the command to your actual runner (Jest, Vitest, pytest, go test, etc.).
/tdd-workflow add a slugify() helper that strips punctuation and lowercases
Everything after the command name becomes $ARGUMENTS. Claude then walks the red-green-refactor steps from the prompt, using whatever test framework your project already has.
If you want positional arguments instead, declare them in frontmatter:
---
description: TDD a change in a specific module
argument-hint: [module] [behavior]
arguments: [module, behavior]
---
TDD the behavior "$behavior" in the module `$module`, red-green-refactor.
Then /tdd-workflow auth "rejects expired tokens" maps $module to auth and $behavior to rejects expired tokens (quote multi-word values).
.claude/commands/).allowed-tools entries for repository-controlled scripts.allowed-tools and the prompt to match your stack..claude/commands/tdd-e2e.md with a prompt tailored to that layer, rather than relying on flags.TDD Workflow Custom Command for Claude Code side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.
Next steps differ across entries — use the actions in the table below to copy install commands and source links per resource.
| Field | A user-created custom slash command that runs a red-green-refactor TDD loop in Claude Code: write failing tests first, implement until they pass, then refactor. Built with the documented custom-command frontmatter and $ARGUMENTS substitution, not a built-in feature. Open dossier | A user-created custom slash command for Claude Code that turns a file or function into a test suite. You create .claude/commands/generate-tests.md and invoke it with /generate-tests; it is a prompt recipe, not a built-in command, and uses no CLI flags. Open dossier | Use the built-in /context command to inspect Claude Code's context-window usage, plus a custom .claude/commands recipe for repeatable codebase-context analysis before refactors. Open dossier | Comprehensive code review with security analysis, performance optimization, and best practices validation Open dossier |
|---|---|---|---|---|
| Next stepsDiffers | ||||
| Trust | ||||
| Review status | ReviewedMaintainer reviewed | ReviewedMaintainer reviewed | ReviewedMaintainer reviewed | ReviewedMaintainer reviewed |
| Package trust | Package not verified | Package not verified | Package not verified | Package not verified |
| Source provenance | Source-backed | Source-backed | Source-backed | Source-backed |
| Submitter | — | — | — | — |
| Install risk | Review first | Review first | Review first | Review first |
| Notes | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ |
| Brand | — | — | — | — |
| Category | commands | commands | commands | commands |
| Source | source-backed | source-backed | source-backed | source-backed |
| Author | JSONbored | JSONbored | JSONbored | JSONbored |
| Added | 2025-10-25 | 2025-09-16 | 2025-10-25 | 2025-09-16 |
| Platforms | Claude Code | Claude Code | Claude Code | Claude Code |
| Source repo | — | — | — | — |
| Safety notes | ✓The base recipe does not pre-approve Bash commands. Review the project's test scripts first, then approve the exact test command when Claude Code prompts or add a narrowly scoped command only after you trust it. Claude may create and edit test and source files as part of the loop (Read/Edit/Write). Run it in version control so changes are reviewable and reversible. If you extend the prompt with auto-commit or deploy steps, add explicit safety review; the base recipe does not commit or push. | ✓The recipe asks Claude to run the test suite, which executes project code and test commands locally; review the source and tests before running, especially in an unfamiliar repository. If you add an allowed-tools field (e.g. Bash(npm test:*)), Claude can run those tool calls without a per-use permission prompt while the command is active. Scope it narrowly. Project-level .claude/commands files are shared via git and run for anyone who trusts the workspace; treat a checked-in command as executable content and review it before trusting the repo. | ✓The custom /analyze-context command makes Claude read files across your repository; scope it with a path argument to limit how much is pulled into context. Analysis output reflects Claude's reading of the code in that session, not a deterministic static-analysis tool — verify any load-bearing metrics or recommendations against the actual source. | ✓Review generated changes and commands before applying them; slash commands can ask the agent to read, write, edit, or run tools in the current project. Limit scope to the intended files and run in a trusted checkout when the command analyzes code, tests, security findings, or generated output. |
| Privacy notes | ✓The command body can read project files via @ references and !`command` injection if you add them; only reference files you are comfortable sending to the model as prompt context. The base recipe asks you to inspect project test scripts instead of injecting package.json automatically. | ✓Dynamic-injection lines (!`...`) and @file references send the output of shell commands and the contents of referenced files into the model context; avoid pointing them at files containing secrets, credentials, or other sensitive data. | ✓Both /context and a custom analysis command operate on whatever files and project memory are loaded in the session; no data leaves your machine beyond the normal Claude Code model request, but file contents you ask Claude to read become part of the conversation context sent to the model. | ✓Prompts, source files, logs, errors, dependency metadata, and generated reports may be sent to the configured AI model during command execution. Redact secrets, customer data, private repository details, and proprietary code before sharing command output outside the workspace. |
| Prerequisites | — none listed | — none listed | — none listed | — none listed |
| Install | — | — | — | |
| Config | — | — | — | — |
| Citations | ||||
| Claim | Unclaimed | Unclaimed | Unclaimed | Unclaimed |
Loading live community signals…
A short, calm digest of reviewed Claude resources. Unsubscribe any time.