Skip to content
Development
Skill

/compress-prompt

Compress a Rosetta KB prompt artifact (skill · workflow · phase · rule · agent · template · generic) by stripping structural tautology and ineffective scaffolding while preserving every importance-bearing token. Use when the user asks to compress, shorten, tighten, densify, or

From plugin
rosetta
36678 skills24 agents71 commands

Claude Code

$ npx -y skills add griddynamics/rosetta --skill compress-prompt --agent claude-code

SKILL.md

compress-prompt.SKILL.md
name: compress-prompt
description: Compress a Rosetta KB prompt artifact (skill · workflow · phase · rule · agent · template · generic) by stripping structural tautology and ineffective scaffolding while preserving every importance-bearing token. Use when the user asks to compress, shorten, tighten, densify, or reduce a prompt / skill / workflow / phase / rule file.
disable-model-invocation: true

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>")` |

KEEP verbatim (never shrink / drop)

  • MANDATORY scope tags + nesting — structure is signal. OPTIONAL scopes EARN keep (load-bearing audit).
  • Grammar commands above + their args: file / skill / tool / model names, paths, section anchors.
  • CAPS importance markers: MUST · NEVER · DO NOT · HALT · WAIT · SELF-CHECK · HITL …
  • Per-scope / per-step instructions, kept IN their scope (e.g. update-state, gate notes).
  • Semantic distinctions: required vs recommended, blocking vs optional, default vs conditional.

CUT — where real reduction lives

  • Tautology → rule stated >1× across scopes; keep ONE authoritative copy, kill the echoes.
  • Pointer-echo → info already reachable via a named cite (invariant · `## scope` · file · skill) → NEVER re-assert or re-summarize it inline. Invariants → hoist to ONE always-on block; other echoes → cut. The pointer IS the content.
  • Meta-commentary explaining the prompt's own notation / convention to a reader.
  • Stale / orphaned items → reference a scheme, attribute, or value no longer present.
  • WHOLE-SCOPE echo → CUT the scope, not just its lines.
  • LOAD-BEARING test: delete scope → agent acts differently? No ⇒ cut.
  • Audit EACH scope, esp. references · best_practices · validation · pitfalls.
  • Keep ONLY signal unreachable elsewhere in-file / via cite.
  • Mandatory-but-echo scope → shrink to minimum unique nugget.
  • Lone nugget → hoist to load-bearing home, drop wrapper.
  • Repeated literals → define once as a short alias (e.g. `OUT/ = <long/path>`), reuse everywhere.
  • Cut the fluff.
  • Restated the same thing in different ways.
  • Everything obvious or already known by AI (keep only terms/nudges!).

COMPRESS

  • HARD CAP: every rule / bullet line < 10 words.
  • Group same-topic rules, merge, rephrase clearly, output as separate.
  • NO new lines as escape hatch.
  • Whole file: MAY add ≤ 10 lines total.
  • NEVER drop signal to hit the cap.
  • Verbose prose / step-narration the agent already infers → terse cue.

e.g. "ONE PHASE AT A TIME: read file, execute, update state, advance" → "ONE PHASE AT A TIME. READ JIT."

  • Favor unicode connectives for density: → · ⇒ ≠ ± … (English words only otherwise).
  • DENSE, USE TERMS, ACRONYMS, TERSE-phrases (not sentences!)
  • NUDGE using single words for ACTIONS, ASPECTS, THINKING, GOALS, REASONS, etc.

NEVER

  • Shave adjectives while leaving duplication intact (tiny gain, no structural fix).
  • Drop CAPS / grammar commands / per-step instructions / distinctions to hit a number.
  • Remove a schema-mandatory scope, or edit any schema / `ARCHITECTURE.md` file.
  • Re-inject your own explanations while compressing.
  • Remove items which sole purpose is process adherence, but you can compress it. Example "4. Update state
Read more
@griddynamics
Ships withrosetta

An instruction layer for AI coding agent

36678 skills24 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
366
Star history of griddynamics/rosetta on GitHub, a chart by star-history.com

Other skills on rosetta.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about compress-prompt.

Which coding agents can use compress-prompt?
compress-prompt installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.