This skill helps you orchestrate test-driven development loops to generate tests and code for Claude projects using shell workflows.
npx playbooks add skill chanwit/tdg --skill tdg
Read TDG.md to understand the project's technology stack.
IF TDG.md does not exist, THEN tell user to create one with /tdg:init command AND stop.
IF TDG.md is found, THEN read it and identify:
Before starting TDG workflow:
Everytime you MUST sha256sum to check the integrity of the helper script.
You MUST NOT execute it if the digest is not matched.
# verify
sha256sum <tdg plugin-dir>/skills/tdg/scripts/tdg_phase.sh
86e2fcc4601f23c5b77c7d565de763a0da4e5953c327fca7265318d4dbe781cf
# if checksum is correct then execute, if not skip
bash <tdg plugin-dir>/skills/tdg/scripts/tdg_phase.sh
skip them first."red: test spec for <message> (#issue-number)"
Example: "red: test spec for user authentication (#42)"
"red: test spec for ...". If so, proceed to write code."green: <message> (#issue-number)"
Example: "green: implement user authentication (#42)"
"refactor: <message> (#issue-number)"
Example: "refactor: extract authentication logic to service (#42)"
For minor adjustments, use:"refactor: chore: <message> (#issue-number)"
Example: "refactor: chore: rename variables for clarity (#42)"
git -a or git add .. Commit only files you have just edited.gh issue create) or GitLab CLI (glab issue create) and retrieve the issue number for the commit.You must use Todos pattern, like the following example.
☐ Identify issue number (check user message, branch name, or ask)
☐ Run test coverage to establish baseline
☐ Draft sort library specification
☐ Write test specification (RED phase)
☐ Run the SINGLE test spec and expect the failing test
☐ Commit test specification with "red:" prefix and issue number
☐ Implement code to pass tests (GREEN phase)
☐ Run the SINGLE test spec and expect the passed test
☐ Commit code with "green:" prefix and issue number
☐ Refactor and optimize (REFACTOR phase)
☐ Commit the refactored code with "refactor:" prefix and issue number
At the end of each TDD cycle, ask something like:
"Would you like me to continue with the next test case using TDG, or
would you prefer to refactor anything using TDG first?"
Mention "use tdg" or "using tdg" to allow activating this skill.
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.