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 skills/pjuniszewski/cook/guardnpx skills add PJuniszewski/cook --skill 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.00012 | $0.00530 |
| Opus 5 | $0.00006 | $0.00265 |
| Sonnet 5 | $0.00002 | $0.00106 |
| Haiku 4.5 | $0.00001 | $0.00053 |
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 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.
How it starts
The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context Guard Skill
Epistemic safety analysis for JSON data in prompts. Prevents LLMs from reasoning with unjustified certainty when input data is incomplete.
Features
- Lossless reduction - Minify, columnar transform, remove nulls
- Token counting - API or heuristic fallback
- Decision engine - ALLOW / SAMPLE / BLOCK
- Intelligent trimming - First + last + evenly-spaced sampling
- Forensic detection - Warns when specific record queries detected
Usage
When /guard is invoked, execute the guard script:
For file paths:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/guard_cmd.py" "<file_path>" [options]
For inline JSON data:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/guard_cmd.py" - [options] <<'GUARD_INPUT'
<json_data>
GUARD_INPUT
Options
| 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 |
Semantic Modes
| 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?" |
Output
============================================================
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
============================================================
Requirements
- Python 3.8+
ANTHROPIC_API_KEYenvironment variable (for token counting)
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.
- 2d ago First seen · 76 lines · 12 tokens per session scan A db502425cacf
guard is a skill published in the GitHub repository PJuniszewski/cook (13 stars, last pushed 6mo ago), licensed MIT. It adds 12 tokens to every session and 530 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 skills, from other repositories
ai-cost-token-optimizer
Expert guide for LLM API cost optimization, Prompt Caching, model routing (Flash/Pro/Opus), semantic caching, and token budgeting / Panduan ahli optimasi biaya API LLM, Prompt Caching, model routing, dan semantic caching.
ai-prompt-engineering-expert
Expert guide for systematic Prompt Engineering, Chain-of-Thought, few-shot prompting, structured output (JSON mode), prompt versioning, and LLM evaluation / Panduan ahli rekayasa prompt dan evaluasi LLM.
ai-product
Every product will be AI-powered. The question is whether you'll build it right or ship a demo that falls apart in production. This skill covers LLM integration patterns, RAG architecture, prompt engineering that scales, AI UX that users trust, and cost optimization that doesn't bankrupt you. Use when "keywords…
constraint-driven-development
Establishes a project's quality bar as a written contract and stops agents quietly lowering it. Interviews the user on which dimensions matter, supplies sane default thresholds when they have no number in mind, records everything in CONSTRAINTS.md, and watches the diff for a weakened bar — new @ts-ignore or…
test-driven-development
Drives development with tests. Use when implementing any logic, fixing any bug, or changing any behavior. Use when you need to prove that code works, when a bug report arrives, or when you're about to modify existing functionality.
deprecation-and-migration
Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when deciding whether to maintain or sunset existing code.