Token导航 LogoToken导航

Agent Skill · 开发

ring%3atest-driven-development(Ring%3 最驱动的开发)

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

ring%3atest-driven-development 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,暂无第三方扫描结果,按安装量在开发类的 21,746 个 Skill 里排第 13,507。

总安装 888周安装 37GitHub Stars 180下载 296核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ring%3atest-driven-development(Ring%3 最驱动的开发)
来源仓库:https://github.com/lerianstudio/ring
仓库路径:skills/ring%3Atest-driven-development
安装命令:
npx skills add https://github.com/lerianstudio/ring --skill ring:test-driven-development
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/lerianstudio/ring --skill ring:test-driven-development

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

用于辅助测试设计、自动化测试、用例整理和回归验证。适合编写单元测试、端到端测试或根据失败日志定位问题。使用时需确认项目测试框架、运行命令和夹具数据,避免误改逻辑。涉及浏览器或外部服务时,应区分本地模拟与生产环境。

ring%3atest-driven-development 属于开发类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/ring%3Atest-driven-development

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/lerianstudio/ring --skill ring:test-driven-dev…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

ring%3atest-driven-development 怎么安装?

在终端执行 npx skills add https://github.com/lerianstudio/ring --skill ring:test-driven-development。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

ring%3atest-driven-development 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

ring%3atest-driven-development 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

ring%3atest-driven-development 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

ring%3atest-driven-development 用的人多吗?

公开数据是累计安装 888 次,近一周安装 37 次,下载 296 次,GitHub 180 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

ring%3atest-driven-development 安全吗?

没有查到第三方扫描结果,安全性无法从公开资料判断,安装前请自行审查源码、依赖和命令行为。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 没有第三方扫描结果,安全性只能靠自己读源码判断。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 要求有安全扫描结论才肯安装的团队。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
ring%3atest-driven-development

Ring%3 最驱动的开发 · 本页

888180需要联网未明确未收录

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Test-Driven Development (TDD)

Overview

Write the test first. Watch it fail. Write minimal code to pass.

Core principle: If you didn't watch the test fail, you don't know if it tests the right thing.

Violating the letter of the rules is violating the spirit of the rules.

When to Use

Always:

  • New features
  • Bug fixes
  • Refactoring
  • Behavior changes

Exceptions (ask your human partner):

  • Throwaway prototypes
  • Generated code
  • Configuration files

Thinking "skip TDD just this once"? Stop. That's rationalization.

The Iron Law

NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST

Write code before the test? You have ONLY two options:

Violation Handling (Mandatory)

If you wrote code before test:

DELETE IT. IMMEDIATELY.

rm [files]  # or git reset --hard

Not tomorrow. Not after asking. NOW.

Delete means DELETE:

  • rm -rf the_file.py ✓
  • git reset --hard ✓
  • Physically delete ✓

These are NOT deleting (violations):

  • git stash - That's hiding, not deleting
  • mv file.py file.py.bak - That's keeping
  • Copy to clipboard - That's keeping
  • Comment out - That's keeping
  • "Mental note" - That's keeping
  • Asking permission - That's delaying

Delete means gone forever. No recovery possible.

Then start over with TDD.

NO ASKING. NO PERMISSION. NO EXCEPTIONS.

You CANNOT:

  • ❌ Ask "should I delete this?"
  • ❌ Ask "may I proceed with tests-after?"
  • ❌ Request permission due to [any reason]
  • ❌ Explain why deleting is hard
  • ❌ Decide "I'll be pragmatic and test after"
  • ❌ Claim "spirit not letter"
  • ❌ Rationalize "damage already done"
  • ❌ Argue "skill is guide not suicide pact"
  • ❌ Create "pragmatic compliance" category
  • ❌ Mention sunk cost, time pressure, personal plans
  • ❌ Commit anything

