fec-tdd-workflow

fec-tdd-workflow is a skill for Claude Code from bovinphang/frontend-craft. It costs 80 tokens per session (759 once invoked), scanned A, original, MIT.

A frontend test-driven development workflow, or TDD, describes the expected behavior with a failing test, implements the smallest change to pass it, and then refactors. It covers UI components, hooks, API clients, route guards, and user workflows.

In plain words
What is it for?
Use it to develop or repair frontend behavior with unit, component, integration, or end-to-end tests. For bug fixes, it helps preserve a regression test that reproduces the original problem.
Why use it?
It catches regressions by testing behavior before or alongside implementation, instead of adding tests only after the code is finished. It also keeps fixes and new features focused on a clearly described outcome.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the frontend-craft plugin — 56 skills, 11 commands, 14 agents, 5 hooks, 6 MCP servers shipped together

Good fit Use it to develop or repair frontend behavior with unit, component, integration, or end-to-end tests. For bug fixes, it helps preserve a regression test that reproduces the original problem.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bovinphang/frontend-craft/fec-tdd-workflow
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add bovinphang/frontend-craft --skill fec-tdd-workflow
Clone the repo
git clone --depth 1 https://github.com/bovinphang/frontend-craft

Made for: Claude Code.

Or install frontend-craft, the plugin that ships this one along with the rest of its 56 skills, 11 commands, 14 agents, 5 hooks, 6 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fec-tdd-workflow

README.md
[![agentmods](https://agentmods.dev/badge/skills/bovinphang/frontend-craft/fec-tdd-workflow/github.svg)](https://agentmods.dev/skills/bovinphang/frontend-craft/fec-tdd-workflow)
Your own site
<a href="https://agentmods.dev/skills/bovinphang/frontend-craft/fec-tdd-workflow"><img src="https://agentmods.dev/badge/skills/bovinphang/frontend-craft/fec-tdd-workflow/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fec-tdd-workflow

Your own site · 80×15
<a href="https://agentmods.dev/skills/bovinphang/frontend-craft/fec-tdd-workflow"><img src="https://agentmods.dev/badge/skills/bovinphang/frontend-craft/fec-tdd-workflow.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 759 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00080 $0.00759
Opus 5 $0.00040 $0.00380
Sonnet 5 $0.00016 $0.00152
Haiku 4.5 $0.00008 $0.00076

Measured 6d ago against content hash 40db050aaa53, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

fec-tdd-workflow scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

localized/zh-CN/skills/fec-tdd-workflow/SKILL.md · 56 lines

What it actually says

前端 TDD 工作流

用途

用“先写失败测试,再实现最小代码,再重构”的节奏交付前端功能,避免只在实现后补覆盖率。

流程

  1. 识别可观察行为:用户能看到的 UI、组件契约、hook/composable 返回值、路由守卫结果、API client 输出或错误状态。
  2. 先写一个最小失败测试:
    • 纯逻辑优先单元测试。
    • 组件交互优先 Testing Library / Vue Test Utils。
    • 跨页关键流程优先 Playwright / Cypress。
  3. 运行该测试并确认失败原因正确,失败应来自行为尚未实现,而不是语法、导入或测试环境错误。
  4. 写刚好能通过测试的最小实现,不顺手扩大范围。
  5. 重新运行测试,确认变绿。
  6. 在测试保持通过的前提下重构命名、边界和重复逻辑。
  7. 对 bug 修复,保留能复现问题的回归测试。
  8. 每轮只扩大一个可观察行为;新需求、新边界和新异常路径各自进入下一轮。

证明式测试模式

修复缺陷时先让测试失败,再让它通过。若无法先失败,说明测试没有覆盖原始问题,需要收窄输入、断言或测试层级。

前端测试选择

Risk Preferred Test
utils、schema、状态计算 单元测试
hooks / composables 单元或轻量集成测试
组件 props、emits、交互、状态 组件测试
Router、Provider、Store 协作 轻量集成测试
登录、支付、权限、关键 CRUD E2E 测试

约束

  • 不为了 TDD 引入项目没有使用且收益不清晰的新测试框架。
  • 不测试实现细节、私有状态或脆弱 DOM 结构。
  • 不把 E2E 当作所有风险的默认答案;优先选择离风险最近的测试层。
  • 如果现有仓库没有测试基础设施,先输出最小测试落地建议,再请求用户确认是否引入。
  • 不在红灯阶段同时重构;先证明问题,再最小修复,再整理结构。

预期输出

  • 至少一个先失败后通过的测试覆盖新增或修复行为。
  • 实现保持最小范围,重构只在测试通过后进行。
  • 总结运行过的测试命令、覆盖的行为和未覆盖风险。

纯重构边界

纯粹的保持行为重构,不应人为制造一个失败测试。如果现有行为本身正确、目标只是结构调整,应先建立或补充能够描述“当前行为”的 characterization test,并让它从一开始就是绿色;随后执行 GREEN → REFACTOR → GREEN。只有新增行为或修复会改变行为的缺陷,才使用 RED → GREEN → REFACTOR。

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 56 lines · 80 tokens per session scan A 40db050aaa53

Subscribe to this mod's changes

fec-tdd-workflow is a skill published in the GitHub repository bovinphang/frontend-craft (21 stars, last pushed 8d ago), licensed MIT. It adds 80 tokens to every session and 759 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

auto-loop

TDD-based autonomous development loop with checkpoint recovery and observability changelog.

claude-world/director-mode-lite · 17 tokens

workflow

Run the complete 5-step development workflow: focus problem → prevent over-development → test-first (TDD) → document → smart commit. Use when starting a new feature, or when the user runs /workflow or asks for the full development flow.

claude-world/director-mode-lite · 52 tokens

test-first

Drive one feature through a strict TDD Red-Green-Refactor cycle with checklists for each phase. Use when implementing new functionality test-first, or when the user runs /test-first.

claude-world/director-mode-lite · 42 tokens

test-audit

Audit test suites for T1-T4 violations using AST analysis, mock detection, and multi-stage synthesis. Invoke when user asks to audit tests, check test quality, find mock violations, review test effectiveness, or inspect test suites for over-mocking. Triggers automatic rewrites when quality gates fail.

QBall-Inc/the-bulwark · 0 tokens

feature-dev

Take one new feature slice from idea to reviewed, committed code in a single guided pass — scope it into the smallest shippable slice, build it test-first with strict TDD, review and fix the diff, then commit it. Chains slice → test-driven-development → the built-in /code-review → git-commit. Not for reviewing an…

thoughtbot/rails-consultant · 83 tokens

test-driven-development

Strict red-green-refactor TDD workflow for implementing features, fixing bugs, or changing behavior in Rails applications. Enforces the discipline of writing a failing test before any production code. Use whenever you want to implement with TDD — whether a new feature, a bugfix, a refactor, or any behavior change.

thoughtbot/rails-consultant · 68 tokens