本文へスキップ
Skillpedia
プロンプトとLLM84k · #1425

omni-compression

できること

このスキルは、コマンド出力と文章の2つの圧縮モードを使い、モデルに届く前にプロンプトを縮める方法を示します。トークンの使用を減らし、結果を先に確かめたい人のためのものです。

使う場面

  • ✓モデルに送るトークン数を減らしたいとき。
  • ✓圧縮がプロンプトをどう変えるかをプレビューしたいとき。
  • ✓言語パックや独自の圧縮ルールを追加したいとき。

スキルのリンク

https://github.com/cheaper-inference/OmniRoute/blob/release/v3.8.53/skills/omni-compression/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/cheaper-inference/OmniRoute/blob/release/v3.8.53/skills/omni-compression/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“有効にする前に、圧縮でこのプロンプトがどれだけ縮むかをプレビューしてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

スキルは、圧縮のプレビュー、結果の比較、言語パックと圧縮ルールの一覧に関する呼び出しを一覧にします。コマンド出力用のRTKモード、文章用のCavemanモード、両方を組み合わせた積み重ねモードを扱います。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

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

curl -X POST http://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

curl http://localhost:20128/api/compression/language-packs \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

GET /api/compression/rules

List Caveman compression rule metadata

curl http://localhost:20128/api/compression/rules \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

POST /api/compression/compare

POST compression › compare

curl -X POST http://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

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

GET /api/compression/engines

GET compression › engines

curl http://localhost:20128/api/compression/engines \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

POST /api/compression/retrieve

POST compression › retrieve

curl -X POST http://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.

Engine Best for Typical savings
RTK Terminal / build / test / git output 60–90%
Caveman Human prose, chat history 46% input
Stacked (rtk → caveman) Mixed coding sessions 78–95%
MCP accessibility filter Browser/accessibility tool results 60–80%

Get current settings

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

Enable RTK (best for coding agents)

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)

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)

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

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 incl

よくある質問

RTK圧縮とは何ですか?

スキルは、RTKはコマンド出力のためのモードで、Cavemanは文章を扱うと説明しています。

トークンはどのくらい減らせますか?

スキルは、約60から90パーセントの削減を説明しています。

圧縮の前後を比べられますか?

はい。スキルには比較の呼び出しがあり、ペイロードの圧縮後の結果を返します。

詳細

作者による元の説明

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

repo: cheaper-inference/OmniRoute

人気

GitHubのスター
84k
ランキング
#1425
ライセンス
MIT
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル