Token导航 LogoToken导航

Agent Skill · 研究检索

dev-tdd(开发 TDD)

dev-tdd 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

dev-tdd 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 72,323。

总安装 188周安装 8GitHub Stars 公开资料未说明下载 66核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/badrusiddique/enggenie-skill --skill dev-tdd

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

dev-tdd 强制实施测试驱动开发纪律,禁止在未编写失败测试前提交生产代码。它在任何编码任务中生效,无论来源是计划、缺陷修复还是功能新增,确保每次改动都有验证基础。通过即时提醒与规则拦截,培养良好习惯,降低回归风险与线上故障概率。使用前请确保测试框架就绪,注意该技能不替代设计思考,仅约束编码行为本身。

dev-tdd 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/dev-tdd

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

dev-tdd 怎么安装?

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

dev-tdd 支持哪些 AI 工具?

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

dev-tdd 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

dev-tdd 是免费的吗?

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

dev-tdd 用的人多吗?

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

dev-tdd 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

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

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
dev-tdd

开发 TDD · 本页

188—只读未明确通过

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

SKILL.md 原文

dev-tdd

Overview

No production code without a failing test first.

This is a discipline overlay, not a workflow step. It fires during ANY coding task - whether you're working from a plan, fixing a bug, adding a feature, or refactoring. There is no entry gate and no exit gate. If you're writing code, TDD rules are active.

The cycle is simple. The discipline is what matters.

Announcement

When this skill is active, announce:

"I'm using enggenie:dev-tdd to enforce test-driven development."

Hard Rule: No Production Code Without a Failing Test First

If you catch yourself writing production code before a test: stop. Delete it. Write the test first.

No exceptions. No "just this once." No "I'll circle back." The test comes first or the code doesn't get written.


Violating the Letter of TDD Is Violating the Spirit

There is no distinction between the letter and the spirit of TDD. The spirit IS the letter.

Writing a test that you know will pass is not TDD. Writing two tests before implementing is not TDD. Writing production code and then backfilling a test is not TDD. These aren't "close enough." They're a different practice entirely.

The value of TDD comes from the discipline of the cycle. Skip a step and you lose the feedback loop that makes it work.


The Cycle: RED -> GREEN -> REFACTOR

Every piece of new behavior follows this cycle. Every time. No shortcuts.

RED - Write a Failing Test

  1. Write ONE minimal test that describes the next piece of behavior.
  2. Run the test.
  3. It MUST fail (not error - fail). A compilation error or import error is not RED. RED means the test ran and the assertion failed.
  4. Read the failure message. It should describe the missing behavior clearly. If the failure message is confusing, fix the test before proceeding.

Verification: You saw a clear, expected failure message. The test ran. The assertion failed for the right reason.

GREEN - Make It Pass

  1. Write the simplest code that makes the failing test pass. Not the clever code. Not the complete code. The simplest.
  2. Run the test. It MUST pass.
  3. Run ALL tests. They MUST all pass. If something else broke, fix it before moving on.

Verification: The new test passes. All existing tests still pass. You wrote minimal code - nothing beyond what the test demanded.

REFACTOR - Clean Up

  1. Look at the code you just wrote. Look at the test you just wrote. Is there duplication? Poor naming? Unnecessary complexity?
  2. Clean it up. Extract. Rename. Simplify.
  3. Run ALL tests after every change. They MUST stay green.
  4. No new behavior during refactor. If you want new behavior, start a new RED.

Verification: Tests are still green. Code is cleaner. No new behavior was added.

Then start the cycle again.


Worked Example: Bug Fix with TDD

Scenario: Email validation accepts "user@" as valid.

RED - Write the failing test:

def test_rejects_email_without_domain():
    assert validate_email("user@") == False

Run: pytest tests/test_email.py::test_rejects_email_without_domain

FAILED - assert True == False

Good. The test fails because the current code does not check for a domain.

GREEN - Write the simplest fix:

def validate_email(email: str) -> bool:
    if "@" not in email:
        return False
    local, domain = email.rsplit("@", 1)
    return len(local) > 0 and len(domain) > 0

