Test-Driven Generation uses TDD (Test-Driven Development) techniques to generate tests and code in Red-Green-Refactor loops. Key words to detect are tdg, 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.
npx skills add chanwit/TDG Test-Driven Generation下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer