A Claude Code skill that shrinks massive prompts and files using LLMLingua to save tokens.
SaferSkills independently audited ClaudeShrink (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
ClaudeShrink compresses large inputs using LLMLingua (gpt2) before you reason over them. This preserves semantic content while dramatically reducing token usage.
The compressor lives at: ~/.claude/skills/ClaudeShrink/scripts/compressor.py It runs inside an isolated venv at: ~/.claude/skills/ClaudeShrink/.venv
Follow these steps in order every time this skill is triggered:
test -f ~/.claude/skills/ClaudeShrink/.venv/bin/python && echo "ready" || echo "not_installed"ready, proceed to step 2.not_installed, run the installer first: bash ~/.claude/skills/ClaudeShrink/install.shIf install.sh is missing (skill was added without cloning), fetch and run it:
curl -fsSL https://raw.githubusercontent.com/g-akshay/ClaudeShrink/main/install.sh | bashWait for it to complete, then proceed to step 2.
--question flag that captures what they care about. Examples:--question "What errors occurred?"--question "What payment failures occurred?"--question "What warnings and errors occurred?"--question (blind compression) ~/.claude/skills/ClaudeShrink/.venv/bin/python ~/.claude/skills/ClaudeShrink/scripts/compressor.py /absolute/path/to/file.txt --question "derived question here"Write the actual input content into the heredoc (do not write a placeholder string):
TMP=$(mktemp /tmp/cs_input.XXXXXX.txt)
cat > "$TMP" << 'EOF'
[insert the full raw text content here]
EOF
~/.claude/skills/ClaudeShrink/.venv/bin/python ~/.claude/skills/ClaudeShrink/scripts/compressor.py "$TMP" --question "derived question here"
rm "$TMP""Input compressed with ClaudeShrink (LLMLingua). Compression stats: [paste ratio from stderr if available]."
Example 1 — Large log file with intent:
User: "Find all payment failures in this log: /var/log/app.log"
~/.claude/skills/ClaudeShrink/.venv/bin/python ~/.claude/skills/ClaudeShrink/scripts/compressor.py /var/log/app.log --question "What payment failures occurred?"Then analyze the compressed output.
Example 2 — Pasted text with intent:
User: "Summarize the errors in this log" then pastes 800 lines.
TMP=$(mktemp /tmp/cs_input.XXXXXX.txt)
cat > "$TMP" << 'EOF'
[full pasted content]
EOF
~/.claude/skills/ClaudeShrink/.venv/bin/python ~/.claude/skills/ClaudeShrink/scripts/compressor.py "$TMP" --question "What errors occurred?"
rm "$TMP"Example 3 — No specific focus:
User: "Compress this before you read it: [long prompt]"
Omit --question — blind compression applies.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.