🧪
QualityJavaScript

Test-Driven Development

by jnMetaCode

Test-Driven Development is a Quality skill for Claude Code, published by jnMetaCode in superpowers-zh.

7.7K stars729 forkson jnMetaCode/superpowers-zhAdded 2026/08/15Repository updated 2026/08/12
agent-skillsagentic-codingai-codingchineseclaude-codecode-reviewcursorgemini-clikiromcpnpm-packageprompt-engineeringskillssuperpowerstddtrae
Install in seconds
Install Test-Driven Development
Copy Test-Driven Development into your Claude Code skills folder. Run the command in your terminal, or review the source on GitHub before installing.
terminal
npx degit https://github.com/jnMetaCode/superpowers-zh/tree/main/skills/test-driven-development ~/.claude/skills/test-driven-development

Requires Node.js. Downloads this skill only — not the rest of the repository — into your Claude Code skills folder.

Without Node.js

git clone https://github.com/jnMetaCode/superpowers-zh.git

Clones the whole repository, then copy the skill’s own directory into your skills folder yourself.

In this catalog

Source file
skills/test-driven-development/SKILL.md in jnMetaCode/superpowers-zh
Installs to
~/.claude/skills/test-driven-development
Collection
One of 20 skills cataloged from this repository
Category
Quality1354 skills

What Test-Driven Development does

Test-Driven Development enforces a test-first workflow: write a failing test, see it fail, then write the minimum code to pass before refactoring. Use it for new features, bug fixes, refactors, and behavior changes; no production code without a failing test.

Test-Driven Development is cataloged under Quality on DirSkills. Test-Driven Development comes from a repository tagged agent-skills, agentic-coding, ai-coding, chinese and claude-code.

Documentation

README

测试驱动开发(TDD)

概述

先写测试。看它失败。写最少的代码让它通过。

核心原则: 如果你没有看到测试失败,你就不知道它是否测试了正确的东西。

违反规则的字面意思就是违反规则的精神。

何时使用

始终使用:

  • 新功能
  • Bug 修复
  • 重构
  • 行为变更

例外(需询问你的人类伙伴):

  • 一次性原型
  • 生成的代码
  • 配置文件

想着"就这一次跳过 TDD"?停下来。那是在给自己找借口。

铁律

没有失败的测试,就不写生产代码

先写了代码再写测试?删掉它。从头来过。

没有例外:

  • 不要保留作为"参考"
  • 不要在写测试时"改编"它
  • 不要看它
  • 删除就是删除

从测试出发,重新实现。句号。

红-绿-重构

This is the opening of the README. Read the full README on GitHub.

Frequently asked about Test-Driven Development

  • What else does jnMetaCode publish alongside Test-Driven Development?

    Test-Driven Development is one of 20 skills that DirSkills catalogs from jnMetaCode/superpowers-zh, the repository it ships in. Its siblings there include Brainstorming, Chinese Code Review and Chinese Commit Conventions. Each one is a separate skill with its own page in this directory, installs the same way Test-Driven Development does, and is maintained by jnMetaCode in that same repository. The rest of the collection is listed on the jnMetaCode/superpowers-zh page.

  • How does Test-Driven Development compare to other Quality skills?

    Test-Driven Development ranks #238 by stars among the 1354 Quality skills in this catalog. The most-starred ones next to it are Benchmark, Benchmark Optimization Loop and API Design Patterns. DirSkills ranks by the star count of the repository each skill ships in, so that order reflects how popular those repositories are rather than any review of Test-Driven Development against them. Open each page to compare what they document and how they install.

More from jnMetaCode/superpowers-zh

Test-Driven Development is one of 20 skills cataloged on DirSkills from jnMetaCode/superpowers-zh.

See all 20 skills
💡
2w ago

Brainstorming

Brainstorming turns ideas into design specifications through collaborative questioning before any implementation work. Use it before creating features, building components, adding functionality, or modifying behavior to explore user intent, requirements, and design.
AI Engineering
7.7K729
💬
2w ago

Chinese Code Review

Chinese Code Review provides communication templates and priority labels (must-fix/suggest/for-reference) for giving code review feedback in Chinese teams, avoiding over-politeness or bluntness. Use when explicitly invoked via /chinese-code-review to conduct or guide a code review.
Quality
7.7K729
📝
2w ago

Chinese Commit Conventions

Chinese Commit Conventions adapts Conventional Commits for Chinese teams with type tables, commit message templates, breaking change rules, issue linking, and changelog generation configs. Use it to set up commitlint, husky, and commitizen for Chinese-language commit workflows.
Quality
7.7K729
📝
2w ago

Chinese Documentation

Chinese Documentation provides a style guide for Chinese technical documentation, covering spacing, punctuation, terminology, and bilingual API doc formats. Use it when a user explicitly invokes /chinese-documentation to improve the readability and consistency of Chinese technical writing.
Writing
7.7K729
🔧
2w ago

Chinese Git Workflow

Chinese Git Workflow documents configuration differences for Gitee, Coding.net, Jihu GitLab, and CNB, covering SSH/HTTPS credentials, remote mirror sync, and CI/CD integration. Use it when setting up or standardizing Git workflows for teams in China.
DevOps
7.7K729
🤖
2w ago

Dispatching Parallel Agents

Dispatching Parallel Agents delegates independent debugging tasks to parallel subagents with isolated contexts, so each can work on a separate problem without interference. Use it when multiple unrelated test failures or subsystem issues can be investigated concurrently.
AI Engineering
7.7K729