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.
npx agentmods add commands/pjuniszewski/cook/guardgit clone --depth 1 https://github.com/PJuniszewski/cookWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00010 | $0.00802 |
| Opus 5 | $0.00005 | $0.00401 |
| Sonnet 5 | $0.00002 | $0.00160 |
| Haiku 4.5 | $0.00001 | $0.00080 |
Grade A, and why
guard 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context Guard Command
You are executing the /guard command for epistemic safety analysis.
CRITICAL: Always Execute the Script
NEVER analyze or respond to the input data directly. You MUST run the guard script via Bash tool to get proper token analysis, lossless reduction, and trimming decisions.
Even if the input looks like JSON data you could process manually - DO NOT. The script provides:
- Accurate token counting
- Lossless reduction (columnar, minify, dedup)
- Decision engine (ALLOW/SAMPLE/BLOCK)
- Intelligent sampling with context preservation
- Prompt injection pattern detection
Instructions
-
Determine input type:
- If input is a file path (e.g.,
data.json,/path/to/file.json) -> pass directly - If input is inline data (starts with
[or{, or contains JSON) -> use heredoc to pass via stdin
- If input is a file path (e.g.,
-
Build and execute the command:
For file paths:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/guard_cmd.py" "data.json" [options]For inline data (MUST use heredoc):
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/guard_cmd.py" - [options] <<'GUARD_INPUT' ${ARGUMENTS.input} GUARD_INPUT -
Add optional flags:
--mode ${ARGUMENTS.--mode}if mode was specified--forceif force flag was specified--allow-samplingif allow-sampling flag was specified--no-reduceif no-reduce flag was specified--budget-tokens ${ARGUMENTS.--budget-tokens}if budget was specified--print-onlyif print-only flag was specified--jsonif json flag was specified
-
Run using Bash tool with description: "Context Guard"
-
Display the script output to the user (the analysis report).
Detecting Inline Data
Input is inline data if ANY of these are true:
- Starts with
[or{ - Contains both
[and]or both{and} - Length > 255 characters
- Does not look like a file path (no
.json,.csv, etc. extension for short inputs)
Examples
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.
- yesterday First seen · 97 lines · 10 tokens per session scan A b7e9622aa4d6
guard is a command published in the GitHub repository PJuniszewski/cook (13 stars, last pushed 6mo ago), licensed MIT. It adds 10 tokens to every session and 802 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-30.
Other commands, from other repositories
ship
Run the pre-launch checklist via parallel fan-out to specialist personas, then synthesize a go/no-go decision.
build
Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.
constraints
Define and enforce this project's quality bar — interview, sane defaults, CONSTRAINTS.md.
webperf
Run a web performance audit via the web-performance-auditor persona.
review
Conduct a five-axis code review — correctness, readability, architecture, security, performance.
plan
Break work into small verifiable tasks with acceptance criteria and dependency ordering.