pdlc-fix

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

An automated bug-fixing workflow that locates a reported bug, reproduces it with a test, applies a minimal fix, runs tests, and updates the relevant documentation.

In plain words
What is it for?
Use it to investigate the cause and impact of a bug, add a failing reproduction test, implement and verify the fix, run the full test suite, and record the defect.
Why use it?
It takes the bug from a description to a verified correction without pausing for routine decisions. The regression test helps ensure the same problem does not return.

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 investigate the cause and impact of a bug, add a failing reproduction test, implement and verify the fix, run the full test suite, and record the defect.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kanfu-panda/pdlc-skills/pdlc-fix
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-fix
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-fix

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/kanfu-panda/pdlc-skills/pdlc-fix"><img src="https://agentmods.dev/badge/skills/kanfu-panda/pdlc-skills/pdlc-fix.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,383 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.00025 $0.01383
Opus 5 $0.00013 $0.00691
Sonnet 5 $0.00005 $0.00277
Haiku 4.5 $0.00003 $0.00138

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

Security

Grade A, and why

pdlc-fix 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 11d 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-fix/SKILL.md · 133 lines

How it starts

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

全自动 Bug 修复

接收一句话 Bug 描述,全自动完成定位、复现、修复、测试、文档更新,中途不暂停、不询问用户。

执行规则

  • 全程自动:不在任何步骤暂停等待确认,遇到歧义自行做合理假设并在最终报告中说明
  • 严格顺序:必须按阶段一→二→三→四→五顺序执行,不得跳过
  • 最小改动原则:只修复 Bug 本身,不顺手重构或优化不相关代码
  • 测试验证才结束:全量测试通过后才输出最终报告


阶段一:问题定位

  1. 根据 Bug 描述,搜索相关代码文件,阅读并理解涉及的逻辑
  2. 查阅 docs/02_design/ 对应子目录下的设计文档,确认预期正确行为
  3. 明确根因:
    • 是代码逻辑错误、边界未处理、还是设计文档遗漏?
    • 影响范围:哪些模块/接口/数据受影响?
  4. 若 Bug 描述不足以定位,根据描述做最合理推断,在报告中说明

阶段二:回归测试(红灯)

  1. 编写一个能精确复现该 Bug 的测试用例,写到项目既有的测试布局里(定位规则见下):
  1. 测试命名格式:应该_当<触发条件>时_<预期行为>
  2. 运行该测试,确认测试失败(红灯),记录失败输出
  3. 若已有相关测试但未覆盖该场景,在原测试文件中追加用例

阶段三:代码修复(绿灯)

  1. 最小改动修复 Bug,不改动与 Bug 无关的代码
  2. 运行步骤二编写的回归测试,确认通过(绿灯)
  3. 若修复过程中发现设计文档有遗漏或错误,同步更新对应设计文档

阶段四:全量测试验证

  1. 运行该服务/应用的完整测试套件,确认没有引入新的失败
  2. 若有 E2E 测试,运行相关 E2E 用例验证端到端行为正常
  3. 如有测试因本次修复而需要更新(如快照测试、预期值变更),同步更新

阶段五:文档更新与最终报告

⚠️ 必须创建文件,不可仅在对话中输出。 以下每份文档都必须作为实际文件写入磁盘。

  1. 更新对应服务的 CHANGELOG.md,在 [未发布] 下新增 fix 条目:
    • 格式:- 修复 <简要描述>(<触发条件>)
  2. 若涉及设计文档变更,同步更新 docs/02_design/ 下对应文档
  3. 【必须创建文件】docs/04_testing/defects/ 下创建缺陷记录:<缺陷ID>-<功能名>-defect.md
    • 文档顶部必须包含 PDLC 追溯头(格式见下方片段):
  • 记录:根因分析、影响范围、修复方案、回归测试覆盖情况
  • 创建后验证:确认文件已存在于 docs/04_testing/defects/ 目录
  1. 输出最终报告(同时在对话中显示,但报告内容必须已落盘到上述文件中):
## Bug 修复报告:<简要描述>(<缺陷ID>)

### 根因分析
<一段话描述根本原因>

### 影响范围
- 涉及文件:
- 涉及接口/功能:

### 修复方案
<描述做了什么改动,为什么这样改>

### 测试结果
- 回归测试:通过
- 全量测试:X 个通过 / 0 个失败

### 文档变更
- CHANGELOG.md:已更新
- 设计文档:已更新 / 无需更新

### 假设与说明
(记录执行过程中自行做出的关键假设)

### 上线前待办
(如有需要人工处理的事项,如数据修复脚本、缓存清理等)

产出物清单(每项必须作为文件创建)

产出物 路径 必须
缺陷记录 docs/04_testing/defects/<缺陷ID>-<功能名>-defect.md ✅ 必须
回归测试 对应服务测试目录 ✅ 必须
CHANGELOG 对应服务 CHANGELOG.md ✅ 必须
设计文档更新 docs/02_design/ 下对应文档 按需

文件落盘规则:所有带编号(缺陷ID)的文档必须作为实际文件写入,不可仅在对话中显示。最终报告完成前,必须确认上述文件均已创建。

Read the full file on GitHub · 133 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. 11d ago First seen · 133 lines · 25 tokens per session scan A febfc0209664

Subscribe to this mod's changes

pdlc-fix is a skill published in the GitHub repository kanfu-panda/pdlc-skills (13 stars, last pushed yesterday), licensed MIT. It adds 25 tokens to every session and 1,383 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.

Related

Other skills, from other repositories

tdd-xfail

Use when fixing a bug through strict xfail reproduction and needing proof that the test fails for the intended reason.

tony/skills · 27 tokens

prove-checks

Prove a passing check was capable of failing before recording it as evidence. Use when a test, CI job, build-and-diff, smoke test or rehearsal comes back green and that green is about to be treated as proof - especially when the check depends on a setup mutation (a sed/awk rewrite, an env var, a secret, a fixture…

sergeyklay/.agents · 221 tokens

tdd-fix

TDD bug-fix workflow — reproduce a bug as a failing test, find root cause, fix, and verify.

tony/skills · 28 tokens

aidex-bugfix

Use when fixing a bug, resolving a reported issue, or when something is broken and needs a test-driven fix — investigate root cause, write a failing regression test (RED), implement the minimum fix, confirm the test passes (GREEN), then commit test and fix together. Fires on "fix this bug", "this is broken", "it's not…

yacb2/aidex · 144 tokens

diagnose

Turn a bug symptom into a fix with a regression test that locks it down. If the user opens vague ("there's a bug", "/diagnose"), interview them one question at a time until you have enough to attempt a reproduction; if you still cannot reproduce, say so explicitly. Then drive the work through five phases — build a…

eduwxyz/my-awesome-skills · 0 tokens

postgres-database-migration

Use this skill for planning, testing, and safely executing PostgreSQL schema migrations — especially when working with production data or shared databases. Trigger when user asks to: Test a schema migration before applying it to production Add, remove, or rename columns safely on a live table Change a column's data…

timescale/pg-aiguide · 220 tokens