compress

compress is a skill for Claude Code from utk2103/Prompt-Studio. It costs 98 tokens per session (1,182 once invoked), scanned A, original, Apache-2.0.

A tool that shortens instruction and memory files while keeping their technical content, links, and structure. It replaces the original and stores a readable backup outside the source directory.

In plain words
What is it for?
It is for compressing files such as CLAUDE.md, todo lists, and preference files.
Why use it?
Shorter files use fewer input tokens whenever an agent loads them, while the backup preserves a readable copy of the previous version.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md.

Part of the prompt-studio plugin — 9 skills, 3 agents shipped together

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.

agentmods
npx agentmods add skills/utk2103/prompt-studio/compress
Any agent
npx skills add utk2103/Prompt-Studio --skill compress
Clone the repo
git clone --depth 1 https://github.com/utk2103/Prompt-Studio

Made for: Claude Code.

Or install prompt-studio, the plugin that ships this one along with the rest of its 9 skills, 3 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 compress

README.md
[![agentmods](https://agentmods.dev/badge/skills/utk2103/prompt-studio/compress.svg)](https://agentmods.dev/skills/utk2103/prompt-studio/compress)
Your own site
<a href="https://agentmods.dev/skills/utk2103/prompt-studio/compress"><img src="https://agentmods.dev/badge/skills/utk2103/prompt-studio/compress.svg" alt="Measured on agentmods" height="20"></a>
Per session 98 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,182 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00098 $0.01182
Opus 5 $0.00049 $0.00591
Sonnet 5 $0.00020 $0.00236
Haiku 4.5 $0.00010 $0.00118

Measured 6d ago against content hash 875e47104632, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

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 6d ago.

The scan reads SKILL.md. This mod also ships 7 executable files (scripts/__init__.py, scripts/__main__.py, scripts/benchmark.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/compress/SKILL.md · 114 lines

How it starts

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

Prompt-Studio Compress

Purpose

Compress natural language files (CLAUDE.md, todos, preferences) into compressed form to reduce input tokens. Compressed version overwrites original. Human-readable backup saved as <filename>.original.md, but NOT beside the source file — it lives in an out-of-tree data dir ($XDG_DATA_HOME/prompt-studio-compress/backups/<parent-dir-name>/, or %LOCALAPPDATA%\prompt-studio-compress\backups\<parent-dir-name>\ on Windows) so skill auto-loaders don't re-ingest it as a live file.

Trigger

/prompt-studio:compress <filepath> or when user asks to compress a memory file.

Process

  1. The compression scripts live in scripts/ (adjacent to this SKILL.md). If the path is not immediately available, search for scripts/__main__.py next to this SKILL.md.

  2. From the directory containing this SKILL.md, run:

python3 -m scripts <absolute_filepath>

  1. The CLI will:
  • detect file type (no tokens)
  • call Claude to compress
  • validate output (no tokens)
  • if errors: cherry-pick fix with Claude (targeted fixes only, no recompression)
  • retry up to 2 times
  • if still failing after 2 retries: report error to user, leave original file untouched
  1. Return result to user

Compression 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)
  • Inline code (backtick content)
  • URLs and links (full URLs, markdown links)
  • File paths (/src/components/..., ./config.yaml)
  • Commands (npm install, git commit, docker build)
  • Technical terms (library names, API names, protocols, algorithms)
  • Proper nouns (project names, people, companies)
  • Dates, version numbers, numeric values
  • Environment variables ($HOME, NODE_ENV)

Read the full file on GitHub · 114 lines

Files

What ships with it

9 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 6d ago First seen · 114 lines · 98 tokens per session scan A 875e47104632

Subscribe to this mod's changes

compress is a skill published in the GitHub repository utk2103/Prompt-Studio (7 stars, last pushed 5d ago), licensed Apache-2.0. It adds 98 tokens to every session and 1,182 once invoked, about $0.0005 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-31.

Related

Other skills, from other repositories

a-memory-is-not-a-trigger

Use when you're relying on a stored memory, a recalled note, an injected session-start banner, or a description-matched skill to make a required action happen every session or run — especially a recurring logging, bookkeeping, or guardrail step. Passive context is advisory: the agent reads it and can still skip the…

iamakbarsha1/whetstone · 163 tokens

avoid-ai-writing

Audit and rewrite content to remove AI writing patterns ("AI-isms"). Use this skill when asked to "remove AI-isms," "clean up AI writing," "edit writing for AI patterns," "audit writing for AI tells," or "make this sound less like AI." Supports a detect-only mode, an edit-in-place mode for files, an optional voice…

conorbronsdon/avoid-ai-writing · 97 tokens

ai-writing-detector

Use when the user asks to detect, scan, audit, score, or flag AI-writing patterns without rewriting the text, including requests for a deterministic local detector result when the host can execute Node.

conorbronsdon/avoid-ai-writing · 44 tokens

preservation-verifier

Use when the user provides an original and rewritten version, asks whether a rewrite preserved protected content, or wants a deterministic check for code, frontmatter, quotes, tables, links, paths, numbers, headings, and residual AI-pattern regressions.

conorbronsdon/avoid-ai-writing · 54 tokens

avoid-ai-writing-router

Use when a request combines AI-writing audit, rewrite, file editing, voice preservation, false-positive interpretation, verification, or when the user invokes Avoid AI Writing without naming a mode.

conorbronsdon/avoid-ai-writing · 41 tokens

file-edit-in-place

Use when the user names a local file and explicitly asks to clean, rewrite, humanize, or remove AI-writing patterns in that file itself, with minimal targeted edits and post-edit verification.

conorbronsdon/avoid-ai-writing · 43 tokens