If you think you have a legitimate reason to skip deletion:

  • You don't.
  • Delete it.
  • Every excuse is rationalization.
  • Anniversary? Delete code, go to dinner, start fresh tomorrow.
  • Deadline? Delete code, communicate delay, do it right.
  • 4 hours of work? Sunk cost fallacy. Delete it.
  • Manager pressure? Delete it, explain TDD prevents bugs.
  • "But this is different because..." No. Delete it.

The rule has ZERO exceptions. ZERO.

Consequences of NOT Deleting

Untested code WILL cause production incidents. These are CERTAINTIES:

  • Trust: Partner loses confidence permanently. PRs rejected. Assigned bug duty.
  • Production: Incident within 30 days. Worst timing (holiday, 3am). Postmortem responsibility.
  • Career: Reputation as "cuts corners" follows you. Promotion blocked.
  • Personal: Anniversary debugging. Technical debt haunts for years.

❌ "This time is different" → Every developer who thought this experienced these consequences.

The ONLY Acceptable Action

DELETE THE CODE. NOW.

rm /tmp/auth-feature/src/auth.ts
rm /tmp/auth-feature/src/middleware.ts
rm /tmp/auth-feature/src/utils.ts
# or: git reset --hard

Then:

  • Go to anniversary dinner
  • Sleep well
  • Tomorrow morning: Start fresh with TDD
  • Implement in 2-3 hours with tests (faster second time)
  • Code review passes
  • No production incidents
  • Career intact

ZERO exceptions. Anniversary, deadline, manager pressure, sunk cost - NONE of these override deletion.

Prohibited Rationalizations

You CANNOT create alternatives:

  • ❌ "Commit with WIP message" - NO. Delete.
  • ❌ "Commit with 'NO TESTS' warning" - NO. Delete.
  • ❌ "Mark as technical debt" - NO. Delete.
  • ❌ "Email team about violation" - NO. Delete first, communicate after.
  • ❌ "Come early tomorrow to decide" - NO. Delete now, decide nothing.
  • ❌ "Let team decide" - NO. You decide: Delete.
  • ❌ "Write tests tonight after dinner" - NO. Delete, start fresh tomorrow with TDD.
  • ❌ "Commit honestly labeled code" - NO. Honesty is deleting it.
  • ❌ "Present options to partner" - NO. Only one option: Delete.

The skill doesn't offer choices. It commands: DELETE.

If you create ANY alternative to deletion, you violated the skill.

DELETE IT. NOW. NO ALTERNATIVES.

Red-Green-Refactor

Cycle: RED (write failing test) → verify fails → GREEN (minimal code) → verify passes → REFACTOR (clean up) → verify still green → repeat

RED - Write Failing Test

Write one minimal test showing what should happen.

GOOD: test('retries failed operations 3 times',...) - clear name, tests real behavior, one thing.

BAD: test('retry works',...) with mocks - vague name, tests mock not code.

Time limit: <5 minutes. Complex mocks → testing wrong thing. Lots of setup → design too complex. Multiple assertions → split tests.

Requirements:

  • One behavior
  • Clear name
  • Real code (no mocks unless unavoidable)

Verify RED - Watch It Fail

MANDATORY. Never skip.

npm test path/to/test.test.ts

Paste the ACTUAL failure output in your response:

[PASTE EXACT OUTPUT HERE]
[NO OUTPUT = VIOLATION]

If you can't paste output, you didn't run the test.

Required Failure Patterns

Test TypeMust See This FailureWrong Failure = Wrong Test
New featureNameError: function not defined or AttributeErrorTest passing = testing existing behavior
Bug fixActual wrong output/behaviorTest passing = not testing the bug
RefactorTests pass before and afterTests fail after = broke something

No failure output = didn't run = violation

Confirm:

  • Test fails (not errors)
  • Failure message is expected
  • Fails because feature missing (not typos)

Test passes? You're testing existing behavior. Fix test.

Test errors? Fix error, re-run until it fails correctly.

