vbw:compress

vbw:compress is a command for Claude Code from swt-labs/vibe-better-with-claude-code-vbw. It costs 29 tokens per session (1,065 once invoked), scanned A, original, MIT.

A command that rewrites a Markdown or text file into a much shorter, simplified form while keeping code blocks, links, and structure. It creates a backup before changing the file.

In plain words
What is it for?
Use it to compress a supported .md, .txt, or extensionless file after checking that it exists and is within the allowed size.
Why use it?
It reduces the amount of text an AI tool must read, which can lower input-token use. The backup provides a copy of the original if the compressed version is unsuitable.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the vbw plugin — 11 skills, 26 commands, 7 agents, 11 hooks shipped together

Good fit Use it to compress a supported .md, .txt, or extensionless file after checking that it exists and is within the allowed size.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/swt-labs/vibe-better-with-claude-code-vbw/compress
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/swt-labs/vibe-better-with-claude-code-vbw

Made for: Claude Code.

Or install vbw, the plugin that ships this one along with the rest of its 11 skills, 26 commands, 7 agents, 11 hooks.

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 vbw:compress

README.md
[![agentmods](https://agentmods.dev/badge/commands/swt-labs/vibe-better-with-claude-code-vbw/compress.svg)](https://agentmods.dev/commands/swt-labs/vibe-better-with-claude-code-vbw/compress)
Your own site
<a href="https://agentmods.dev/commands/swt-labs/vibe-better-with-claude-code-vbw/compress"><img src="https://agentmods.dev/badge/commands/swt-labs/vibe-better-with-claude-code-vbw/compress.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,065 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.00029 $0.01065
Opus 5 $0.00015 $0.00532
Sonnet 5 $0.00006 $0.00213
Haiku 4.5 $0.00003 $0.00106

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

Security

Grade A, and why

vbw:compress 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 8d 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/compress.md · 97 lines

How it starts

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

VBW Compress: $ARGUMENTS

Guard

  • No $ARGUMENTS: STOP "Usage: /vbw:compress path/to/file.{md|txt} (or extensionless file)"

Steps

  1. Validate input file:
TARGET="$ARGUMENTS"
if [ ! -f "$TARGET" ]; then echo "ERROR: File not found: $TARGET"; exit 1; fi
SIZE=$(wc -c < "$TARGET" | tr -d ' ')
if [ "$SIZE" -gt 512000 ]; then echo "ERROR: File too large (${SIZE} bytes, max 500KB)"; exit 1; fi
BASENAME="${TARGET##*/}"
case "$BASENAME" in
  *.*) EXT="${BASENAME##*.}" ;;
  *)   EXT="" ;;
esac
case "$EXT" in md|txt|"") ;; *) echo "ERROR: Only .md, .txt, or extensionless files supported"; exit 1;; esac
echo "OK: $TARGET ($SIZE bytes)"

If the guard fails, STOP with the error message.

  1. Create backup:
case "$TARGET" in
  *.*) BACKUP="${TARGET%.*}.original.${TARGET##*.}";;
  *)   BACKUP="${TARGET}.original";;
esac
if [ -e "$BACKUP" ]; then
  _i=1; while [ -e "${BACKUP%.*}.${_i}.${BACKUP##*.}" ] 2>/dev/null; do _i=$((_i+1)); done
  case "$BACKUP" in *.*) BACKUP="${BACKUP%.*}.${_i}.${BACKUP##*.}";; *) BACKUP="${BACKUP}.${_i}";; esac
fi
cp "$TARGET" "$BACKUP"
echo "Backup: $BACKUP"
  1. Read the original file in full. Then compress it following these rules:

Remove

  • Articles: a, an, the
  • Filler: just, really, basically, actually, simply, essentially, generally
  • Pleasantries: "sure", "certainly", "of course", "happy to", "I'd recommend"
  • Hedging: "it might be worth", "you could consider", "it would be good to"
  • Redundant phrasing: "in order to" → "to", "make sure to" → "ensure", "the reason is because" → "because"
  • Connective fluff: "however", "furthermore", "additionally", "in addition"

Preserve EXACTLY (never modify)

  • Code blocks (fenced ``` and indented) — copy byte-for-byte, including comments and spacing
  • Inline code (backtick content)
  • URLs and links
  • File paths and commands
  • Technical terms, proper nouns, dates, version numbers
  • Environment variables

Preserve structure

  • All markdown headings (exact heading text, compress body)
  • Bullet/number hierarchy and nesting
  • Tables (compress cell text, keep structure)
  • Frontmatter/YAML headers

Read the full file on GitHub · 97 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. 8d ago First seen · 97 lines · 29 tokens per session scan A acd996c387d1

Subscribe to this mod's changes

vbw:compress is a command published in the GitHub repository swt-labs/vibe-better-with-claude-code-vbw (79 stars, last pushed 2mo ago), licensed MIT. It adds 29 tokens to every session and 1,065 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.