pb

A command template library for applying predefined instructions and behavior rules to a coding-agent conversation.

In plain words
What is it for?
It helps list available templates, find one matching a request, add modifiers such as extra caution or full regression testing, and inject the selected instructions.
Why use it?
It avoids relying on memory or inventing a template when you want a repeatable way to guide the agent.

Command

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.

agentmods
npx agentmods add commands/xcodethink/open-claude-code-skills/pb
Clone the repo
git clone --depth 1 https://github.com/xcodethink/open-claude-code-skills
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 454 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00023 $0.00454
Opus 5 $0.00012 $0.00227
Sonnet 5 $0.00005 $0.00091
Haiku 4.5 $0.00002 $0.00045

Measured 2d ago against content hash 4fac4c42dd0c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pb 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.

commands/pb.md · 34 lines

What it actually says

pb — Playbook 指令模板库

用户输入了 /pb $ARGUMENTS 想用指令模板库。完整逻辑在 ~/.claude/skills/15-playbook/SKILL.md,请读取它并按其中"Claude 收到 /pb 后的行为"一节执行。

快速指引

  1. ~/.claude/prompts/index.yaml — 元数据索引是真理来源
  2. 判断用户意图
    • 无参数 / list → 列表模式:输出速查表
    • help → 帮助模式
    • 其他文字 → 匹配模式:自然语言匹配模板 + 修饰符
  3. 匹配模式输出
    • 强匹配(top1 远超其他)→ 直接确认 + 完整注入模板正文
    • 多候选 → 列 top 3 让用户选
    • 无匹配 → 告诉用户没匹配到,建议描述更多细节
  4. 修饰符叠加:用户输入里出现"超谨慎/全量回归/深度思考/不部署/操作前必问"任一 → 自动叠加对应修饰符
  5. 注入模板时输出完整正文(让行为契约进入对话上下文),不要总结成一两句

不要做的事

  • [NO] 凭记忆给模板,必须读 index.yaml 和模板文件
  • [NO] 模板没匹配到就编造一个
  • [NO] 注入模板后不真的执行行为契约
  • [NO] 把模板内容总结一两句给用户

用户输入参数

用户在 /pb 后面的所有文字都是参数(场景描述 + 修饰符)。

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 First seen · 34 lines · 0 tokens per session scan A 4fac4c42dd0c

Subscribe to this mod's changes

pb is a command published in the GitHub repository xcodethink/open-claude-code-skills (2 stars, last pushed 28d ago), licensed MIT. It adds 23 tokens to every session and 454 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.