test-driven-development

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

适合修复 bug 与迭代变更,提升代码可维护性与可信度。

这个 Skill 做什么

以先写失败测试再实现的方式驱动开发,保证行为可验证。

先写一个会失败的测试,再写实现让它通过,用测试来驱动开发和验证行为。修 bug、改功能或新增逻辑时都用,先用测试复现问题可以防止回归。测试是可证明的质量标准,能让重构更安全,也方便自动化和团队协作。

▸ 展开 SKILL.md 英文原文

Drives development with tests. Use when implementing any logic, fixing any bug, or changing any behavior. Use when you need to prove that code works, when a bug report arrives, or when you're about to modify existing functionality.

开发编程单元测试TDD回归防护通用
0
Stars
0
Forks
25
仓库内 Skill
+0
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/kulapoo/opencode-agent-harness/main/skills/test-driven-development/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/kulapoo/opencode-agent-harness/main/skills/test-driven-development/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# Test-Driven Development

## Overview

Write a failing test before writing the code that makes it pass. For bug fixes, reproduce the bug with a test before attempting a fix. Tests are proof — "seems right" is not done. A codebase with good tests is an AI agent's superpower; a codebase without tests is a liability.

## When to Use

- Implementing any new logic or behavior
- Fixing any bug (the Prove-It Pattern)
- Modifying existing functionality
- Adding edge case handling
- Any change that could break existing behavior

**When NOT to use:** Pure configuration changes, documentation updates, or static content changes that have no behavioral impact.

**Related:** For browser-based changes, co
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有