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.
npx skills add bovinphang/frontend-craft --skill fec-tdd-workflowgit clone --depth 1 https://github.com/bovinphang/frontend-craftWrote 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.
[](https://agentmods.dev/skills/bovinphang/frontend-craft/fec-tdd-workflow)<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.
<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>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.
| Model | Per session | Once 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 |
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 7d 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.
What it actually says
前端 TDD 工作流
用途
用“先写失败测试,再实现最小代码,再重构”的节奏交付前端功能,避免只在实现后补覆盖率。
流程
- 识别可观察行为:用户能看到的 UI、组件契约、hook/composable 返回值、路由守卫结果、API client 输出或错误状态。
- 先写一个最小失败测试:
- 纯逻辑优先单元测试。
- 组件交互优先 Testing Library / Vue Test Utils。
- 跨页关键流程优先 Playwright / Cypress。
- 运行该测试并确认失败原因正确,失败应来自行为尚未实现,而不是语法、导入或测试环境错误。
- 写刚好能通过测试的最小实现,不顺手扩大范围。
- 重新运行测试,确认变绿。
- 在测试保持通过的前提下重构命名、边界和重复逻辑。
- 对 bug 修复,保留能复现问题的回归测试。
- 每轮只扩大一个可观察行为;新需求、新边界和新异常路径各自进入下一轮。
证明式测试模式
修复缺陷时先让测试失败,再让它通过。若无法先失败,说明测试没有覆盖原始问题,需要收窄输入、断言或测试层级。
前端测试选择
| 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。
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.
- 7d ago First seen · 56 lines · 80 tokens per session scan A 40db050aaa53
fec-tdd-workflow is a skill published in the GitHub repository bovinphang/frontend-craft (21 stars, last pushed 9d 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.
Other skills, from other repositories
auto-loop
TDD-based autonomous development loop with checkpoint recovery and observability changelog.
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.
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.
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.
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…
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.