Keirouter Chat
mydisha/keirouter
Chat / code generation via KeiRouter using OpenAI /v1/chat/completions or Anthropic /v1/messages format with streaming + auto-fallback combos.
Helps show a model provider's usage, balance or quota in PiDeck: checks built-in support, points to the dialog templates, or writes a custom probe entry.
SKILL.md written in Chinese; this summary is our English description.
$ npx skills add ayuayue/PiDeck --skill usage-probe -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ayuayue/PiDeck usage-probe --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/ayuayue/PiDeck.git skills-src && mkdir -p .claude/skills && cp -r skills-src/resources/skills/usage-probe .claude/skills/usage-probe && rm -rf skills-srcUse ~/.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/
Install the "usage-probe" agent skill from https://github.com/ayuayue/PiDeck/tree/main/resources/skills/usage-probe into .claude/skills/usage-probe/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "usage-probe", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/ayuayue/PiDeck/tree/main/resources/skills/usage-probeType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add ayuayue/PiDeck --skill usage-probe -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ayuayue/PiDeck usage-probe --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ayuayue/PiDeck.git skills-src && mkdir -p .agents/skills && cp -r skills-src/resources/skills/usage-probe .agents/skills/usage-probe && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "usage-probe" agent skill from https://github.com/ayuayue/PiDeck/tree/main/resources/skills/usage-probe into .agents/skills/usage-probe/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "usage-probe", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ayuayue/PiDeck --skill usage-probe -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ayuayue/PiDeck usage-probe --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ayuayue/PiDeck.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/resources/skills/usage-probe .cursor/skills/usage-probe && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "usage-probe" agent skill from https://github.com/ayuayue/PiDeck/tree/main/resources/skills/usage-probe into .cursor/skills/usage-probe/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "usage-probe", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/ayuayue/PiDeck.git --path resources/skills/usage-probe--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add ayuayue/PiDeck --skill usage-probe -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ayuayue/PiDeck usage-probe --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ayuayue/PiDeck.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/resources/skills/usage-probe .gemini/skills/usage-probe && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "usage-probe" agent skill from https://github.com/ayuayue/PiDeck/tree/main/resources/skills/usage-probe into .gemini/skills/usage-probe/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "usage-probe", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install ayuayue/PiDeck usage-probeInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add ayuayue/PiDeck --skill usage-probe -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ayuayue/PiDeck.git skills-src && mkdir -p .github/skills && cp -r skills-src/resources/skills/usage-probe .github/skills/usage-probe && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "usage-probe" agent skill from https://github.com/ayuayue/PiDeck/tree/main/resources/skills/usage-probe into .github/skills/usage-probe/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "usage-probe", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ayuayue/PiDeck --skill usage-probe -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ayuayue/PiDeck usage-probe --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ayuayue/PiDeck.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/resources/skills/usage-probe .opencode/skills/usage-probe && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "usage-probe" agent skill from https://github.com/ayuayue/PiDeck/tree/main/resources/skills/usage-probe into .opencode/skills/usage-probe/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "usage-probe", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
usage-probeHelps show a model provider's usage, balance or quota in PiDeck: checks built-in support, points to the dialog templates, or writes a custom probe entry.
PiDeck shows provider usage or balance at the bottom of each provider card, and this skill helps when a provider is missing from that display. First the agent checks whether the provider is already built in, by reading its base URL from the models.json config and comparing it with the built-in list. That list covers DeepSeek, OpenRouter, Moonshot, Kimi For Coding, Zhipu GLM Coding Plan, OpenCode Go, Codex and ChatGPT, xAI Grok, and gateways implementing the OpenAI-style usage endpoint. If it matches, no configuration is needed.
If the provider is not built in, the agent guides you to the usage dialog on the provider card and one of four templates: generic, New API, Cookie, or Volcengine Ark AK/SK. The Ark template needs an access key pair from the Volcengine console rather than the inference API key.
When none of the templates fit, the agent writes an entry in the probes array of ~/.pi/agent/usage-probes.json after finding the provider's balance endpoint, possibly from a browser network capture with keys removed. Probes must not contain API keys because the app adds the bearer header itself, and the dialog-managed providers map is left alone. Changes apply immediately, and you confirm by opening the provider card.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit e220aea. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are jsonc and json).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
PiDeck Usage Probe Helper loads about 1.4k tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 300 words of instructions outside code blocks.
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.
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.
The full file from ayuayue/PiDeck at commit e220aea, republished under its MIT licence (© ayuayue). 300 words, ~1,366 tokens.
.claude/skills/usage-probe/SKILL.md (or your agent's skills folder).供应商的用量/余额显示在「设置 → 配置管理 → 模型/认证」的 供应商卡片底部 (学 cc-switch:所有卡片同一位置、右对齐:相对时间 + 彩色数值 + 刷新按钮)。 支持分三层:
/user/balance)、OpenRouter(/api/v1/key per-key 额度)、
Moonshot 官方余额(/users/me/balance);/usages,含 Boost 点数)、智谱 GLM Coding Plan
(5h 滚动窗 / 周窗 / MCP 月度窗)、OpenCode Go(/usage 三档百分比);/wham/usage)、
xAI Grok(billing 预检链);/v1/usage({ balance, unit })的中转站自动显示余额。/usage(OpenAI 兼容),API Key / 请求地址可覆盖(留空用供应商的);~/.pi/agent/usage-probes.json 的 probes 数组(见下文),运行时按
baseUrl 关键字匹配合入探测。配置文件位置(和 models.json 同一个目录):
~/.pi/agent/usage-probes.json改完立刻生效(无需重启)。顶层 providers 映射由弹窗维护,AI 不要手改;
probes 数组才是开放给 AI 写的部分。
改完立刻生效(无需重启),下次打开供应商卡片就能读到新配置。
当用户说「帮我让 XX 供应商显示用量」时,按下面顺序做:
~/.pi/agent/models.json 找到该 provider 的 baseUrl,
对照上面的内置清单。命中就直接告诉用户「已内置,无需配置,卡片底部会自动显示」,
不需要写任何文件。apiKey 的位置不用读出来,也不要把 key 贴到任何地方。/usage 端点)→ 选「通用模板」,必要时填请求地址(留空用供应商的);probes 数组。重要安全边界:
probes数组里不要写 apiKey。鉴权统一走Authorization: Bearer <key>, 主进程自动从 auth.json/models.json 取 key;只有个别接口用非标准鉴权头时才用"headers": { "X-API-Key": "{{apiKey}}" }占位。 例外:火山方舟模板的 AK/SK 由弹窗写进顶层providers映射(不走 probes 数组), 只用于本地派生请求签名,不进日志与遥测。
顶层 providers 映射由弹窗维护(开关/模板/超时/间隔),AI 不要手改。
下面这个 probes 数组是开放给 AI 写的兜底部分,每条是一个供应商。字段含义:
{
"probes": [
{
// (可选)只是给自己看的名字,不影响功能
"name": "我的中转站",
// 匹配条件:你的供应商 baseUrl 里包含的任意关键字(小写匹配)
"match": {
"baseUrlContains": ["api.myprovider.com"]
},
// 发什么请求
"request": {
"path": "/user/balance", // 相对 baseUrl 的路径,必须以 / 开头
"method": "GET", // 可选,GET 或 POST,缺省 GET
// "body": { ... }, // 可选,POST 时的请求体
// "headers": { "X-API-Key": "{{apiKey}}" } // 可选,非标准鉴权头
},
// 怎么从响应里取数(三种形态选一种)
"parse": {
"kind": "balance",
"valuePath": "balance_infos[0].total_balance", // 剩余额度的字段路径
"currencyPath": "balance_infos[0].currency" // 可选,币种
}
}
]
}1. balance(剩余额度,一个数字 + 可选币种)
"parse": {
"kind": "balance",
"valuePath": "data.available_balance",
"currencyPath": "data.currency"
}2. credits(额度点数,总额 / 已用 / 剩余,至少给一个)
"parse": {
"kind": "credits",
"totalPath": "data.total_credits", // 可选
"usedPath": "data.total_usage", // 可选
"remainingPath": "data.remaining" // 可选;不给时会用 total-used 自动算
}3. periods(三档百分比:滚动 / 周 / 月)
"parse": { "kind": "periods" }periods 形态不需要写字段路径:解析器会自动找响应里的
usage.rolling / usage.weekly / usage.monthly,每档取 percent / resetsAt / status。
只要你的供应商接口返回类似 { "usage": { "weekly": { "percent": 68 } } } 的结构,
直接用 periods 即可,不用写路径。
用「点号 + 方括号」从响应根一层层往下指:
data.balance → { "data": { "balance": 110 } } 里的 110balance_infos[0].total_balance → 数组第一项的 total_balancedata.credits.total → 嵌套对象数字可以是 number,也可以是能转成数字的字符串(很多网关余额字段是 "110.00" 这种字符串)。
{ data: { balance: 12.5, currency: "USD" } }{
"probes": [
{
"name": "我的网关",
"match": { "baseUrlContains": ["gateway.example.com"] },
"request": { "path": "/v1/balance" },
"parse": {
"kind": "balance",
"valuePath": "data.balance",
"currencyPath": "data.currency"
}
}
]
}{
"probes": [
{
"name": "OpenRouter",
"match": { "baseUrlContains": ["openrouter.ai"] },
"request": { "path": "/credits" },
"parse": {
"kind": "credits",
"remainingPath": "data.total_credits",
"usedPath": "data.total_usage"
}
}
]
}提示:不同网关字段名可能不同,以上示例里的字段名请以官方文档或实际抓包为准。
match.baseUrlContains 里的关键字,是不是和 models.json 里那个 provider 的
baseUrl 完全不一致(注意大小写、是否带 /v1)。© ayuayue, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in resources/skills/usage-probe of ayuayue/PiDeck.
Open the folder on GitHubat commit e220aea
PiDeck Usage Probe Helper 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| PiDeck Usage Probe Helper this skillayuayue/PiDeck | 1k | — | ~1.4k | Automated safety check: Pass | MIT | |
| Keirouter Chatmydisha/keirouter | 147 | — | ~859 | Automated safety check: Pass | MIT | |
| OpenCode Agent Provider for NanoClawnanocoai/nanoclaw | 31k | — | ~5k | Automated safety check: Notes | MIT | |
| AI Chatmajiayu000/claude-skill-registry | 666 | 1 repos | ~1.3k | Automated safety check: Pass | Apache-2.0 | |
| LLM Modelsmajiayu000/claude-skill-registry | 666 | 1 repos | ~992 | Automated safety check: Pass | MIT | |
| Reasoning Serialization Teststailcallhq/forgecode | 7.6k | — | ~1k | Automated safety check: Pass | Apache-2.0 |
mydisha/keirouter
Chat / code generation via KeiRouter using OpenAI /v1/chat/completions or Anthropic /v1/messages format with streaming + auto-fallback combos.
nanocoai/nanoclaw
Installs OpenCode as an optional NanoClaw agent runtime, reaching OpenRouter, OpenAI, Google, DeepSeek and others through OpenCode's own configuration.
majiayu000/claude-skill-registry
Access 50+ LLM models through a unified OpenAI-compatible API via AceDataCloud.
majiayu000/claude-skill-registry
Access Claude, Gemini, Kimi, GLM and 100+ LLMs via inference.sh CLI using OpenRouter.
tailcallhq/forgecode
Checks that ReasoningConfig fields are serialized into the right provider-specific JSON for OpenRouter, Anthropic, GitHub Copilot and Codex requests.
starbaser/ccproxy
Guides users through ccproxy as an OpenAI-compatible and Anthropic-compatible LLM API server with SDK integration, OAuth authentication, sentinel key substitution, model routing, and troubleshooting.
ayuayue/PiDeck
Calls an OpenAI-compatible image generation API using PiDeck's separate image-provider config, then saves the result as a local file.
ayuayue/PiDeck
Diagnoses problems in the PiDeck desktop app from a redacted environment report, matching health checks to known failure patterns with fix steps.
Works with
Categories
Helps show a model provider's usage, balance or quota in PiDeck: checks built-in support, points to the dialog templates, or writes a custom probe entry. PiDeck shows provider usage or balance at the bottom of each provider card, and this skill helps when a provider is missing from that display.json config and comparing it with the built-in list.
PiDeck Usage Probe Helper fits situations like: showing balance or quota for a model provider in PiDeck; finding out whether a provider's usage display is already built in; writing a custom probe for a gateway with its own balance endpoint.
Run `npx skills add ayuayue/PiDeck --skill usage-probe -a claude-code`. Or copy the skill folder (resources/skills/usage-probe in ayuayue/PiDeck) into .claude/skills/usage-probe in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ayuayue/PiDeck --skill usage-probe -a codex`. Or copy the skill folder (resources/skills/usage-probe in ayuayue/PiDeck) into .agents/skills/usage-probe in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ayuayue/PiDeck --skill usage-probe -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/usage-probe, .gemini/skills/usage-probe, .github/skills/usage-probe and .opencode/skills/usage-probe in your project.
SKILL.md names no scripts, command-line tools or credentials: PiDeck Usage Probe Helper is instructions for the agent only. Our summary lists: The PiDeck desktop app with its usage query dialog; Provider entries in ~/.pi/agent/models.json.
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.
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.
PiDeck Usage Probe Helper is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with PiDeck Usage Probe Helper: Keirouter Chat (mydisha/keirouter, 147 stars), OpenCode Agent Provider for NanoClaw (nanocoai/nanoclaw, 31k stars), AI Chat (majiayu000/claude-skill-registry, 666 stars) and LLM Models (majiayu000/claude-skill-registry, 666 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
ayuayue (a GitHub user) maintains it in ayuayue/PiDeck, which has 1,025 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 7, 2026.
Source: ayuayue/PiDeck on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.