Agent skill

OmniRoute Prompt Compression

by diegosouzapw in diegosouzapw/OmniRoute

Configures OmniRoute's RTK, Caveman and stacked compression modes, manages language packs and rules, and previews token savings of 60 to 90 percent.

MITAuto-check passedAI & LLM Engineering

Install OmniRoute Prompt Compression

skills CLI
$ npx skills add diegosouzapw/OmniRoute --skill omni-compression -a claude-code

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

GitHub CLI
$ gh skill install diegosouzapw/OmniRoute omni-compression --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/diegosouzapw/OmniRoute.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/omni-compression .claude/skills/omni-compression && 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
omni-compression
GitHub stars
74k
Token cost
~1.6k tokens
SKILL.md length
299 words
Files
1
Skills in repo
50
Repo updated
First seen
Licence
MIT

At a glance

Configures OmniRoute's RTK, Caveman and stacked compression modes, manages language packs and rules, and previews token savings of 60 to 90 percent.

  • Cutting token spend on long agent prompts
  • SKILL.md covers Overview, Authentication, Endpoints and Payloads, plus 11 more sections
  • Calls curl; needs OMNIROUTE_KEY and OMNIROUTE_TOKEN
  • Previewing what compression does to one specific payload

What it does

OmniRoute compresses token payloads before it forwards them to providers, and this skill is the control surface for that behavior. RTK handles command output, Caveman handles prose, and the two can be stacked. Once configured, the setting applies to every request without any change to calling code.

Endpoints preview compression for a message payload, compare results and verify a comparison, list the available engines, list the Caveman language packs and rule metadata, and retrieve stored output. The gateway also serves a full OpenAPI spec for exact request shapes. Setup requires OMNIROUTE_URL and OMNIROUTE_KEY.

When your agent uses it

  • Cutting token spend on long agent prompts
  • Previewing what compression does to one specific payload
  • Adding or inspecting Caveman language packs and rules
  • Comparing compression engines on the same message

Example prompts

  • “Preview Caveman compression on this prompt and report the token savings.”
  • “Which Caveman language packs does my OmniRoute have?”
  • “Compare RTK against stacked compression on this tool output.”

Requirements

  • An OmniRoute instance with OMNIROUTE_URL and OMNIROUTE_KEY set

What it can do on your machine

Read from SKILL.md and the folder at commit f8a8131. 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

    Shell commands in SKILL.md call:

    • curl

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

  • Network

    No URLs in SKILL.md. Its commands use curl, which can reach the network depending on how they are called.

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

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • OMNIROUTE_KEY
    • OMNIROUTE_TOKEN
    • REQUIRE_API_KEY

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

Context cost

OmniRoute Prompt Compression loads about 1.6k tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 299 words of instructions outside code blocks.

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

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 diegosouzapw/OmniRoute at commit f8a8131, republished under its MIT licence (© diegosouzapw). 299 words, ~1,611 tokens.

Download SKILL.mdSave it as .claude/skills/omni-compression/SKILL.md (or your agent's skills folder).
name
omni-compression
description
Configure RTK (command output), Caveman (prose), and stacked compression modes. Manage language packs, custom rules, and test prompt compression reducing tokens by 60–90%.
<!-- generated by src/lib/agentSkills/generator.ts; manual edits will be overwritten -->

Overview

Configure RTK (command output), Caveman (prose), and stacked compression modes. Manage language packs, custom rules, and test prompt compression reducing tokens by 60–90%.

Authentication

All requests require a valid Bearer token or session cookie. Obtain a token via POST /api/auth/login or configure REQUIRE_API_KEY=false for local development.

Endpoints

POST /api/compression/preview

Preview compression for a message payload

bash
curl -X POST https://localhost:20128/api/compression/preview \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
GET /api/compression/language-packs

List Caveman compression language packs

bash
curl https://localhost:20128/api/compression/language-packs \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
GET /api/compression/rules

List Caveman compression rule metadata

bash
curl https://localhost:20128/api/compression/rules \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
POST /api/compression/compare

POST compression › compare

bash
curl -X POST https://localhost:20128/api/compression/compare \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
POST /api/compression/compare/verify

POST compression › compare › verify

bash
curl -X POST https://localhost:20128/api/compression/compare/verify \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
GET /api/compression/engines

GET compression › engines

bash
curl https://localhost:20128/api/compression/engines \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
POST /api/compression/retrieve

POST compression › retrieve

bash
curl -X POST https://localhost:20128/api/compression/retrieve \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Payloads

See the full OpenAPI specification at GET /api/openapi/spec or docs/openapi.yaml for detailed request/response schemas.

<!-- skill:custom-start -->
<!-- Migrated from skills/omniroute-compression/SKILL.md (preserved curated content) -->

OmniRoute — Compression

Requires OMNIROUTE_URL and OMNIROUTE_KEY. See entry-point SKILL for setup.

Overview

OmniRoute compresses token payloads before forwarding to providers. No code changes required — set it once, it applies to all requests transparently.

EngineBest forTypical savings
RTKTerminal / build / test / git output60–90%
CavemanHuman prose, chat history46% input
Stacked (rtk → caveman)Mixed coding sessions78–95%
MCP accessibility filterBrowser/accessibility tool results60–80%

Get current settings

bash
curl $OMNIROUTE_URL/api/settings/compression \
  -H "Authorization: Bearer $OMNIROUTE_KEY"

Enable RTK (best for coding agents)

bash
curl -X PUT $OMNIROUTE_URL/api/settings/compression \
  -H "Authorization: Bearer $OMNIROUTE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "mode": "rtk", "enabled": true }'

Enable stacked mode (maximum savings)

bash
curl -X PUT $OMNIROUTE_URL/api/settings/compression \
  -H "Authorization: Bearer $OMNIROUTE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "stacked",
    "enabled": true,
    "stackedPipeline": ["rtk", "caveman"]
  }'

Enable Caveman (prose / chat)

bash
curl -X PUT $OMNIROUTE_URL/api/settings/compression \
  -H "Authorization: Bearer $OMNIROUTE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "mode": "standard", "enabled": true }'

Caveman intensities: lite (safe), standard (balanced), aggressive (long sessions), ultra (context recovery).

Preview compression before enabling

bash
curl -X POST $OMNIROUTE_URL/api/compression/preview \
  -H "Authorization: Bearer $OMNIROUTE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "rtk",
    "text": "$ npm test\n> jest\n\nPASS src/a.test.ts (2.1s)\nPASS src/b.test.ts (1.8s)\n..."
  }'

Response includes compressed, original_length, compressed_length, savings_pct.

MCP accessibility-tree filter (browser agent use)

When OmniRoute is used with browser/Playwright MCP tools, it automatically compresses verbose accessibility-tree tool results. Enabled by default; configure thresholds:

bash
curl -X PUT $OMNIROUTE_URL/api/settings/compression \
  -H "Authorization: Bearer $OMNIROUTE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mcpAccessibility": {
      "enabled": true,
      "collapseThreshold": 30,
      "maxTextChars": 50000
    }
  }'

collapseThreshold: collapse sibling lines when ≥ N repeats (default 30).
maxTextChars: hard truncate after N chars with navigation hint (default 50000).

Language packs (Caveman)

Caveman supports language-aware rules for pt-BR, es, de, fr, ja:

bash
curl -X PUT $OMNIROUTE_URL/api/settings/compression \
  -H "Authorization: Bearer $OMNIROUTE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "standard",
    "cavemanConfig": {
      "language": "pt-BR",
      "autoDetectLanguage": true
    }
  }'

Via MCP

omniroute_compression_status     → current settings + savings analytics
omniroute_compression_configure  → update mode/threshold/language
omniroute_set_compression_engine → switch engine at runtime

Disable compression

bash
curl -X PUT $OMNIROUTE_URL/api/settings/compression \
  -H "Authorization: Bearer $OMNIROUTE_KEY" \
  -d '{ "enabled": false }'

Errors

  • 400 invalid mode → use off, lite, standard, aggressive, ultra, rtk, or stacked
  • 400 invalid stackedPipeline → array must contain valid engine ids (rtk, caveman)
<!-- skill:custom-end -->

© diegosouzapw, MIT. 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 skills/omni-compression of diegosouzapw/OmniRoute.

Open the folder on GitHubat commit f8a8131

Compare with similar skills

OmniRoute Prompt Compression 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.

OmniRoute Prompt Compression compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
OmniRoute Prompt Compression this skilldiegosouzapw/OmniRoute74k—~1.6kAutomated safety check: PassMIT
Agents Best PracticesDenisSergeevitch/agents-best-practices2.4k—~7.4kAutomated safety check: PassMIT
Openrouter Context Optimizationjeremylongshore/tons-of-skills-marketplace2.8k—~2.4kAutomated safety check: PassMIT
Context DoctorjzOcb/context-doctor119—~642Automated safety check: PassMIT
Caveman Learn Token FixesJuliusBrussee/caveman110k—~2.8kAutomated safety check: PassApache-2.0
Cco Budgetegorfedorov/claude-context-optimizer114—~808Automated safety check: PassMIT

Similar skills

  • Agents Best Practices

    DenisSergeevitch/agents-best-practices

    A skill your agent uses when designing, generating an MVP blueprint for, auditing, troubleshooting, refactoring, or explaining an agentic harness for any domain.

    2.4k GitHub stars~7.4k tokensUpdated 4 days ago
    AI & LLM EngineeringAuto-check passed
  • Openrouter Context Optimization

    jeremylongshore/tons-of-skills-marketplace

    Optimize context window usage for OpenRouter models to reduce cost and improve quality.

    2.8k GitHub stars~2.4k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Context Doctor

    jzOcb/context-doctor

    Visualize and diagnose OpenClaw context window usage. An agent skill from jzOcb/context-doctor.

    119 GitHub stars~642 tokensUpdated 6 mo ago
    Agent WorkflowsAuto-check passed
  • Caveman Learn Token Fixes

    JuliusBrussee/caveman

    Acts on a Caveman learn report: reviews ranked token sinks, applies cost-lowering edits one at a time with your consent, and reports what each fix returned.

    110k GitHub stars~2.8k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Cco Budget

    egorfedorov/claude-context-optimizer

    Configure token budget limits, auto-compact settings, and view current budget status (model-aware — Claude 5 lineup, Opus 5.5 default fallback, full 1M context at standard price)

    114 GitHub stars~808 tokensUpdated 9 days ago
    AI & LLM EngineeringAuto-check passed
  • Subagent Brief Discipline

    LichAmnesia/lich-skills

    Checks every subagent prompt before spawning, swapping pasted files and context for paths and short summaries and trimming the brief, to avoid multiplied token cost.

    234 GitHub stars~1.6k tokensUpdated 4 mo ago
    Agent WorkflowsAuto-check passed

More from diegosouzapw/OmniRoute

All 50 skills in this repo
  • OmniRoute Backup and Sync CLI

    diegosouzapw/OmniRoute

    Backup and restore OmniRoute data from the CLI. Trigger incremental snapshots, sync to cloud storage, manage backup schedules, and restore from archive files.

    74k GitHub stars~948 tokensUpdated today
    Auto-check passed
  • OmniRoute Settings API

    diegosouzapw/OmniRoute

    Read and update global application settings: system prompts, thinking budget, IP filters, payload rules, combo defaults, and require-login configuration.

    74k GitHub starsUsed in 1 repo~3.6k tokens
    Auto-check passed
  • Quality Scan

    diegosouzapw/OmniRoute

    Runs a scoped, read-only quality scan on a repository candidate and reports exact evidence, failures and frozen debt, without treating a static scan as release acceptance.

    74k GitHub stars~748 tokensUpdated today
    Auto-check passed
  • OmniRoute Database Backups

    diegosouzapw/OmniRoute

    Trigger system backups, restore from backup files, and manage the SQLite database lifecycle. Supports export, import, and incremental snapshot strategies.

    74k GitHub starsUsed in 1 repo~395 tokens
    Auto-check passed
  • OmniRoute Provider Management

    diegosouzapw/OmniRoute

    Manages AI provider connections, API keys, OAuth flows and connection tests through OmniRoute's REST API across its 327-provider catalog.

    74k GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • OmniRoute Prompt Compression CLI

    diegosouzapw/OmniRoute

    Configure and test prompt compression from the CLI. Manage RTK filters, Caveman rules, stacked compression modes, and preview compression output with real…

    74k GitHub starsUsed in 1 repo~521 tokens
    Auto-check passed

Questions about OmniRoute Prompt Compression

What does OmniRoute Prompt Compression do?

Configures OmniRoute's RTK, Caveman and stacked compression modes, manages language packs and rules, and previews token savings of 60 to 90 percent. OmniRoute compresses token payloads before it forwards them to providers, and this skill is the control surface for that behavior. RTK handles command output, Caveman handles prose, and the two can be stacked.

When should I use OmniRoute Prompt Compression?

OmniRoute Prompt Compression fits situations like: cutting token spend on long agent prompts; previewing what compression does to one specific payload; adding or inspecting Caveman language packs and rules; comparing compression engines on the same message.

How do I install OmniRoute Prompt Compression in Claude Code?

Run `npx skills add diegosouzapw/OmniRoute --skill omni-compression -a claude-code`. Or copy the skill folder (skills/omni-compression in diegosouzapw/OmniRoute) into .claude/skills/omni-compression in your project. Claude Code loads it when a task matches its description.

How do I install OmniRoute Prompt Compression in Codex?

Run `npx skills add diegosouzapw/OmniRoute --skill omni-compression -a codex`. Or copy the skill folder (skills/omni-compression in diegosouzapw/OmniRoute) into .agents/skills/omni-compression in your project. Codex loads it when a task matches its description.

Can I use OmniRoute Prompt Compression 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 diegosouzapw/OmniRoute --skill omni-compression -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/omni-compression, .gemini/skills/omni-compression, .github/skills/omni-compression and .opencode/skills/omni-compression in your project.

What does OmniRoute Prompt Compression need to run?

Going by SKILL.md and its folder, OmniRoute Prompt Compression needs the command-line tools its instructions call (curl) and credentials named OMNIROUTE_KEY, OMNIROUTE_TOKEN and REQUIRE_API_KEY. Our summary lists: An OmniRoute instance with OMNIROUTE_URL and OMNIROUTE_KEY set.

Does OmniRoute Prompt Compression access the network?

SKILL.md contains no URLs. Its commands use curl, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is OmniRoute Prompt Compression 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 OmniRoute Prompt Compression use?

OmniRoute Prompt Compression is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does OmniRoute Prompt Compression use?

About 1.6k tokens (SKILL.md is roughly 6.4k 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 OmniRoute Prompt Compression?

Skills that share tags, products or a category with OmniRoute Prompt Compression: Agents Best Practices (DenisSergeevitch/agents-best-practices, 2.4k stars), Openrouter Context Optimization (jeremylongshore/tons-of-skills-marketplace, 2.8k stars), Context Doctor (jzOcb/context-doctor, 119 stars) and Caveman Learn Token Fixes (JuliusBrussee/caveman, 110k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains OmniRoute Prompt Compression?

diegosouzapw (a GitHub user) maintains it in diegosouzapw/OmniRoute, which has 74,003 GitHub stars. The repository holds 50 skills in this directory. The repository was last updated on October 8, 2026.

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