1075551341/claude_code_config/test-driven-development
Claude Code and agent skill by 1075551341/claude_code_config
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
遵循TDD流程开发功能,RED-GREEN-REFACTOR循环
Install
npx vskill@latest install 1075551341/claude_code_config/test-driven-developmentSKILL.md
The same SKILL.md was published earlier as 1075551341/claude_code_config/test-driven-development.
测试驱动开发(TDD)
@Examples
核心理念
RED-GREEN-REFACTOR 循环:先写失败测试,再实现功能,最后重构优化。
三阶段循环
RED:写失败测试
测试结构:
原则:
- 一个测试一个断言
- 测试名称描述行为,不是"测试 X"
- 测试应失败并给出清晰原因
GREEN:最小实现
原则:
- 最小改变
- 不添加额外功能
- "作弊"通过比过度实现好
REFACTOR:优化清理
重构清单:
- 重复代码 → 提取函数
- 长函数 → 拆分
- 魔法数字 → 常量
- 复杂条件 → 策略模式
测试命名规范
测试框架选择
| 语言 | 推荐 | |
|---|---|---|
| JavaScript/TypeScript | Jest, Vitest | |
| Python | pytest | |
| Go | testing 包 | |
| Java | JUnit 5 | |
| Rust | cargo test |
相关技能
- 测试规范 →
rules/CORE.md代码规范·测试节 systematic-debugging- 调试流程code-refactoring- 重构技巧
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/test-driven-development/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/1075551341/claude_code_config/test-driven-development)