compress-prompt

compress-prompt is a skill for Claude Code, Codex from griddynamics/rosetta. It costs 71 tokens per session (2,143 once invoked), scanned A, original, Apache-2.0.

A prompt-editing workflow for shortening instructions given to a coding agent while keeping the details that affect its work.

In plain words
What is it for?
Use it to tighten prompts, skills, workflows, rules, templates, and other instruction documents.
Why use it?
Long prompts can bury important instructions under repeated structure and filler. It helps reduce distraction without removing essential meaning.

Skill for Claude CodeCodex

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/griddynamics/rosetta/compress-prompt
Any agent
npx skills add griddynamics/rosetta --skill compress-prompt
Clone the repo
git clone --depth 1 https://github.com/griddynamics/rosetta

Made for: Claude Code, Codex.

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-prompt

README.md
[![agentmods](https://agentmods.dev/badge/skills/griddynamics/rosetta/compress-prompt.svg)](https://agentmods.dev/skills/griddynamics/rosetta/compress-prompt)
Your own site
<a href="https://agentmods.dev/skills/griddynamics/rosetta/compress-prompt"><img src="https://agentmods.dev/badge/skills/griddynamics/rosetta/compress-prompt.svg" alt="Measured on agentmods" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,143 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 $0.00071 $0.02143
Opus 5 $0.00036 $0.01071
Sonnet 5 $0.00014 $0.00429
Haiku 4.5 $0.00007 $0.00214

Measured 4d ago against content hash 9419ddf446a2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

compress-prompt 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 4d 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.

.claude/skills/compress-prompt/SKILL.md · 123 lines

How it starts

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

Compress a KB Prompt

Mental model

  • The artifact you compress is loaded into a coding agent that runs in ANOTHER repo, on ANOTHER user's task. Every token becomes that agent's context → scaffolding = distraction that dilutes focus.
  • Compress ≠ shrink words. Compress = strip scaffolding, keep 100% signal, sharpen focus, replace with meaningful unicode characters, like arrows.
  • Reader is AI like you, capable: it already knows the domain AND the KB grammar. Use terms and acronyms. Don't explain — nudge.
  • CAPS = importance. Word count is an OUTCOME, never a target.
  • INVARIANT ≠ STEP. Invariants (always-on constraints) → declare ONCE, flag always-on. Steps → ordered, run once. NEVER re-assert an invariant as per-step reminders — that's the echo authors reflexively add; compress hoists + cuts it.
  • GOLDEN RULE: NEVER trade a high-value token for a few saved words (unless it is repeatedly used and overall gives high results, we can loose 2% of value overall).
  • BULLETS vs ORDERED: ALWAYS convert bullets to ordered lists, if work is sequential or can be sequential. Reason: aligns with AI sequential token generation.
  • DENSIFY EVERY rule.
  • Take time to think during reasoning, take different options, iterate multiple times TRANSFORM.
  • Your task is MAXIMUM compression, not just low hanging fruits!
  • NO rush, TAKE time
  • Don't bring this skill terms or meta-thinking
  • Identify what is load bearing

Allowed reads — read-only, NEVER adjust

Read ONLY: the target artifact + its type schema + the grammar below. Nothing else. Stay focused.

Schemas (learn which XML scopes are MANDATORY vs optional, and each scope's role):

  • docs/schemas/skill.md
  • docs/schemas/workflow.md
  • docs/schemas/phase.md
  • docs/schemas/rule.md
  • docs/schemas/agent.md
  • docs/schemas/template.md
  • docs/schemas/generic.md

Grammar — directive commands the system ACTS ON; protect verbatim + their args:

Command Semantics
USE SKILL <name> / READ SKILL <name> activate skill (load SKILL.md + act) / load content only
READ SKILL FILE <subpath> / APPLY SKILL FILE <subpath> load / load+execute a file of the CURRENT skill; never names a skill (isolation is grammar-enforced)
USE FLOW <name>.md / READ FLOW <name>.md invoke a whole workflow / load without executing
APPLY PHASE <file>.md load + fully execute the next phase body of a running workflow
INVOKE SUBAGENT <name> / READ SUBAGENT <name> spawn subagent / load its definition only
READ RULE <file>.md / APPLY RULE <file>.md load / load+execute a rule
READ TEMPLATE <file>.md load a template
READ CONFIGURE <tool>.md load an IDE/agent configure spec
LIST <path> enumerate immediate children of a KB folder
ACQUIRE <path> FROM KB MCP-only, generated shells: query_instructions(tags="<path>")

Read the full file on GitHub · 123 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. 4d ago First seen · 123 lines · 71 tokens per session scan A 9419ddf446a2

Subscribe to this mod's changes

compress-prompt is a skill published in the GitHub repository griddynamics/rosetta (342 stars, last pushed today), licensed Apache-2.0. It adds 71 tokens to every session and 2,143 once invoked, about $0.0004 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.