guard
スター13
フォーク1
更新日2026年1月23日 09:10
Analyze and prepare prompts with JSON for safe context submission
インストール
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SKILL.md
readonlyメニュー
Analyze and prepare prompts with JSON for safe context submission
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Feature development with guardrails. Plan → Review → Code → Ship.
Feature development with guardrails. Plan → Review → Code → Ship.
Run a full, policy-compliant feature development flow with structured review phases
Interactive menu for managing cook artifacts
| name | guard |
| description | Analyze and prepare prompts with JSON for safe context submission |
| user-invocable | true |
Epistemic safety analysis for JSON data in prompts. Prevents LLMs from reasoning with unjustified certainty when input data is incomplete.
When /guard is invoked, execute the guard script:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/guard_cmd.py" "<file_path>" [options]
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/guard_cmd.py" - [options] <<'GUARD_INPUT'
<json_data>
GUARD_INPUT
| Option | Description |
|---|---|
--mode | analysis|summary|forensics (default: auto-detect) |
--force | Bypass blocks, emit warnings only |
--allow-sampling | Permit sampling for forensic queries |
--no-reduce | Skip lossless reduction phase |
--budget-tokens N | Token budget (default: 3500) |
--print-only | Output report only, never auto-send |
--json | Output result as JSON |
| Mode | Sampling | Use Case |
|---|---|---|
analysis | Allowed | "What categories exist?", "Price range?" |
summary | Aggressive | "Describe the data structure" |
forensics | BLOCKED | "Why did request id=X fail?" |
============================================================
CONTEXT GUARD ANALYSIS
============================================================
Decision: [OK] ALLOW | [~] SAMPLE | [X] BLOCK
Mode: analysis | summary | forensics
TOKEN ANALYSIS:
Original: 5,234 tokens
After reduce: 4,891 tokens (-343)
Budget: 3,500 tokens
============================================================
ANTHROPIC_API_KEY environment variable (for token counting)