fec-tdd-workflow SKILL.md skillA
fec-tdd-workflow from bovinphang/frontend-craft is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add bovinphang/frontend-craft/fec-tdd-workflow@git:20260901.387d97aPins git:20260901.387d97a in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- bovinphang/frontend-craft
- Path
localized/zh-CN/skills/fec-tdd-workflow/SKILL.md- Versions recorded
- 2
- Latest version
- git:20260901.387d97a, committed Sep 1, 2026
- First version recorded
- Jun 11, 2026
- Size
- 2,953 bytes
- Repository stars
- 22
- License
- MIT
用于实现新前端行为、修复 bug 或重构可先由测试描述预期行为的逻辑。适用于组件、hooks/composables、工具函数、API clients、路由守卫或用户工作流;中文触发词包括 TDD、测试驱动、先写测试、红绿重构、回归测试。.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file 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。
Read the whole file at its exact version.
How to install
mdr add bovinphang/frontend-craft/fec-tdd-workflow@sha256:40db050aaa536f9cThe line at the top of this page pins the label git:20260901.387d97a, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_5py3b6f2tye57tmp)
2 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 2 versions of this file, between Jun 11, 2026 and Sep 1, 2026, about one every 82 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20260901.387d97a latest | 2026-09-01 | 387d97a | 2,953 B | A | view · diff |
| git:20260611.9d7f5e4 | 2026-06-11 | 9d7f5e4 | 2,551 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (2953 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
bovinphang/frontend-craft · 22 stars · license MIT · pushed 2026-09-26 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_5py3b6f2tye57tmp GET https://markdownregistry.com/api/v1/resolve?ref=bovinphang/frontend-craft/fec-tdd-workflow GET https://markdownregistry.com/api/v1/blob/40db050aaa536f9c37cb954db44d1be2e1be76b6c48922248e705b206e8b1263
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.
More from bovinphang/frontend-craft
Every file in bovinphang/frontend-craft