Agent skill

Compress Prompt

by griddynamics in griddynamics/rosetta

Compress a Rosetta KB prompt artifact (skill · workflow · phase · rule · agent · template · generic) by stripping structural tautology and ineffective scaffolding while preserving every…

Apache-2.0Auto-check passedDevelopment

Install Compress Prompt

skills CLI
$ npx skills add griddynamics/rosetta --skill compress-prompt -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install griddynamics/rosetta compress-prompt --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/griddynamics/rosetta.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/compress-prompt .claude/skills/compress-prompt && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
compress-prompt
GitHub stars
354
Token cost
~2.2k tokens
SKILL.md length
1,128 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
Apache-2.0

At a glance

Compress a Rosetta KB prompt artifact (skill · workflow · phase · rule · agent · template · generic) by stripping structural tautology and ineffective scaffolding while preserving every…

  • Works in 4 steps: CUT — FIRST whole-scope load-bearing… → GROUP + REPHRASE — cluster same-topic… → COMPRESS — densify → ## COMPRESS. → …
  • The user asks to compress
  • SKILL.md covers Mental model, Allowed reads — read-only,…, KEEP verbatim (never shrink /… and CUT — where real reduction lives, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Compress Prompt is an agent skill from griddynamics/rosetta. 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.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Project scaffolding. The repository describes itself as: An instruction layer for AI coding agent. The licence is Apache-2.0.

When your agent uses it

  • The user asks to compress
  • Reduce a prompt / skill / workflow / phase / rule file

Example prompts

  • “/compress-prompt”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. CUT — FIRST whole-scope load-bearing audit, THEN line/rule cuts → ## CUT.
  2. GROUP + REPHRASE — cluster same-topic rules → merge → rephrase clearly → output as SEPARATE lines. NEVER defer duplication to a later pass.
  3. COMPRESS — densify → ## COMPRESS.
  4. HARD CAP — every rule/bullet line < 10 words; NO line-splitting to cheat; NEVER drop signal for the cap; whole file MAY add ≤ 10 lines.

What it can do on your machine

Read from SKILL.md and the folder at commit 5441232. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Compress Prompt loads about 2.2k tokens when it runs. Until then it costs about 87 tokens; SKILL.md has 1,128 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~87
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from griddynamics/rosetta at commit 5441232, republished under its Apache-2.0 licence (© griddynamics). 1,128 words, ~2,161 tokens.

Download SKILL.mdSave it as .claude/skills/compress-prompt/SKILL.md (or your agent's skills folder).
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:

CommandSemantics
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>.mdinvoke a whole workflow / load without executing
APPLY PHASE <file>.mdload + 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>.mdload / load+execute a rule
READ TEMPLATE <file>.mdload a template
READ CONFIGURE <tool>.mdload an IDE/agent configure spec
LIST <path>enumerate immediate children of a KB folder
ACQUIRE <path> FROM KBMCP-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.
Show full SKILL.md (436 more words)Show less

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 file based on current state file path." in each phase => compress to 4. Update state

TRANSFORM — ordered passes, LOOP until iteration cannot compress any more

INVARIANTS (always-on, declared once): ## KEEP verbatim + ## NEVER. Run passes IN ORDER; skip none.

  1. CUT — FIRST whole-scope load-bearing audit, THEN line/rule cuts → ## CUT.
  2. GROUP + REPHRASE — cluster same-topic rules → merge → rephrase clearly → output as SEPARATE lines. NEVER defer duplication to a later pass.
  3. COMPRESS — densify → ## COMPRESS.
  4. HARD CAP — every rule/bullet line < 10 words; NO line-splitting to cheat; NEVER drop signal for the cap; whole file MAY add ≤ 10 lines. ↺ Repeat from pass 1 until a full loop changes nothing — each pass exposes new cuts/merges.

Process (HITL)

  1. Read target + its type schema + the grammar above. Nothing else.
  2. Inventory: per-scope purpose + LOAD-BEARING verdict (keep/shrink/cut) + duplications, stale items, repeated literals.
  3. Draft the compressed artifact as file next to current one, running ## Transform to fixpoint. Do not overwrite yet.
  4. HITL: present to the user → word Δ (before→after, %) + where the cuts came from + your reasoned take on the subagent findings.
  5. VERIFY via subagent — INVOKE SUBAGENT (Sonnet-5 class, low reasoning (!), e.g. claude-sonnet-5) with a fresh read of OLD vs NEW, asking only:
    • Does anything change in an executing agent's understanding or behavior?
    • Is anything now ambiguous, underspecified, or lost?
    • Any rule / gate / distinction present in OLD but missing or weaker in NEW?
    • Any whole scope that only rephrases other scopes? → cut.
    • Anything else can be compressed? Anything you feel like you already know?
    • Any rules or phrases too verbose?
    • Anything that is obvious?
  6. Do NOT auto-apply the subagent's output. CRITICALLY evaluate its findings — decide which are real vs noise, and why; adjust the draft only where a finding is genuine.
  7. HITL: present to the user → proposed artifact + word Δ (before→after, %) + where the cuts came from + your reasoned take on the subagent findings.
  8. On explicit user approval → write the TARGET file only.

If you learned something new which is reusable, there are process efficiency improvements, you can prevent failures in the future, update ## Lessons learned below for self-improvement.

Lessons learned (self-improvement, keep updating, first line is template, keep template, follow "<instructions>", high confidence only):

  • <key action item, less then 7 words> <concise/terse: what happened, why, root cause, reasoning, less then 25 words>.

© griddynamics, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/compress-prompt of griddynamics/rosetta.

Open the folder on GitHubat commit 5441232

Compare with similar skills

Compress Prompt next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Compress Prompt compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Compress Prompt this skillgriddynamics/rosetta354—~2.2kAutomated safety check: PassApache-2.0
Nx Generatenomcopter/react-mosaic4.8k7 repos~1.9kAutomated safety check: PassCustom licence
PonytailDavidObando/gsharp5658 repos~1.7kAutomated safety check: PassMIT
Run Nx Generatornrwl/nx29k2 repos~592Automated safety check: NotesMIT
Conductor Setupgemini-cli-extensions/conductor3.8k—~4.2kAutomated safety check: PassApache-2.0
Mirage VFS Adapter Authoringstrukto-ai/mirage3.7k—~2.5kAutomated safety check: PassApache-2.0

Similar skills

  • Nx Generate

    nomcopter/react-mosaic

    Generate code using nx generators. An agent skill from nomcopter/react-mosaic.

    4.8k GitHub starsUsed in 7 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Ponytail

    DavidObando/gsharp

    Forces the laziest solution that actually works, simplest, shortest, most minimal.

    565 GitHub starsUsed in 8 repos~1.7k tokens
    DevelopmentAuto-check passed
  • Run Nx generators with prioritization for workspace-plugin generators.

    29k GitHub starsUsed in 2 repos~592 tokens
    DevelopmentAuto-check: notes
  • Conductor Setup

    gemini-cli-extensions/conductor

    Scaffolds the project and sets up the Conductor environment.

    3.8k GitHub stars~4.2k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Builds or extends a custom Mirage virtual filesystem adapter for an API, database, object store or app data, with a working mount configuration and filesystem tests.

    3.7k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Enforces this repository's TypeScript backend module architecture under server/: feature folders, barrel exports, and where shared types and utilities belong.

    14k GitHub stars~1.2k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from griddynamics/rosetta

All 12 skills in this repo
  • Collect GitHub Stats

    griddynamics/rosetta

    Collect GitHub repo health/usage stats into merged JSON. An agent skill from griddynamics/rosetta.

    354 GitHub stars~415 tokensUpdated 8 days ago
    Auto-check passed
  • External Lib Flow

    griddynamics/rosetta

    Workflow for onboarding an external private library so AI can use it without source access.

    354 GitHub stars~1.5k tokensUpdated 8 days ago
    Auto-check passed
  • Specflow Use

    griddynamics/rosetta

    To connect Rosetta with Grid Dynamics SpecFlow MCP; only when SpecFlow is mentioned and the MCP is installed.

    354 GitHub stars~780 tokensUpdated 8 days ago
    Auto-check passed
  • Harness

    griddynamics/rosetta

    To build an AI harness: run, observe, validate, automate repeated work faster — CLI/MCP actions, devcontainers, skills, subagents, hooks, pipelines, automations.

    354 GitHub stars~1.5k tokensUpdated 8 days ago
    Auto-check passed
  • Coding Agents Farm

    griddynamics/rosetta

    To orchestrate parallel coding-agent farms (Claude, Codex, Copilot, Gemini, etc.) on isolated git worktrees.

    354 GitHub stars~2.4k tokensUpdated 8 days ago
    Auto-check passed
  • Coding Agents Hooks Authoring

    griddynamics/rosetta

    To author, register, and test Rosetta hooks, add a SemanticKind, or debug a hook that won't fire.

    354 GitHub stars~1.4k tokensUpdated 8 days ago
    Auto-check passed

Categories

Questions about Compress Prompt

What does Compress Prompt do?

Compress a Rosetta KB prompt artifact (skill · workflow · phase · rule · agent · template · generic) by stripping structural tautology and ineffective scaffolding while preserving every…. Compress Prompt is an agent skill from griddynamics/rosetta. 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.

When should I use Compress Prompt?

Compress Prompt fits situations like: the user asks to compress; reduce a prompt / skill / workflow / phase / rule file.

How do I install Compress Prompt in Claude Code?

Run `npx skills add griddynamics/rosetta --skill compress-prompt -a claude-code`. Or copy the skill folder (.claude/skills/compress-prompt in griddynamics/rosetta) into .claude/skills/compress-prompt in your project. Claude Code loads it when a task matches its description.

How do I install Compress Prompt in Codex?

Run `npx skills add griddynamics/rosetta --skill compress-prompt -a codex`. Or copy the skill folder (.claude/skills/compress-prompt in griddynamics/rosetta) into .agents/skills/compress-prompt in your project. Codex loads it when a task matches its description.

Can I use Compress Prompt in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add griddynamics/rosetta --skill compress-prompt -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/compress-prompt, .gemini/skills/compress-prompt, .github/skills/compress-prompt and .opencode/skills/compress-prompt in your project.

What does Compress Prompt need to run?

SKILL.md names no scripts, command-line tools or credentials: Compress Prompt is instructions for the agent only.

Does Compress Prompt access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Compress Prompt safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Compress Prompt use?

Compress Prompt is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Compress Prompt use?

About 2.2k tokens (SKILL.md is roughly 8.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Compress Prompt?

Skills that share tags, products or a category with Compress Prompt: Nx Generate (nomcopter/react-mosaic, 4.8k stars), Ponytail (DavidObando/gsharp, 565 stars), Run Nx Generator (nrwl/nx, 29k stars) and Conductor Setup (gemini-cli-extensions/conductor, 3.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Compress Prompt?

griddynamics (a GitHub organization) maintains it in griddynamics/rosetta, which has 354 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on September 29, 2026.

Source: griddynamics/rosetta on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.