一键导入
tdd
Test-Driven Development workflow. Tests BEFORE code. Red-green-refactor cycle. Triggers: tdd, test-first, test-driven, red-green, coverage.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Test-Driven Development workflow. Tests BEFORE code. Red-green-refactor cycle. Triggers: tdd, test-first, test-driven, red-green, coverage.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Solution exploration and implementation. Generate 2-3 approaches, pick simplest. Never implement first idea. Triggers: build, implement, create, feature, add.
Systematic debugging methodology based on Zeller's scientific method. Reproduce, hypothesize, predict, test, isolate via binary search, fix root cause. Every fix gets a regression test. Triggers: bug, error, fix, broken, not working, fails, crashed, unexpected, stack trace, regression, exception.
Testing methodology and strategy. Tests prove behavior, not implementation. Triggers: test, tests, coverage, assertion, mock, fixture, spec, verify.
Git workflow and version control best practices. Atomic commits, conventional messages, branch strategies, merge protocols. Triggers: commit, branch, merge, rebase, git, push, pull, PR, version control.
Security best practices and vulnerability prevention. Input validation, authentication, secrets management, OWASP top 10. Triggers: security, auth, authentication, secrets, credentials, vulnerability, injection, XSS, CSRF, rate-limit.
REST API design patterns. Resource naming, status codes, pagination, error responses, versioning. Triggers: api, rest, endpoint, route, http, status-code, pagination.
基于 SOC 职业分类
| name | tdd |
| description | Test-Driven Development workflow. Tests BEFORE code. Red-green-refactor cycle. Triggers: tdd, test-first, test-driven, red-green, coverage. |
| allowed-tools | Read, Bash, Write, Edit, Grep, Glob |
<core_principles>
<anti_patterns> Writing code then tests validates bugs. Test first or not at all. Test behavior, not structure. Refactoring should not break tests. One behavior per test. If you need "and", split the test. Use semantic selectors ([data-testid], role), not CSS classes. Each test must be independent. No shared state between tests. </anti_patterns>
<on_complete> agentdb write-end '{"skill":"tdd","tests_written":,"coverage":"<X%>","cycle":"red->green->refactor","failures_caught":[""]}'
Record test count, coverage achieved, and what edge cases the tests catch. </on_complete>