跳到正文
Skillpedia
智能体84k · #1401

cli-contexts

它能做什么

这项技能展示如何用命令行管理 AI 对话的上下文设置。适合需要调整模型接收多少上下文、以及如何保存会话的开发者。

适用场景

  • ✓当用户想改变 AI 对话保留多少上下文的时候。
  • ✓当用户想查看哪些上下文流程正在生效的时候。
  • ✓当用户想查看上下文工程的分析数据的时候。

技能链接

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

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/cheaper-inference/OmniRoute/blob/release/v3.8.53/skills/cli-contexts/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请显示当前生效的上下文设置,以及它们会裁剪多少对话内容。”

每周 5 个新技能,1 分钟读完。

工作原理

这项技能列出显示和设置选项的命令,例如令牌预算和保留百分比,还有管理过滤器集以及查看某段时间分析数据的命令。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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

npm install -g omniroute   # or: npx omniroute
omniroute --version

Subcommands

context-eng

Example:

omniroute context-eng

context-eng analytics

Flags:

  • --period <p>

Example:

omniroute context-eng analytics

context-eng caveman

Example:

omniroute context-eng caveman

context-eng config

Example:

omniroute context-eng config

context-eng show

Example:

omniroute context-eng show

context-eng set

Flags:

  • --aggressiveness <n>
  • --max-shrink-pct <n>
  • --preserve-tags <list>

Example:

omniroute context-eng set

context-eng rtk

Example:

omniroute context-eng rtk

context-eng config

Example:

omniroute context-eng config

context-eng show

Example:

omniroute context-eng show

context-eng set

Flags:

  • --token-budget <n>
  • --reserve-pct <n>

Example:

omniroute context-eng set

context-eng filters

Example:

omniroute context-eng filters

context-eng list

Example:

omniroute context-eng list

context-eng add

Flags:

  • --pattern <p>
  • --priority <n>
  • --action <a>

Example:

omniroute context-eng add

context-eng remove <id>

Flags:

  • --yes

Example:

omniroute context-eng remove <id>

context-eng test

Flags:

  • --file <path>

Example:

omniroute context-eng test

context-eng raw-output <id>

Example:

omniroute context-eng raw-output <id>

context-eng combos

Example:

omniroute context-eng combos

context-eng list

Example:

omniroute context-eng list

context-eng get <id>

Example:

omniroute context-eng get <id>

context-eng assignments <id>

Example:

omniroute context-eng assignments <id>

contexts

Example:

omniroute contexts

contexts list

List all contexts

Example:

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:

omniroute contexts add <name>

contexts use <name>

Switch active context

Example:

omniroute contexts use <name>

contexts current

Show the active context (server, auth, scope)

Flags:

  • --name-only

Example:

omniroute contexts current

contexts show <name>

Show context details

Example:

omniroute contexts show <name>

contexts remove <name>

Remove a context

Flags:

  • --yes

Example:

omniroute contexts remove <name>

contexts rename <old> <new>

Rename a context

Example:

omniroute contexts rename <old> <new>

contexts export

Export contexts to JSON

Flags:

  • --out <path>
  • --no-secrets
  • --include-secrets

Example:

omniroute contexts export

contexts import <file>

Import contexts from a JSON file

Flags:

  • --merge

Example:

omniroute contexts import <file>

contexts migrate

Move legacy plaintext context credentials to the OS keychain

Flags:

  • --yes

Example:

omniroute contexts migrate

sessions

Example:

omniroute sessions

sessions list

Flags:

  • --user <u>
  • --kind <k>
  • --active
  • --limit <n>

Example:

omniroute sessions list

sessions show <sessionId>

Example:

omniroute sessions show <sessionId>

sessions expire <sessionId>

Flags:

  • --yes

Example:

omniroute sessions expire <sessionId>

sessions expire-all

Flags:

  • --user <u>
  • --yes

Example:

omniroute sessions expire-all

sessions current

Example:

omniroute sessions current
常见问题

什么是令牌预算?

它是上下文可以包含的令牌数量上限,set 命令可以修改这个值。

我能看到分析数据吗?

可以。analytics 命令接受时间段选项。

我可以只查看设置而不修改吗?

可以。show 和 config 命令可以显示当前设置。

详情

作者的原始描述

Manage context engineering configurations, RTK filter sets, and conversation sessions from the CLI. Apply context-relay settings and inspect active context pipelines.

repo: cheaper-inference/OmniRoute

热度

GitHub 星标
84k
排名
#1401
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能