tdd

仓库创建 2026年7月2日最近提交 22 天前SkillHot 收录 22 天前
▸ 精选理由

能把测试先行的流程落地为可操作步骤,对提升代码质量有明显帮助。

这个 Skill 做什么

按照 TDD 工作流引导或审计测试编写,执行红-绿-重构周期并建议覆盖改进。

按 TDD 流程引导或审计测试写法:先写失败的测试(Red),实现让测试通过(Green),再重构(Refactor),并建议如何补齐覆盖。可以按文件或模块范围执行,也会扫描代码库找缺失的测试并给出计划。适合想把测试写在前面、保持稳定回归的开发流程。

▸ 展开 SKILL.md 英文原文

Test-Driven Development skill. Guides writing tests before implementation — test-first workflow, co-located test files, and boundary mocking. Enforces Red-Green-Refactor cycle.

开发编程测试驱动单元测试质量保障通用
0
Stars
0
Forks
35
仓库内 Skill
+0
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/dustinkeeton/wafflestack/main/stacks/code-quality/skills/tdd/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/dustinkeeton/wafflestack/main/stacks/code-quality/skills/tdd/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# Test-Driven Development (TDD)

When this skill is invoked, follow the TDD workflow below. If invoked with arguments (e.g., `/tdd src/shared/validation.ts`), scope the work to that file or module. If invoked without arguments, audit the codebase for missing test coverage and propose a plan.

## Framework & Structure

- **Test runner:** the project's standard runner — `{{project.testCmd}}` runs the suite
- **Test files:** Co-located next to source as `<name>.test.<ext>` (e.g., `src/shared/validation.test.ts`)
- **Test utilities:** a central test-utils directory (e.g., `src/__test-utils__/`) — mock factories, fixtures, helpers

## Red-Green-Refactor Cycle

When implementing a new function, cl
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有