pdlc-tdd

pdlc-tdd is a skill for Claude Code from kanfu-panda/pdlc-skills. It costs 25 tokens per session (1,580 once invoked), scanned A, original, MIT.

A test-first development workflow guided by existing design documents. TDD means writing tests before the code they check; PDLC is a staged product-development process with required preparation steps.

In plain words
What is it for?
Use it to find the design for a feature, create a test plan, write tests in the project's existing test layout, and review the plan and tests before running them.
Why use it?
It prevents implementation from starting without a matching design and keeps tests tied to the documented requirements. If no relevant design document exists, the workflow stops and asks for one.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the pdlc plugin — 38 skills shipped together

Good fit Use it to find the design for a feature, create a test plan, write tests in the project's existing test layout, and review the plan and tests before running them.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kanfu-panda/pdlc-skills/pdlc-tdd
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 kanfu-panda/pdlc-skills --skill pdlc-tdd
Clone the repo
git clone --depth 1 https://github.com/kanfu-panda/pdlc-skills

Made for: Claude Code.

Or install pdlc, the plugin that ships this one along with the rest of its 38 skills.

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 pdlc-tdd

README.md
[![agentmods](https://agentmods.dev/badge/skills/kanfu-panda/pdlc-skills/pdlc-tdd/github.svg)](https://agentmods.dev/skills/kanfu-panda/pdlc-skills/pdlc-tdd)
Your own site
<a href="https://agentmods.dev/skills/kanfu-panda/pdlc-skills/pdlc-tdd"><img src="https://agentmods.dev/badge/skills/kanfu-panda/pdlc-skills/pdlc-tdd/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 pdlc-tdd

Your own site · 80×15
<a href="https://agentmods.dev/skills/kanfu-panda/pdlc-skills/pdlc-tdd"><img src="https://agentmods.dev/badge/skills/kanfu-panda/pdlc-skills/pdlc-tdd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,580 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Prompt Injection · line 22
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
  • high Prompt Injection · line 22
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
How audits are shown
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.00025 $0.01580
Opus 5 $0.00013 $0.00790
Sonnet 5 $0.00005 $0.00316
Haiku 4.5 $0.00003 $0.00158

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

Security

Grade A, and why

pdlc-tdd 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 12d 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.

skills/pdlc-tdd/SKILL.md · 114 lines

How it starts

The opening of the file, as written. The whole thing — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.

TDD 测试先行

根据设计文档,先编写测试用例,再实现代码。严格遵循 TDD 工作流。

PDLC 前置检查(必须执行,不可跳过)

  1. 从用户输入中提取功能名称关键词
  2. docs/02_design/ 的子目录(api/、architecture/、database/、ui-ux/)下搜索包含该关键词的设计文档
    • 匹配新格式:F<日期>-<编号>-*<关键词>*-<类型>.md
    • 匹配旧格式:YYYYMMDD-*<关键词>*-<类型>.md
    • 同时检查文件内容中是否包含该关键词
  3. 未找到任何设计文档 → 输出以下信息后立即停止,不继续执行
    ⛔ PDLC 守卫:未找到与「<功能名>」相关的设计文档(API/架构/数据库/UI 任一)。
    测试用例必须基于已有的设计文档。请先运行:
    👉 /pdlc-design <设计目标>
    
  4. 找到 → 提取功能ID(如 F20260326-090000),读取设计文档内容,继续执行

工作流程

  1. 阅读设计文档: 阅读找到的设计文档,全面理解接口/架构/数据模型
  2. 阅读编码规范: 阅读 docs/00_standards/coding/ 目录了解编码规范(未命中 → 提示 consider /pdlc-standard add coding/<topic>
  3. 编写测试计划: 在 docs/04_testing/unit-tests/ 下创建测试计划文档
    • 使用模板: templates/test-plan-template.md
    • 文件名格式: <功能ID>-<功能名>-test-plan.md(如 F20260326-090000-user-auth-test-plan.md
    • 文档顶部必须包含 PDLC 追溯头
      <!-- PDLC-TRACE -->
      <!-- 功能ID: F20260326-090000 -->
      <!-- 功能名称: user-auth -->
      <!-- 阶段: 测试 -->
      <!-- 前置文档: docs/02_design/api/F20260326-090000-user-auth-api.md -->
      
  4. 编写测试代码: 写到项目既有的测试布局里,按下面的规则定位; 不要为迎合某种预设结构新造一套平行的测试目录。
  1. 测试计划自审与自动修复(编写完成后、运行前执行,不可跳过):

    • 重新阅读测试计划和测试代码,对照设计文档和 PRD 逐项检查以下质量门禁:

    验收标准覆盖度

    • PRD 中每条验收标准是否至少有一个对应的测试用例
    • 设计文档中每个接口是否至少有正常流程 + 异常流程的测试

    场景完备性

    • 正常流程:核心业务路径是否全部覆盖
    • 边界条件:空值/null、空字符串、最大值/最小值、零值、超长输入
    • 异常场景:无权限、资源不存在(404)、重复操作(409)、参数校验失败(400)
    • 并发场景:是否考虑了同时操作的冲突(如适用)
    • 幂等性:重复提交同一请求是否有对应测试(如适用)

    测试质量

    • 测试方法命名是否清晰描述场景(如 should_return_404_when_user_not_found
    • 每个测试是否只验证一个行为(单一断言原则)
    • 测试数据是否有意义(非 test1abc123 等无意义数据)

    自动修复

    • 缺失的验收标准测试:自动补充对应的测试用例骨架
    • 缺失的边界条件测试:自动添加空值、超长输入、类型错误等测试
    • 缺失的异常场景测试:根据 API 错误码自动补充 401/403/404/409 等场景测试
    • 命名不规范的测试方法:自动重命名为描述性命名
    • 修复后在测试计划文档末尾追加审查记录:
      ## 自审记录
      - 审查时间:<ISO 8601>
      - 对照 PRD 验收标准:X 条,已覆盖:X 条
      - 对照 API 接口:X 个,已覆盖:X 个
      - 发现问题:X 项
      - 自动修复:X 项
      - 修复明细:
        - [已修复] <问题描述>
      

Read the full file on GitHub · 114 lines

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. 12d ago First seen · 114 lines · 25 tokens per session scan A b23a2bdb678d

Subscribe to this mod's changes

pdlc-tdd is a skill published in the GitHub repository kanfu-panda/pdlc-skills (13 stars, last pushed today), licensed MIT. It adds 25 tokens to every session and 1,580 once invoked, about $0.0001 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-08-31.