agentsclimarketplace

Guard

Skill PJuniszewski/context-guard/skills/guard

Analyze and prepare prompts with JSON for safe context submissionFrom its SKILL.md

Install
npx -y skills add PJuniszewski/context-guard --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

  • 0 stars0 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.

SKILL.md

2.1 KB, 504 tokens by cl100k_base, 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)

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Gives 0 of the 12 instructions most quality gates skills give in 504 tokens

Counted across 1,195 of the 2,094 authors here whose files we hold, read 2026-08-07

  • Read the output and check the exit codein 54 of 1195, across 14 files
  • Verify requirements using a line-by-line checklistin 53 of 1195, across 12 files
  • Identify the verification command proving the claimin 51 of 1195, across 12 files
  • Run the full verification commandin 50 of 1195, across 11 files
  • Verify output confirms the claimin 49 of 1195, across 12 files
  • Check version control diff after agent delegationin 46 of 1195, across 6 files
  • State claim with evidencein 44 of 1195, across 4 files
  • Run the test suitein 33 of 1195, across 26 files
  • Keep state in memory by defaultin 27 of 1195, across 6 files
  • Make prototype runnable with one commandin 26 of 1195, across 5 files
  • Produce a verification reportin 25 of 1195, across 14 files
  • Detect the package manager from lockfilesin 24 of 1195, across 5 files

Said here and by no other author read

  • minify and losslessly reduce input data
  • count input tokens via api or heuristic
  • allow sampling for analysis mode
  • aggressively sample for summary mode
  • block sampling for forensics mode
  • emit warnings for forensic record queries

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 326,422. 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.