Run: pytest tests/test_email.py

4 passed

All tests pass. Do NOT add more validation yet.

REFACTOR - Clean up while tests stay green: No refactoring needed - the code is already clean.


Good test vs Bad test:

AspectGoodBad
Nametest_rejects_email_without_domaintest_email_validation
Assertionassert validate_email("user@") == Falseassert result is not None
ScopeTests ONE behaviorTests multiple behaviors
Failure message"assert True == False" tells you what broke"AssertionError" tells you nothing

The Shortcut Tax

Every shortcut has a cost. Here's what you're actually paying.

ShortcutWhat it costs you
"I'll write tests after"Tests pass immediately - you've proved nothing. Bugs ship.
"Too simple to test"Simple code breaks. 30 seconds to test. 30 minutes to debug in prod.
"Already manually tested"No record. Can't re-run. You'll re-test every change by hand forever.
"TDD slows me down"TDD is faster than debugging. Systematic beats ad-hoc.
"Just this once"That's what you said last time. Discipline compounds.
"Keep the code as reference"You'll adapt it instead of writing tests first. Delete means delete.
"Need to explore first"Fine. Explore. Then throw it away. Start fresh with TDD.
"The test is hard to write"Hard to test = hard to use = bad design. Simplify the interface.
"Tests after achieve same goals"After answers "what does this do?" First answers "what should it do?"
"Existing code has no tests"You're improving it. Add tests for what you touch.
"I already see the problem"Seeing symptoms does not equal understanding root cause. Write the test.

Deep Rebuttals -- When the Shortcut Tax Table Is Not Enough

The table above is quick reference. Below are the full arguments for the 5 most dangerous rationalizations. Use these when you (or the user) need the complete reasoning.

"I'll write tests after to verify it works"

Tests written after code pass immediately. Passing immediately proves nothing:

  • You might test the wrong thing (testing what you built, not what was required)
  • You might test implementation details instead of behavior
  • You missed edge cases you forgot about during implementation
  • You never saw the test catch the bug -- so you cannot trust it catches anything

Test-first forces you to see the test fail, proving it actually tests something. A test that never failed is a test you cannot trust.

"I already manually tested all the edge cases"

Manual testing is ad-hoc. You think you tested everything but:

  • There is no record of what you tested
  • You cannot re-run the same tests when code changes next week
  • Under pressure, you forget cases
  • "It worked when I tried it" is anecdote, not evidence

Automated tests are systematic. They run the same way every time. They catch regressions you forgot to re-test. They document what was verified.

"Deleting X hours of work is wasteful"

Sunk cost fallacy. The time is already spent. Your choice now:

  • Delete and rewrite with TDD (X more hours, but high confidence the code works)
  • Keep it and add tests after (30 minutes, but low confidence -- likely bugs hiding)

The "waste" is keeping code you cannot trust. Working code without real tests is technical debt that compounds every sprint. The faster path is the disciplined path.

"TDD is dogmatic -- being pragmatic means adapting"

TDD IS pragmatic:

  • Finds bugs before commit (faster than debugging after deployment)
  • Prevents regressions (tests catch breaks immediately, not in QA or production)
  • Documents behavior (tests show how to use the code -- they are living documentation)
  • Enables fearless refactoring (change anything, tests catch breaks)

"Pragmatic" shortcuts lead to debugging in production, which is slower, more expensive, and more stressful. Discipline IS pragmatism.

"Tests after achieve the same goals -- it's the spirit, not the ritual"

No. Tests-after answer "What does this code do?" Tests-first answer "What should this code do?"

Tests-after are biased by your implementation. You test what you built, not what was required. You verify the edge cases you remembered, not the ones you would have discovered by writing the test first.

Tests-first force edge case discovery BEFORE implementation. You think about failure modes while designing the interface, not while verifying the output. 30 minutes of tests-after gives you coverage. TDD gives you proof that the tests actually work.


Gut Check

