pdlc-loop-run

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

An automated loop that moves a feature through TDD, implementation, and review. TDD, or test-driven development, means writing tests as part of defining and checking the code’s expected behavior.

In plain words
What is it for?
Use it to run repeated test, implementation, and review stages for a feature ID, with a maximum number of iterations and a clear stopped or blocked result.
Why use it?
It removes the need to manually coordinate repeated steps during the mechanical part of feature development. It stops when review is complete or when progress is blocked, leaving release and deployment decisions to a person.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions subagents.

Part of the pdlc plugin — 38 skills shipped together

Good fit Use it to run repeated test, implementation, and review stages for a feature ID, with a maximum number of iterations and a clear stopped or blocked result.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/kanfu-panda/pdlc-skills/pdlc-loop-run"><img src="https://agentmods.dev/badge/skills/kanfu-panda/pdlc-skills/pdlc-loop-run.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,121 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.00028 $0.01121
Opus 5 $0.00014 $0.00561
Sonnet 5 $0.00006 $0.00224
Haiku 4.5 $0.00003 $0.00112

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

Security

Grade A, and why

pdlc-loop-run 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-loop-run/SKILL.md · 55 lines

What it actually says

收敛循环引擎(loop-run)

把机械收敛段 tdd → implement → review 烧成一个自主循环:从 current_stage 出发逐阶段自动推进,直到 review_done 或被 blocked。这是 /pdlc-loop-next 之上的高层引擎——用户不必自己写 bash 循环。

终态即 review_done(设计如此):本引擎只覆盖机械收敛段。到达 review_done成功停机,交人工决定是否 /pdlc-ship绝不自动进入 pdlc-ship / pdlc-deploy——发布/部署是不可逆·外发操作,永远留人(--autonomous 对它们无效)。prd/design 的关键取舍同样不在本引擎范围内。

两种运行形态

  • 默认推荐 · 外部 Runbook(真进程隔离):长跑 / 过夜 / 多 feature 并行时,用独立进程逐轮跑,每轮全新进程 = 真 fresh context 最可信。本命令可打印该 Runbook 脚本(见 usage-guide「自主循环 Runbook」)。
  • 便捷 · 插件内 Task 版(本命令默认行为):适合短收敛。每个 stage 派发给一个 fresh Task subagent(context 相对隔离),返回后读状态机决定推进 / 停 / block。

循环算法(Task 版)

  1. $ARGUMENTS 取功能ID;--max-steps 取迭代上限(缺省 4)。读 docs/.pdlc-state/<功能ID>.json
  2. 循环,每轮:
    1. /pdlc-loop-next 的映射判定下一条命令:pdlc-tdd / pdlc-implement / pdlc-review / done / blocked
    2. done成功停机,输出 <<<PDLC done stage=review>>>,提示交人工 /pdlc-ship
    3. blocked → 停机交还人类,输出 <<<PDLC blocked reason="...">>>
    4. 否则用 Task 工具派发该命令到一个 fresh subagent,--autonomous,模型取目标 skill frontmatter 的 recommended_model(无则继承)。
    5. subagent 返回后重新读状态机 last_phase_result
      • ok=falsefail-stop:停机、不重跑同一 stage,输出 blocked 哨兵。
      • current_stage 未推进(违反 IRON LAW 第 6 条)→ stuck-stop:停机报错。
      • ok=true 且已推进 → 记一步,继续下一轮。
    6. 步数 > --max-steps上限停机(防病态空转烧 token)。
  3. 输出循环小结(跑了几步、终态、每步 last_phase_result 摘要)。

护栏(不可协商)

  • 迭代上限:收敛段线性前进 tdd→implement→review(3 段),默认上限 4 = 3 段 + 1 段容错余量(供「首轮 block、人工修好后从原 stage 续跑一次」)。不给更多余量。
  • 只前进不回炉:循环只在不同 stage 间前进,永不原地重跑同一 stage(与 IRON LAW「修复单次不递归」一致——单 stage 内的修复仍是单次)。
  • fail-stop / stuck-stop:任一 stage ok=false 或状态未推进即停,绝不空转。
  • 预算:外部 Runbook 形态必须配 --max-budget-usd(见 usage-guide)。自主循环持续烧 token,护栏是硬要求。

与 IRON LAW 的关系

本引擎不违反「修复单次不递归」:单个 stage 的自检-修复仍单次;引擎做的是跨 stage 前进 + 失败即停 + 上限,不是「重试同一步」。

功能ID: $ARGUMENTS

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 · 55 lines · 28 tokens per session scan A 2deb51555129

Subscribe to this mod's changes

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