sanitize

sanitize is a command for Claude Code from prime-radiant-inc/greenfield. It costs 17 tokens per session (2,463 once invoked), scanned A, original, Apache-2.0.

A command for cleaning raw analysis specifications so they describe system behavior without implementation details.

In plain words
What is it for?
Use it to process raw specification files, pass through public materials, and write sanitized results to an output workspace.
Why use it?
It separates reusable requirements from source-code wording while preserving information about the evidence behind them.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the TodoWrite tool.

Part of the greenfield plugin — 22 skills, 2 commands, 2 agents shipped together

Good fit Use it to process raw specification files, pass through public materials, and write sanitized results to an output workspace.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/prime-radiant-inc/greenfield/sanitize
Install

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.

Clone the repo
git clone --depth 1 https://github.com/prime-radiant-inc/greenfield

Made for: Claude Code.

Or install greenfield, the plugin that ships this one along with the rest of its 22 skills, 2 commands, 2 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sanitize

README.md
[![agentmods](https://agentmods.dev/badge/commands/prime-radiant-inc/greenfield/sanitize.svg)](https://agentmods.dev/commands/prime-radiant-inc/greenfield/sanitize)
Your own site
<a href="https://agentmods.dev/commands/prime-radiant-inc/greenfield/sanitize"><img src="https://agentmods.dev/badge/commands/prime-radiant-inc/greenfield/sanitize.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,463 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00017 $0.02463
Opus 5 $0.00009 $0.01231
Sonnet 5 $0.00003 $0.00493
Haiku 4.5 $0.00002 $0.00246

Measured 9d ago against content hash 9afe34cc28a5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

sanitize 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 9d 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.

commands/sanitize.md · 267 lines

How it starts

The opening of the file, as written. The whole thing — 267 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/sanitize - Spec Sanitization (Sanitization)

Workspace: $ARGUMENTS

YOUR MISSION

Remove ALL implementation contamination from analysis specs while preserving provenance metadata.

The sanitization pass turns raw analysis into specs an implementer can build from. Source-code references have no place in the output. But provenance metadata (confidence levels, source types, agent names) must be preserved — only raw file paths are stripped.

PHASE 1: Initial Assessment

First, verify the workspace and assess scope:

# Verify workspace structure
[ -d "$ARGUMENTS/raw/specs/" ] || { echo "ERROR: No raw specs found at $ARGUMENTS/raw/specs/"; exit 2; }

# Count files to sanitize
echo "=== Sanitization Scope ==="
echo "Raw specs files: $(find $ARGUMENTS/raw/specs/ -name '*.md' -type f | wc -l)"
echo "Public artifacts: $(find $ARGUMENTS/public/ -name '*.md' -type f 2>/dev/null | wc -l)"

PHASE 2: Public Source Pass-Through

Public artifacts contain no implementation details and pass through without modification:

# Copy public artifacts directly (no sanitization needed)
if [ -d "$ARGUMENTS/public/" ]; then
  mkdir -p $ARGUMENTS/output/public/
  cp -r $ARGUMENTS/public/* $ARGUMENTS/output/public/
  echo "Public artifacts copied: $(find $ARGUMENTS/output/public/ -name '*.md' | wc -l) files"
fi

PHASE 3: Agent-Based Sanitization

For EACH spec file in the raw tree, invoke the sanitizer worker.

# List all spec files
find $ARGUMENTS/raw/specs/ -name '*.md' -type f

For each file (or batch of related files), dispatch greenfield:sanitizer:

  • Prompt: "Follow the spec-sanitization skill for the full transformation methodology. Read $ARGUMENTS/raw/specs/<file-path>. Understand the behavioral intent. Rewrite without source references. Transform provenance citations (strip raw refs, preserve confidence). Write to $ARGUMENTS/output/specs/<relative-path>. For module specs, merge into behavioral domain files in $ARGUMENTS/output/specs/domains/."

Read the full file on GitHub · 267 lines

Changes

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.

  1. 9d ago First seen · 267 lines · 17 tokens per session scan A 9afe34cc28a5

Subscribe to this mod's changes

sanitize is a command published in the GitHub repository prime-radiant-inc/greenfield (273 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 17 tokens to every session and 2,463 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.