Token导航 LogoToken导航TokenDH.com
前端设计执行命令unknown未标认证来源可访问许可证需确认审计未展示

tdd-workflowTDD 工作流程

Agent Skill

tdd-workflow 用于辅助测试设计、自动化测试和回归验证,适合在 Local Agent 中需要补充测试、分析失败日志或验证功能改动时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,236

周安装

52

下载量

433
Local Agent

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:tdd-workflow(TDD 工作流程)
来源仓库:https://smithery.ai
仓库路径:tdd-workflow
安装命令:
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。当前暂无明确安装命令,请以来源页面说明为准。

简介

tdd-workflow 用于辅助测试设计、自动化测试和回归验证,适合在 Local Agent 中补充测试流程时使用。

  • 支持测试计划制定、用例整理与失败场景复现分析。
  • 可与前端项目结合,提供组件级测试策略建议。
  • 使用前需明确测试框架类型与执行环境,防止因模拟测试导致逻辑失真。
  • 具体集成方式请参考原始仓库文档。

SKILL.md

Test-Driven Development Workflow

Follow this mandatory workflow when writing tests and implementing features.

Scope — When to Apply This Skill

Apply this workflow to changes whose behavior is meaningfully testable. The core-philosophy rule already says "not every change requires tests"; this section makes that boundary concrete.

In scope (TDD applies):

  • Production code that implements decisions, transformations, or state changes (parsers, business rules, API handlers, reducers, algorithms)
  • Bug fixes for behavior that can be reproduced as a test case
  • Refactors of code already covered by tests — tests guard the refactor

Out of scope (TDD does not apply, though basic verification is still expected):

  • Shell aliases, environment exports, or other dotfile edits whose "behavior" is just being present in a config file
  • Pure documentation changes, comments, formatting
  • Trivial wiring such as adding a constant export, registering a pre-existing component, or renaming a symbol the type system already validates
  • Editor / tool / CI configuration where the round-trip cost of a test exceeds its value (verify by running the tool itself instead)

When in doubt, ask: *"Could a future regression here go unnoticed without a test?"* If yes, this skill applies.

The TDD Cycle

1. RED - Write a Failing Test First

  • Write a test that describes the expected behavior
  • Run the test - it MUST fail
  • If it passes, the test is not testing new functionality

2. GREEN - Write Minimal Implementation

  • Write the simplest code that makes the test pass
  • Do not add extra functionality
  • Run the test - it MUST pass now

3. IMPROVE - Refactor

  • Clean up the code while keeping tests green
  • Remove duplication
  • Improve naming and structure
  • Review tests for scaffolding remnants -- Remove or consolidate tests that were written solely to drive the RED phase and are now redundant. Examples of scaffolding tests to remove:

- Tests that only verify a function/class/module exists - Tests that only assert a dependency is or isn't called, when the same behavior is already covered by a higher-value test - Tests that became duplicates of other tests after refactoring The code-review skill flags leftover scaffolding as Warnings.

  • Run tests after each refactor to ensure they still pass

4. LINT - Run Linters

  • Identify the linters configured in the project (e.g., config files, CI workflows, package.json scripts, Makefile targets)
  • Run all applicable linters and fix any violations before committing
  • If a fix changes behavior, re-run the full test suite and return to the RED/GREEN cycle to update or add tests as needed

When to Use Mocks/Stubs

Mocks and stubs should be avoided when possible, but use them when:

  • The test target requires external access (REST API calls, database, third-party services)
  • The test target requires I/O that produces non-deterministic output (timestamps, random values)
  • The dependency is slow or expensive to set up

Best Practices

  1. One behavior per test — Each test should verify one specific behavior. Multiple assertions are fine when they all describe the same behavior (e.g., asserting both the returned status code and the response body of a single request); avoid bundling unrelated behaviors into one test.
  2. Descriptive test names - Test names should describe what is being tested and expected outcome
  3. Arrange-Act-Assert - Structure tests with clear setup, action, and verification phases
  4. Test edge cases - Include tests for boundary conditions, empty inputs, and error scenarios
  5. Keep tests fast - Unit tests should run in milliseconds

Example Workflow

1. Define the interface/contract first
2. Write test: "should return empty array when no items exist"
3. Run test -> FAIL (function doesn't exist)
4. Implement: return []
5. Run test -> PASS
6. Write test: "should return all items when items exist"
7. Run test -> FAIL
8. Implement: add logic to return items
9. Run test -> PASS
10. Refactor if needed; review and remove scaffolding tests that are now redundant
11. Run project linters -> fix violations
12. Run tests -> PASS (confirm lint fixes didn't break anything)

Coverage Target

Coverage targets are project policy first. If the project defines a target (in CONTRIBUTING.md, a coverage configuration file, CI gates, or an explicit team decision), follow that. If no project target exists, use 80% as a working default. Either way, prioritize meaningful tests over chasing the number — coverage of code that matters beats high coverage of trivial getters and wiring.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Local Agent

71.87%
按下载量换算311

安全审计

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

权限和风险

执行命令

安装流程涉及命令执行,可能通过 第三方 CLI 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

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

来源信息

继续浏览同类 Skills