pb-capture

pb-capture is a command for coding agents from xcodethink/open-claude-code-skills. It costs 33 tokens per session (467 once invoked), scanned A, original, MIT.

A command for turning a reusable instruction or practice into a proposed playbook template. A playbook is a stored set of instructions that can be reused in future work.

In plain words
What is it for?
Use it to extract a general template, check for similar entries, remove sensitive details, save a candidate for review, and add it to the library only after approval.
Why use it?
It helps preserve useful experience while preventing duplicate, sensitive, or unapproved entries from being added to the shared library.

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-capture
Clone the repo
git clone --depth 1 https://github.com/xcodethink/open-claude-code-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 pb-capture

README.md
[![agentmods](https://agentmods.dev/badge/commands/xcodethink/open-claude-code-skills/pb-capture.svg)](https://agentmods.dev/commands/xcodethink/open-claude-code-skills/pb-capture)
Your own site
<a href="https://agentmods.dev/commands/xcodethink/open-claude-code-skills/pb-capture"><img src="https://agentmods.dev/badge/commands/xcodethink/open-claude-code-skills/pb-capture.svg" alt="Measured on agentmods" height="20"></a>
Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 467 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.00033 $0.00467
Opus 5 $0.00016 $0.00234
Sonnet 5 $0.00007 $0.00093
Haiku 4.5 $0.00003 $0.00047

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

Security

Grade A, and why

pb-capture 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 4d 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-capture.md · 25 lines

What it actually says

pb-capture — 经验收录通路触发器

用户输入 /pb-capture $ARGUMENTS 表示要把一段可复用的通用指令经验沉淀成 playbook 模板。

立刻读取并完整加载: ~/.claude/prompts/lib/09-元指令/收录通路.md

按其"行为契约"段严格执行,核心:

  1. 先判边界:只收"通用可复用指令模板"。属于记忆层(/lesson)、协议演化( lesson-loop)、或 负责人 个人风格(<handle>-personal/)的经验 → 一句话指向对应入口,本通路止步。
  2. 提炼草稿(主 Claude 亲自写,符合 lib frontmatter schema)。
  3. 查重:扫 index.yaml 的 triggers/title,近似已有 → 建议"更新现有模板"而非新增。
  4. 去敏感:通用库铁律,沿用 /lesson 去敏感清单;清理不掉 → 改投 <handle>-personal/
  5. 落候选暂存区 prompts/candidates/<id>.md(纯新增,零风险),给用户看。
  6. 晋级入库必须等用户确认 diff:列 index.yaml 追加 + 文件移入 lib/ 的 diff → 等 "yes" → 入库 → 跑 prompts/scripts/build-library.sh 重建 LIBRARY.md

核心契约:candidates/ 是纯新增缓冲;任何对 index.yaml / lib/ 的写入前必有 diff + 用户 yes,零静默改库;不阻塞会话主线(出问题退回手动)。

参数: $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. 4d ago First seen · 25 lines · 33 tokens per session scan A 07d403805016

Subscribe to this mod's changes

pb-capture is a command published in the GitHub repository xcodethink/open-claude-code-skills (2 stars, last pushed 29d ago), licensed MIT. It adds 33 tokens to every session and 467 once invoked, about $0.0002 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.