agentsclimarketplace

Guard

Skill PJuniszewski/cook/.claude/skills/guard

Install
npx -y skills add PJuniszewski/cook --skill guard

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 13 stars13 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Analyze and prepare prompts with JSON for safe context submission

SKILL.md

2.1 KB, as published. Nobody here has run it

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

OptionDescription
--modeanalysis|summary|forensics (default: auto-detect)
--forceBypass blocks, emit warnings only
--allow-samplingPermit sampling for forensic queries
--no-reduceSkip lossless reduction phase
--budget-tokens NToken budget (default: 3500)
--print-onlyOutput report only, never auto-send
--jsonOutput result as JSON

Semantic Modes

ModeSamplingUse Case
analysisAllowed"What categories exist?", "Price range?"
summaryAggressive"Describe the data structure"
forensicsBLOCKED"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_KEY environment variable (for token counting)

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.