pdlc-loop-next

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

A small read-only helper that reads one PDLC feature's state and prints the single command or status token that should come next. PDLC is a staged process for taking software work from tests through implementation and review.

In plain words
What is it for?
Use it in shell loops or other automation to choose between pdlc-tdd, pdlc-implement, pdlc-review, done, and blocked.
Why use it?
It gives an outer script an unambiguous next action without parsing explanatory text or relying on a stage name that may be incomplete. Missing or blocked state is reported as blocked.

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 in shell loops or other automation to choose between pdlc-tdd, pdlc-implement, pdlc-review, done, and blocked.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/kanfu-panda/pdlc-skills/pdlc-loop-next"><img src="https://agentmods.dev/badge/skills/kanfu-panda/pdlc-skills/pdlc-loop-next.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,519 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.00026 $0.01519
Opus 5 $0.00013 $0.00759
Sonnet 5 $0.00005 $0.00304
Haiku 4.5 $0.00003 $0.00152

Measured 2d ago against content hash 94220035a086, 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-next 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 2d 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-next/SKILL.md · 83 lines

How it starts

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

循环下一步(loop-next)

读取指定功能的状态机,只打印一个 token,告诉外层循环下一步该跑哪条命令。它是 /pdlc-loop-run 与用户自写 bash 循环的低层 helper——自身只读、不改任何状态、不含 --autonomous 语义。

输出契约(安全关键)

输出必须是下列固定白名单中的单个 token,独占一行,不含任何散文、标点或解释,尤其不要用代码块(三反引号)或反引号包裹

pdlc-tdd | pdlc-implement | pdlc-review | done | blocked
  • ✅ 正确:整个回复就是一行 pdlc-implement
  • ❌ 错误:用 ``` 包成代码块、用反引号包住、加 下一步: 前缀或任何解释——任何包裹/前缀都会让下游 case 匹配失败
  • 本命令只覆盖机械收敛段 tdd → implement → review。到达 review_done 或更后(发布属人工闸门)→ 输出 done绝不输出 pdlc-ship / pdlc-deploy(发布永远留人)。
  • 下游 helper 必须净化(去反引号/空白)再校验 token 属于白名单,非法即中止(见下方参考脚本)——这是防御模型偶发包裹的兜底。

执行流程

  1. $ARGUMENTS 取功能ID;读取 docs/.pdlc-state/<功能ID>.json

  2. 文件不存在 / 无法解析 → 输出 blocked

  3. last_phase_result.blocked_reason 非空 → 输出 blocked

  4. current_stage 属终态(以 _done 结尾——实际由编排器写入的终态值为 feature_done / fix_done)→ 输出 done。(注:单阶段命令的 current_stage 用短名 impl/review,review 完成的判定靠下面第 5 步的 next_step,不靠此处。)

  5. 否则next_step(状态机里存的下一跳命令名)为主键判定并输出。

    ⚠️ 必须用 next_step 判定,不要用 current_stage 字符串匹配:现有状态机的 current_stage 用短名(requirements / design / tdd / impl / review,如 pdlc-implement 明写 current_stage: impl),格式不适合直接判阶段;而 next_step 是无歧义的命令名。

    next_step 输出 说明
    pdlc-tdd pdlc-tdd
    pdlc-implement pdlc-implement
    pdlc-review pdlc-review
    pdlc-ship / pdlc-deploy done 机械收敛已完成(review 通过),发布留人
    null / 缺失 blocked 状态残缺——收敛段无阶段会合法写出 null,见下
    pdlc-prd / pdlc-design blocked 尚在 tdd 之前,需人工(超出循环范围)
    其它 blocked

    nullblocked 而不是 done:机械收敛段里没有任何阶段会合法写出 next_step: null——pdlc-implementpdlc-reviewpdlc-reviewpdlc-fix 都写 pdlc-ship收敛完成的信号是 next_step=pdlc-ship(上表已单独映射到 done),不是 null。所以 null 只可能是状态残缺,判 done 等于把「什么都 没发生」报成「机械阶段已完成」——上层会以为可以进发布评估了。

    注意这类输入逃得过「无法解析 → blocked」的兜底{} 是合法 JSON, 解析得了、只是什么都没有。展示层早有同一结论(bin/pdlc-statusline.shis_terminal:原子 fix 流程 next 恒为 null 却未完成,误判会显示「✅ done」)。

Read the full file on GitHub · 83 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. 2d ago Changed · +11 lines 94220035a086
  2. 12d ago First seen · 72 lines · 26 tokens per session scan A ddd958dbf7b2

Subscribe to this mod's changes

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

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

setup-timescaledb-hypertables

Use this skill when creating database schemas or tables for Timescale, TimescaleDB, TigerData, or Tiger Cloud, especially for time-series, IoT, metrics, events, or log data. Use this to improve the performance of any insert-heavy table. Trigger when user asks to: Create or design SQL schemas/tables AND…

timescale/pg-aiguide · 219 tokens

design-postgis-tables

Comprehensive PostGIS spatial table design reference covering geometry types, coordinate systems, spatial indexing, and performance patterns for location-based applications.

timescale/pg-aiguide · 31 tokens

migrate-postgres-tables-to-hypertables

Use this skill to migrate identified PostgreSQL tables to Timescale/TimescaleDB hypertables with optimal configuration and validation. Trigger when user asks to: Migrate or convert PostgreSQL tables to hypertables Execute hypertable migration with minimal downtime Plan blue-green migration for large tables Validate…

timescale/pg-aiguide · 181 tokens

pgvector-semantic-search

Use this skill for setting up vector similarity search with pgvector for AI/ML embeddings, RAG applications, or semantic search. Trigger when user asks to: Store or search vector embeddings in PostgreSQL Set up semantic search, similarity search, or nearest neighbor search Create HNSW or IVFFlat indexes for vectors…

timescale/pg-aiguide · 190 tokens

find-hypertable-candidates

Use this skill to analyze an existing PostgreSQL database and identify which tables should be converted to Timescale/TimescaleDB hypertables. Trigger when user asks to: Analyze database tables for hypertable conversion potential Identify time-series or event tables in an existing schema Evaluate if a table would…

timescale/pg-aiguide · 184 tokens