← Back to videos

A PRD Builder Slash Command for Claude Code (TDD + Spec-Driven + Recursive Testing)

@agentic.jamesCapturedClaude Code / Skills
See more in Claude Code / Skills

Exact instruction

  1. Create a custom slash command in Claude Code (.claude/commands/) that takes a project name as an $ARGUMENTS variable.
  2. Have the command generate a PRD that doubles as agent instructions: define test suite + success criteria first, then implementation.
  3. Instruct the agent to run tests and git commit after every significant feature.
  4. Instruct the agent to re-test prior features after each new feature lands (regression check).
  5. Reserve a section in the PRD for the agent to leave itself notes for future sessions.

Suggested prompt

Before implementing any feature, first design the test suite and success criteria for it. After implementing, run unit/integration tests, commit if they pass, then re-run tests for previously implemented features to catch regressions. Leave a 'Notes to future self' section at the bottom of this doc and update it as you go.

Adopt?

Yes: This is a more rigorous version of spec-driven development applicable to Claude Code. Worth building a custom slash command that bakes in test-first + commit-after-each-feature + regression re-testing discipline, similar to what's described here.

Find the resource

Creator's link in bio (@agentic.james) — files for the PRD builder slash command, as referenced at the end of the transcript.

show original caption

A new Claude Code prompt focusing on Test driven and spec driven development with recursive agent loops built in has drastically improved my Claude Code workflow. #vibecoding #ai #coding #claude #software