STOP and start over if any of these are true:

  • You wrote production code before writing a test
  • Your test passed immediately (you never saw RED)
  • You're writing multiple tests at once before implementing
  • You're "just going to quickly add" something without a test
  • You're thinking "this case is different because..."
  • You're keeping deleted code "as reference"
  • You wrote tests after implementation → Delete the code. Write the test. Watch it fail. Rewrite.
  • You can't explain why a test failed → You don't understand the code. Investigate before proceeding.
  • You're thinking "I already spent X hours on this code, deleting is wasteful" → Sunk cost fallacy. Delete it. TDD code is faster to rewrite than debug.
  • You're thinking "TDD is dogmatic, I'm being pragmatic" → Pragmatic means following processes that work. TDD works. Skipping it is not pragmatic, it's reckless.

If you hit any of these: stop. Delete the production code. Go back to RED.


Exceptions (Require Explicit User Permission)

These are the ONLY acceptable reasons to skip TDD. Each requires the user to explicitly say "skip TDD for this":

  • Throwaway prototypes - Code that will be deleted before merge. Not "might be deleted" - WILL be deleted.
  • Generated code - Auto-generated files (migrations, scaffolds, codegen output). Not hand-written code that "feels generated."
  • Configuration files - Pure config with no logic (JSON, YAML, env files). Not config that contains conditional logic.

If you catch yourself thinking "this is basically an exception" - it's not. Ask the user.


When Stuck

ProblemSolution
Don't know how to testWrite the wished-for API. Write the assertion first. Work backwards.
Test too complicatedDesign too complicated. Simplify the interface.
Must mock everythingCode too coupled. Use dependency injection. Reduce dependencies.
Test setup hugeExtract helpers. Simplify the design. If setup is painful, the API is painful.

Good Tests

A good test has three qualities:

Minimal - Tests one thing. One behavior. One assertion where possible. When it fails, you know exactly what broke.

Clear - The test name describes the behavior, not the implementation. test_returns_empty_list_when_no_items tells you more than test_get_items.

Shows intent - The test demonstrates the desired API. Reading the test tells you how the code should be used. It's the first consumer of your design.


Verification Checklist

Before marking ANY coding task complete, verify:

  • Every new function/method has a test
  • Watched each test fail before implementing (saw RED)
  • Each test failed for the expected reason (correct failure message)
  • Wrote minimal code to pass (no speculative generality)
  • All tests pass (full suite, not just the new test)
  • Tests use real code (mocks only when unavoidable - external services, file systems, network)
  • Edge cases and error paths are covered

If any box is unchecked, you're not done.


Supporting References

  • references/testing-anti-patterns.md - Never test mock behavior, never add test-only methods to production code, mock COMPLETE data structures not partial ones
  • references/defense-in-depth.md - Validate at every layer, make bugs structurally impossible through types and constraints

These references contain detailed patterns. Read them when you need specifics on test structure or validation strategy.


Relationship to enggenie:dev-implement

enggenie:dev-implement orchestrates implementation work - it manages plans, dispatches subagents, and coordinates multi-step tasks.

enggenie:dev-tdd is a discipline overlay that fires during ANY coding, whether or not dev-implement is active. It is not a step in a workflow. It is the way code gets written.

When dev-implement is active, dev-tdd's rules are enforced through the implementer subagent prompt. The subagent follows the RED-GREEN-REFACTOR cycle for every piece of code it writes.

When dev-implement is NOT active (ad-hoc coding, quick fixes, explorations that turn into real code), dev-tdd still fires. The discipline does not depend on having a plan.


Recommended Model

Primary: sonnet Why: TDD requires balanced speed and code quality. Sonnet writes good tests and clean implementations without the latency of opus. For complex domain logic, override to opus.

This is a recommendation. Ask the user: "Confirm model selection or override?" Do not proceed until the user responds.


Entry / Exit

Entry: None. This skill fires during any coding task. No trigger required.

Exit: None. This is a discipline overlay, not a workflow step. It remains active as long as code is being written.

平台分布

Codex

37.91%
按下载量换算25

Claude

30.29%
按下载量换算20

Cursor

18.35%
按下载量换算12

Gemini CLI

10.78%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

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

继续浏览同类 Skills