GREEN - Minimal Code

Write simplest code to pass the test.

GOOD: Simple loop with try/catch, just enough to pass. BAD: Adding options, backoff, callbacks (YAGNI).

Don't add features, refactor other code, or "improve" beyond the test.

Verify GREEN - Watch It Pass

MANDATORY.

npm test path/to/test.test.ts

Confirm:

  • Test passes
  • Other tests still pass
  • Output pristine (no errors, warnings)

Test fails? Fix code, not test.

Other tests fail? Fix now.

REFACTOR - Clean Up

After green only:

  • Remove duplication
  • Improve names
  • Extract helpers

Keep tests green. Don't add behavior.

Repeat

Next failing test for next feature.

Good Tests

QualityGoodBad
MinimalOne thing. "and" in name? Split it.test('validates email and domain and whitespace')
ClearName describes behaviortest('test1')
Shows intentDemonstrates desired APIObscures what code should do

Why Order Matters

ArgumentReality
"Tests after verify it works"Tests-after pass immediately → proves nothing. Test-first forces failure → proves test works.
"Already manually tested"Ad-hoc ≠ systematic. No record, can't re-run, easy to forget under pressure.
"Deleting X hours is wasteful"Sunk cost fallacy. Keeping unverified code = tech debt. Delete → rewrite with confidence.
"TDD is dogmatic"TDD IS pragmatic: catches bugs pre-commit, prevents regressions, documents behavior, enables refactoring.
"Spirit not ritual"Tests-after = "what does this do?" Tests-first = "what should this do?" Different questions.

Common Rationalizations

ExcuseReality
"Too simple to test"Simple code breaks. Test takes 30 seconds.
"I'll test after"Tests passing immediately prove nothing.
"Tests after achieve same goals"Tests-after = "what does this do?" Tests-first = "what should this do?"
"Already manually tested"Ad-hoc ≠ systematic. No record, can't re-run.
"Deleting X hours is wasteful"Sunk cost fallacy. Keeping unverified code is technical debt.
"Keep as reference, write tests first"You'll adapt it. That's testing after. Delete means delete.
"Need to explore first"Fine. Throw away exploration, start with TDD.
"Test hard = design unclear"Listen to test. Hard to test = hard to use.
"TDD will slow me down"TDD faster than debugging. Pragmatic = test-first.
"Manual test faster"Manual doesn't prove edge cases. You'll re-test every change.
"Existing code has no tests"You're improving it. Add tests for existing code.

Red Flags - STOP and Start Over

  • Code before test
  • Test after implementation
  • Test passes immediately
  • Can't explain why test failed
  • Tests added "later"
  • Rationalizing "just this once"
  • "I already manually tested it"
  • "Tests after achieve the same purpose"
  • "It's about spirit not ritual"
  • "Keep as reference" or "adapt existing code"
  • "Already spent X hours, deleting is wasteful"
  • "TDD is dogmatic, I'm being pragmatic"
  • "This is different because..."

All of these mean: Delete code. Start over with TDD.

Example: Bug Fix

Bug: Empty email accepted → RED: test('rejects empty email',...) → Verify RED: FAIL: expected 'Email required', got undefined → GREEN: Add if (!data.email?.trim()) return {error: 'Email required'} → Verify GREEN: PASS → REFACTOR: Extract validation if needed.

Verification Checklist

Before marking work complete:

  • Every new function/method has a test
  • Watched each test fail before implementing
  • Each test failed for expected reason (feature missing, not typo)
  • Wrote minimal code to pass each test
  • All tests pass
  • Output pristine (no errors, warnings)
  • Tests use real code (mocks only if unavoidable)
  • Edge cases and errors covered

Can't check all boxes? You skipped TDD. Start over.

When Stuck

ProblemSolution
Don't know how to testWrite wished-for API. Write assertion first. Ask your human partner.
Test too complicatedDesign too complicated. Simplify interface.
Must mock everythingCode too coupled. Use dependency injection.
Test setup hugeExtract helpers. Still complex? Simplify design.

