cli-contexts — скилл для Claude Code: что делает и как установить
Управляет контекстной инженерией, наборами фильтров RTK и сессиями диалогов через интерфейс командной строки утилиты OmniRoute.
npx skills add cheaper-inference/OmniRoute --skill cli-contexts -a claude-codeЧто делает cli-contexts
Скилл даёт ассистенту инструкции по вызову команд omniroute для манипуляций с контекстами, фильтрами и сессиями. Он позволяет проверять текущие пайплайны контекста, переключаться между ними командой omniroute contexts use и задавать параметры сжатия контекста флагами --aggressiveness или --token-budget.
Внутри предусмотрены три группы команд. Блок context-eng отвечает за настройку RTK-фильтров, тестирование правил на файлах и сбор аналитики. Блок contexts управляет адресами серверов, токенами доступа, а также экспортом или импортом конфигураций в JSON. Раздел sessions позволяет просматривать активные сессии и принудительно завершать их.
Для выполнения команд требуется пакет omniroute, установленный через npm install -g omniroute или запускаемый через npx omniroute. Команда omniroute contexts migrate переносит старые текстовые пароли в системную связку ключей операционной системы.
Какие задачи решает
- переключать активные контексты и токены доступа через
omniroute contexts use - настраивать лимиты бюджетов токенов и параметры сжатия контекста
- тестировать RTK-паттерны фильтрации на локальных файлах
- просматривать список сессий диалогов и завершать неактивные
- экспортировать и импортировать профили контекстов в формате JSON
Примеры запросов агенту
- Покажи текущий активный контекст через omniroute contexts current
- Установи бюджет токенов с помощью omniroute context-eng set --token-budget 4000
- Заверши все активные сессии командой omniroute sessions expire-all
Как установить cli-contexts
1Через Skills CLI (Vercel)
npx skills add cheaper-inference/OmniRoute --skill cli-contexts -a claude-code2Вручную: положить файлы
~/.claude/skills/cli-contexts/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/cli-contexts/
1Через Skills CLI (Vercel)
npx skills add cheaper-inference/OmniRoute --skill cli-contexts -a codex2Вручную: положить файлы
.agents/skills/cli-contexts/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add cheaper-inference/OmniRoute --skill cli-contexts -a cursor2Вручную: положить файлы
.cursor/skills/cli-contexts/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install cheaper-inference/OmniRoute cli-contexts2Вручную: положить файлы
.github/skills/cli-contexts/SKILL.md1Через Skills CLI (Vercel)
npx skills add cheaper-inference/OmniRoute --skill cli-contexts -a gemini-cli2Командой платформы
gemini skills install https://github.com/cheaper-inference/OmniRoute --path skills/cli-contextsВручную: положить файлы
.devin/skills/cli-contexts/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add cheaper-inference/OmniRoute --skill cli-contexts -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о cli-contexts
Как установить cli-contexts в Claude Code?
Выполните в терминале команду npx skills add cheaper-inference/OmniRoute --skill cli-contexts -a claude-code.
Что делает скилл cli-contexts?
Он помогает агенту управлять утилитой OmniRoute: настраивать бюджеты токенов, задавать RTK-фильтры, переключать профили контекстов и закрывать сессии.
Что нужно подготовить перед запуском команд?
Требуется установить утилиту глобально командой npm install -g omniroute либо запускать её через npx omniroute.
Исходный текст
SKILL.md · MIT
--- name: cli-contexts description: Manage context engineering configurations, RTK filter sets, and conversation sessions from the CLI. Apply context-relay settings and inspect active context pipelines. --- <!-- generated by src/lib/agentSkills/generator.ts; manual edits will be overwritten --> ## Overview Manage context engineering configurations, RTK filter sets, and conversation sessions from the CLI. Apply context-relay settings and inspect active context pipelines. ## Quick install ```bash npm install -g omniroute # or: npx omniroute omniroute --version ``` ## Subcommands ### `context-eng` **Example:** ```bash omniroute context-eng ``` ### `context-eng analytics` **Flags:** - `--period <p>` **Example:** ```bash omniroute context-eng analytics ``` ### `context-eng caveman` **Example:** ```bash omniroute context-eng caveman ``` ### `context-eng config` **Example:** ```bash omniroute context-eng config ``` ### `context-eng show` **Example:** ```bash omniroute context-eng show ``` ### `context-eng set` **Flags:** - `--aggressiveness <n>` - `--max-shrink-pct <n>` - `--preserve-tags <list>` **Example:** ```bash omniroute context-eng set ``` ### `context-eng rtk` **Example:** ```bash omniroute context-eng rtk ``` ### `context-eng config` **Example:** ```bash omniroute context-eng config ``` ### `context-eng show` **Example:** ```bash omniroute context-eng show ``` ### `context-eng set` **Flags:** - `--token-budget <n>` - `--reserve-pct <n>` **Example:** ```bash omniroute context-eng set ``` ### `context-eng filters` **Example:** ```bash omniroute context-eng filters ``` ### `context-eng list` **Example:** ```bash omniroute context-eng list ``` ### `context-eng add` **Flags:** - `--pattern <p>` - `--priority <n>` - `--action <a>` **Example:** ```bash omniroute context-eng add ``` ### `context-eng remove <id>` **Flags:** - `--yes` **Example:** ```bash omniroute context-eng remove <id> ``` ### `context-eng test` **Flags:** - `--file <path>` **Example:** ```bash omniroute context-eng test ``` ### `context-eng raw-output <id>` **Example:** ```bash omniroute context-eng raw-output <id> ``` ### `context-eng combos` **Example:** ```bash omniroute context-eng combos ``` ### `context-eng list` **Example:** ```bash omniroute context-eng list ``` ### `context-eng get <id>` **Example:** ```bash omniroute context-eng get <id> ``` ### `context-eng assignments <id>` **Example:** ```bash omniroute context-eng assignments <id> ``` ### `contexts` **Example:** ```bash omniroute contexts ``` ### `contexts list` List all contexts **Example:** ```bash omniroute contexts list ``` ### `contexts add <name>` Add a new context **Flags:** - `--url <u>` - `--api-key <k>` - `--api-key-stdin` - `--access-token <t>` - `--access-token-stdin` - `--scope <s>` - `--description <d>` **Example:** ```bash omniroute contexts add <name> ``` ### `contexts use <name>` Switch active context **Example:** ```bash omniroute contexts use <name> ``` ### `contexts current` Show the active context (server, auth, scope) **Flags:** - `--name-only` **Example:** ```bash omniroute contexts current ``` ### `contexts show <name>` Show context details **Example:** ```bash omniroute contexts show <name> ``` ### `contexts remove <name>` Remove a context **Flags:** - `--yes` **Example:** ```bash omniroute contexts remove <name> ``` ### `contexts rename <old> <new>` Rename a context **Example:** ```bash omniroute contexts rename <old> <new> ``` ### `contexts export` Export contexts to JSON **Flags:** - `--out <path>` - `--no-secrets` - `--include-secrets` **Example:** ```bash omniroute contexts export ``` ### `contexts import <file>` Import contexts from a JSON file **Flags:** - `--merge` **Example:** ```bash omniroute contexts import <file> ``` ### `contexts migrate` Move legacy plaintext context credentials to the OS keychain **Flags:** - `--yes` **Example:** ```bash omniroute contexts migrate ``` ### `sessions` **Example:** ```bash omniroute sessions ``` ### `sessions list` **Flags:** - `--user <u>` - `--kind <k>` - `--active` - `--limit <n>` **Example:** ```bash omniroute sessions list ``` ### `sessions show <sessionId>` **Example:** ```bash omniroute sessions show <sessionId> ``` ### `sessions expire <sessionId>` **Flags:** - `--yes` **Example:** ```bash omniroute sessions expire <sessionId> ``` ### `sessions expire-all` **Flags:** - `--user <u>` - `--yes` **Example:** ```bash omniroute sessions expire-all ``` ### `sessions current` **Example:** ```bash omniroute sessions current ```
© cheaper-inference · MIT · cheaper-inference/OmniRoute