From ledger
Use when phase=pid and PID Card exists. Generates behavior contract from PID Card with FC/NF entries, scope boundaries, and test coverage mapping.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ledger:ledger-contractThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
根据 PID Card 生成行为契约文件。
根据 PID Card 生成行为契约文件。
bash .ledger/bin/ledger.sh guard contract
guard 失败则停止。
PID Card 存在性: .ledger/specs/[功能名]-pid.md 必须存在。
PAD 占位符警告: 若 PAD.md 存在未填写字段,提示选择:继续 / 先完善 PAD。
PID 主流程映射完整性: PID 必须包含 PAD 业务主流程 Step、功能类型、成功后用户去向、架构影响、设计附件判断。缺失时提示补齐。
设计附件读取: 若 PID 声明需要设计附件,读取附件中的验收映射,转为 FC/NF 候选。
参照 .ledger/templates/contract.md,根据 PID Card 生成:
按 constitution.md §12a 快速判定 + §12b 复杂度评分评估功能粒度。
若任一核心 FC 无法独立验证,必须补充验证方式或拆分功能。
输出路径:.ledger/contracts/[功能名].md
bash .ledger/bin/ledger.sh state set-phase contract
✅ Contract 生成:[功能名]
FC 条目:[N] 个(正常路径 [N] / 边界 [N] / 次要 [N])
NF 条目:[N] 个
复杂度评分:[N] 分
明确不做:[N] 项
→ 下一步:/ledger.build 或加载 ledger:ledger-build skill
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub hypho/ledger-protocol --plugin ledger