Debugging Integration

Bug found? Write failing test reproducing it. Follow TDD cycle. Test proves fix and prevents regression.

Never fix bugs without a test.

Required Patterns

This skill uses these universal patterns:

  • State Tracking: See skills/shared-patterns/state-tracking.md
  • Failure Recovery: See skills/shared-patterns/failure-recovery.md
  • Exit Criteria: See skills/shared-patterns/exit-criteria.md
  • TodoWrite: See skills/shared-patterns/todowrite-integration.md

Apply ALL patterns when using this skill.


Violation Recovery Quick Reference

ViolationDetectionRecovery
Code before testImplementation exists, no test fileDELETE code (rm), write test, verify RED, reimplement
FALSE GREENTest passes immediately, no implementationTest is broken - make stricter until it fails correctly
Kept "reference"Stash/backup/clipboard existsDelete permanently (git stash drop, rm), start fresh

Why recovery matters: Test must fail first to prove it tests something. Keeping code means you'll adapt it instead of implementing from tests.


Final Rule

Production code → test exists and failed first
Otherwise → not TDD

No exceptions without your human partner's permission.


Blocker Criteria

STOP and report if:

Decision TypeBlocker ConditionRequired Action
Test framework missingCannot run tests in the projectSTOP and install/configure test framework first
Code written firstImplementation exists without corresponding testSTOP and DELETE the code immediately
Test passes immediatelyNew test passes without implementationSTOP and fix test to fail correctly
Cannot reproduce REDUnable to make test fail for expected reasonSTOP and investigate test correctness

Cannot Be Overridden

The following requirements CANNOT be waived:

  • MUST write test before implementation code
  • MUST watch test fail before writing implementation
  • MUST DELETE any code written before its test
  • MUST NOT stash, backup, or keep "reference" of untested code
  • MUST verify test fails for the right reason (missing feature, not typo)

Severity Calibration

SeverityConditionRequired Action
CRITICALCode written before test existsMUST delete code immediately, start over with TDD
HIGHTest passes immediately without implementationMUST fix test to fail correctly before proceeding
MEDIUMTest fails for wrong reason (error vs assertion failure)MUST fix test to fail correctly
LOWTest name unclear or multiple assertionsShould refactor test for clarity

Pressure Resistance

User SaysYour Response
"Just write the code, we'll add tests later""CANNOT write code without test first. Tests-after prove nothing. Will write test now."
"I already spent 4 hours on this code""MUST delete it. Sunk cost fallacy. Untested code will cause production incidents."
"Keep it as reference and write tests first""CANNOT keep reference. That's not deleting. Will start fresh with TDD."
"TDD is too slow, deadline is tomorrow""CANNOT skip TDD due to deadline. TDD is faster than debugging. Will proceed with TDD."

Anti-Rationalization Table

RationalizationWhy It's WRONGRequired Action
"Code is simple, doesn't need TDD"Simple code breaks. TDD takes 30 seconds. Complexity is not the criterion.MUST follow TDD regardless of simplicity
"I'll test thoroughly after implementing"Tests-after pass immediately, proving nothing. Test must fail first.MUST write failing test before code
"Deleting my work is wasteful"Sunk cost fallacy. Keeping untested code is technical debt that costs more later.MUST delete code, start fresh with TDD
"I already manually tested it works"Manual testing is ad-hoc and not reproducible. No record, can't re-run.MUST have automated test that failed first
"Spirit of TDD matters, not the ritual"The ritual IS the spirit. Tests-first asks "what should this do?" not "what does this do?"MUST follow RED-GREEN-REFACTOR exactly

平台分布

Codex

35.44%
按下载量换算105

Claude

27.38%
按下载量换算81

Cursor

18.56%
按下载量换算55

Gemini CLI

9.54%
按下载量换算28

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills