template-promote

template-promote is a command for Claude Code from llamadrive/bengo-toolkit. It costs 37 tokens per session (1,722 once invoked), scanned A, original, MIT.

A command for moving a template from one project into a shared location available to all projects on the computer or at a firm.

In plain words
What is it for?
Use it to promote a template to personal or firm-wide shared storage, optionally replacing an existing copy.
Why use it?
It lets you reuse a project-specific template elsewhere while checking for personal information before making it broadly visible.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

Part of the bengo-toolkit plugin — 15 skills, 25 commands, 3 MCP servers shipped together

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/llamadrive/bengo-toolkit/template-promote
Clone the repo
git clone --depth 1 https://github.com/llamadrive/bengo-toolkit

Made for: Claude Code.

Or install bengo-toolkit, the plugin that ships this one along with the rest of its 15 skills, 25 commands, 3 MCP servers.

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 template-promote

README.md
[![agentmods](https://agentmods.dev/badge/commands/llamadrive/bengo-toolkit/template-promote.svg)](https://agentmods.dev/commands/llamadrive/bengo-toolkit/template-promote)
Your own site
<a href="https://agentmods.dev/commands/llamadrive/bengo-toolkit/template-promote"><img src="https://agentmods.dev/badge/commands/llamadrive/bengo-toolkit/template-promote.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,722 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.1 $0.00037 $0.01722
Opus 5 $0.00018 $0.00861
Sonnet 5 $0.00007 $0.00344
Haiku 4.5 $0.00004 $0.00172

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

Security

Grade A, and why

template-promote 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 5d 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/template-promote.md · 136 lines

How it starts

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

現在の案件フォルダに登録されたテンプレートを「この PC の全案件で共通」(既定)または 「事務所共有」に移動する(元の案件側からは削除)。移動後は他の案件からも /template-fill で選択できるようになる。

$ARGUMENTS:

  • テンプレート ID(必須)
  • --to user — 「この PC の全案件で共通」(既定)
  • --to firm — 「事務所共有」(要 /template-firm-setup
  • --replace で移動先の既存を上書き

典型的なユースケース

案件 A のために登録した独自書式が、他の案件でも使えると気づいたとき。移動すれば 案件 A 側からも消え、「この PC の全案件で共通」の 1 本に統合される。

ワークフロー

Step 0: 動作環境ガード

Bash: python3 skills/_lib/workspace.py check --require local_fs
  • exit 0 → Step 1 へ
  • exit 2 → stdout の日本語メッセージをそのままユーザーへ表示して停止
  • exit 1 → stderr の error JSON をユーザーに伝えて停止

Step 1: 現状確認

python3 skills/_lib/workspace.py templates

戻り値 JSON の case 配列に対象 ID が存在するか確認する。無ければ 「この案件フォルダに {id} はない。/template-list で確認してほしい」と案内。

Step 2: 事前の個人情報確認(必須・ハードブロック)

「この PC の全案件で共通」へ移動するとこの PC 上の全案件から見えるため、クライアントの 個人情報が残っていないか先に確認する必要がある。 対象 XLSX に個人情報のような 記述が含まれないかをスキャンする:

python3 skills/_lib/pii_scan.py scan --xlsx "<対象の xlsx_path>" --json
  • verdict: "clean" → Step 3 へ進む
  • verdict: "suspicious"v3.3.0〜 昇格を拒否する(ユーザー override 不可):
⛔ テンプレート '{id}' の移動を中止した。
   クライアントの個人情報のような記述が {N} 件検出されたため:
  - B3 [氏名]: 「甲野太郎様」
  - D7 [住所]: 「〒100-0001 東京都千代田区...」

次のいずれかを選んでほしい:
  1. 案件側の XLSX を開いて該当箇所を削除 → 再実行
  2. 移動をあきらめて「この案件のみ」のまま使い続ける

本コマンドは個人情報検出時に スキャン結果のみを提示して終了 する。ユーザーが 「構わないから移動して」と言っても実行しない(個人情報を残したまま PC 全体に 広げるのは守秘義務違反に直結するため)。どうしても移動させたい場合は XLSX 側を先に修正してから再実行してほしい。

開発者・CI 専用バックドア(ユーザーに案内しないこと): 環境変数 CLAUDE_BENGO_ALLOW_PII_ON_GLOBAL=1 で PII findings を無視して昇格できる。 テスト・CI 用の escape hatch で、通常運用では設定しない。

Step 3: 昇格実行

python3 skills/_lib/template_lib.py promote <id>
# 上書きが必要なら: python3 skills/_lib/template_lib.py promote <id> --replace

PII は code レベルで強制される(v3.3.0-iter1〜): promote_template() が 内部で pii_scan を呼び、findings>0 なら exit 4 で終了する。Step 2 を実行しても しなくても、最終的に code-gate が通らなければ昇格は起こらない。

戻り値 JSON:

{
  "id": "...", "src_scope": "case", "dst_scope": "user",
  "src_yaml": "...", "src_xlsx": "...",
  "dst_yaml": "~/.claude-bengo/templates/{id}.yaml",
  "dst_xlsx": "~/.claude-bengo/templates/{id}.xlsx",
  "replaced": "False", "kept_original": "False", "delete_failed": "False"
}

Read the full file on GitHub · 136 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. 5d ago First seen · 136 lines · 37 tokens per session scan A a0b7220c17eb

Subscribe to this mod's changes

template-promote is a command published in the GitHub repository llamadrive/bengo-toolkit (6 stars, last pushed 1mo ago), licensed MIT. It adds 37 tokens to every session and 1,722 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.