用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/bobmatnyc/claude-mpm --skill test-driven-development命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
MCP (Model Context Protocol) - Build AI-native servers with tools, resources, and prompts. TypeScript/Python SDKs for Claude Desktop integration.
Model Context Protocol (MCP) server build and evaluation guide, including local conventions for tool surfaces, config, and testing
Control monitoring server and dashboard
| name | test-driven-development |
| description | Write the test first, watch it fail, write minimal code to pass |
| version | 3.2.0 |
| category | testing |
| author | Jesse Vincent |
| license | MIT |
| source | https://github.com/obra/superpowers-skills/tree/main/skills/testing/test-driven-development |
| progressive_disclosure | {"entry_point":{"summary":"Enforce test-first development with strict RED/GREEN/REFACTOR cycle. Never write implementation before failing test.","when_to_use":"When implementing any feature or bugfix, before writing implementation code. Always for new features, bug fixes, refactoring, and behavior changes.","quick_start":"1. Write failing test 2. Watch it fail (verify) 3. Write minimal code to pass 4. Watch it pass (verify) 5. Refactor if needed 6. Repeat"},"references":["workflow.md","examples.md","philosophy.md","anti-patterns.md","integration.md"]} |
| context_limit | 800 |
| tags | ["tdd","testing","red-green-refactor","test-first"] |
| effort | high |
Write the test first. Watch it fail. Write minimal code to pass.
Core principle: If you didn't watch the test fail, you don't know if it tests the right thing.
This skill enforces strict test-first development following the RED/GREEN/REFACTOR cycle. Violating the letter of the rules is violating the spirit of the rules.
Always:
Exceptions (ask human partner):
Thinking "skip TDD just this once"? Stop. That's rationalization.
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
Write code before the test? Delete it. Start over.
No exceptions:
RED → Verify RED → GREEN → Verify GREEN → REFACTOR → Repeat
RED: Write one minimal test (one behavior, clear name, real code) Verify RED: MANDATORY - watch it fail for right reason GREEN: Write simplest code to pass (no extras) Verify GREEN: MANDATORY - watch it pass, all tests pass REFACTOR: Clean up while keeping tests green (optional)
基于 SOC 职业分类
For detailed information:
If you catch yourself:
ALL of these mean: Delete code. Start over with TDD.
Tests-after pass immediately (proves nothing), test-first fail then pass (proves it works). See Philosophy for detailed explanation.
From TDD practice:
TDD is pragmatic - finds bugs before commit, prevents regressions, documents behavior, enables refactoring.