usage-probe

usage-probe is a skill for Claude Code, Codex from ayuayue/PiDeck. It costs 113 tokens per session (2,637 once invoked), scanned A, original, MIT.

A guide for showing a software provider's usage, balance, or quota in PiDeck, a model and authentication management tool.

In plain words
What is it for?
Use it to check built-in provider support, configure a general usage endpoint or New API template, or create a custom usage probe for an unsupported gateway.
Why use it?
It helps determine whether a provider is already supported and gives configuration options when it is not, so usage information can appear on the provider card.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex; mentions OpenCode.

Good fit Use it to check built-in provider support, configure a general usage endpoint or New API template, or create a custom usage probe for an unsupported gateway.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ayuayue/pideck/usage-probe
About the project

PiDeck is an open-source Electron desktop workbench for managing coding-agent conversations across local project directories, including pi and DSH sessions and imported Codex or Claude sessions. It is for developers who want one graphical workspace for multiple projects, session history, Git status, terminals, model settings, and extensions. Catalogue add-ons extend PiDeck's configuration and workflow capabilities.

ayuayue/PiDeck · 1,121 stars · on GitHub · pideck.caoayu.top

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ayuayue/PiDeck --skill usage-probe
Clone the repo
git clone --depth 1 https://github.com/ayuayue/PiDeck

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for usage-probe

README.md
[![agentmods](https://agentmods.dev/badge/skills/ayuayue/pideck/usage-probe/github.svg)](https://agentmods.dev/skills/ayuayue/pideck/usage-probe)
Your own site
<a href="https://agentmods.dev/skills/ayuayue/pideck/usage-probe"><img src="https://agentmods.dev/badge/skills/ayuayue/pideck/usage-probe/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for usage-probe

Your own site · 80×15
<a href="https://agentmods.dev/skills/ayuayue/pideck/usage-probe"><img src="https://agentmods.dev/badge/skills/ayuayue/pideck/usage-probe.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 113 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,637 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00113 $0.02637
Opus 5.5 $0.00045 $0.01055
Sonnet 5.5 $0.00023 $0.00527
Haiku 4.5 $0.00011 $0.00264

Measured 28d ago against content hash 7a09edba8411, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

usage-probe scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 28d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

resources/skills/usage-probe/SKILL.md · 201 lines

How it starts

The opening of the file, as written. The whole thing — 201 lines — stays where its author put it; the contents beside it link to each section on GitHub.

用量查询辅助(usage-probe)

这是什么

供应商的用量/余额显示在「设置 → 配置管理 → 模型/认证」的 供应商卡片底部 (学 cc-switch:所有卡片同一位置、右对齐:相对时间 + 彩色数值 + 刷新按钮)。 支持分三层:

  1. 内置模板(零配置):命中内置候选的供应商开箱即用,弹窗里已识别、无需配置。 当前内置:
    • 官方余额:DeepSeek(/user/balance)、OpenRouter(/api/v1/key per-key 额度)、 Moonshot 官方余额(/users/me/balance);
    • 套餐额度:Kimi For Coding(/usages,含 Boost 点数)、智谱 GLM Coding Plan (5h 滚动窗 / 周窗 / MCP 月度窗)、OpenCode Go(/usage 三档百分比);
    • 官方订阅(登录态 OAuth,凭据来自 auth.json):Codex/ChatGPT(/wham/usage)、 xAI Grok(billing 预检链);
    • 通用 OpenAI 兼容网关兜底:实现了官方 /v1/usage({ balance, unit })的中转站自动显示余额。
  2. 声明式模板(弹窗内可选):不在内置列表时,弹窗提供四个模板——
    • 通用模板:请求 /usage(OpenAI 兼容),API Key / 请求地址可覆盖(留空用供应商的);
    • New API:New API / OneAPI 中转站,填 访问令牌 + 用户 ID(积分自动换算);
    • Cookie:自研网关的网页后台接口(需要登录态 Cookie,不能用 API Key);
    • 火山方舟 AK/SK:方舟(ark)的 Agent Plan / Coding Plan 额度,填控制台生成的 Access Key ID + Secret Access Key,Region 自动从推理 base_url 推断;同一个账号 只订阅哪一种套餐都能识别(两个 Action 依次探测,未订阅的那个返回全 0 自动跳过)。
  3. 旧版探针数组(AI 兜底):上面都覆盖不了的接口(如自建网关的自定义余额端点), 由 AI 写 ~/.pi/agent/usage-probes.json 的 probes 数组(见下文),运行时按 baseUrl 关键字匹配合入探测。

配置文件位置(和 models.json 同一个目录):

~/.pi/agent/usage-probes.json

改完立刻生效(无需重启)。顶层 providers 映射由弹窗维护,AI 不要手改; probes 数组才是开放给 AI 写的部分。

改完立刻生效(无需重启),下次打开供应商卡片就能读到新配置。

你(AI)的工作流程

当用户说「帮我让 XX 供应商显示用量」时,按下面顺序做:

  1. 先判断是否已内置:读 ~/.pi/agent/models.json 找到该 provider 的 baseUrl, 对照上面的内置清单。命中就直接告诉用户「已内置,无需配置,卡片底部会自动显示」, 不需要写任何文件。apiKey 的位置不用读出来,也不要把 key 贴到任何地方。
  2. 没内置 → 引导弹窗模板:让用户在供应商卡片点「用量查询」打开弹窗:
    • OpenAI 兼容站点(有 /usage 端点)→ 选「通用模板」,必要时填请求地址(留空用供应商的);
    • New API / OneAPI 中转站 → 选「New API」,填访问令牌和用户 ID;
    • 火山方舟(ark,含 Coding Plan / Agent Plan)→ 选「火山方舟 AK/SK」,让用户到火山引擎 控制台「访问控制 → 密钥管理」创建 AK/SK 填进去(不是方舟的推理 API Key:那个是 Bearer 鉴权,控制面 OpenAPI 只认 AK/SK 签名);
    • 两个模板都覆盖不了 → 继续第 3 步。
  3. 写旧版 probes 数组:确认该供应商的「余额 / usage / balance / credits」接口 (拿不到文档时让用户 F12 抓包,把 URL 路径和返回 JSON 发给你;记得提醒用户 抹掉 key/token),确定「剩余额度」字段后按下面结构生成 probes 数组。
  4. 验证:让用户打开供应商卡片看底部用量行。不显示就继续对齐字段路径。

重要安全边界:probes 数组里不要写 apiKey。鉴权统一走 Authorization: Bearer <key>, 主进程自动从 auth.json/models.json 取 key;只有个别接口用非标准鉴权头时才用 "headers": { "X-API-Key": "{{apiKey}}" } 占位。 例外:火山方舟模板的 AK/SK 由弹窗写进顶层 providers 映射(不走 probes 数组), 只用于本地派生请求签名,不进日志与遥测。

Read the full file on GitHub · 201 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 28d ago Changed · +8 lines · +9 tokens per session 7a09edba8411
  2. 1mo ago First seen · 193 lines · 104 tokens per session scan A d0e4c331c0b7

Subscribe to this mod's changes

usage-probe is a skill published in the GitHub repository ayuayue/PiDeck (1,121 stars, last pushed today), licensed MIT. It adds 113 tokens to every session and 2,637 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

article-writer

Multi-style article creation skill. Supports 5 writing styles (deep analysis, practical guide, story-driven, opinion, news brief), including complete workflow: material collection → outline → content → formatting. Activated when users mention "write article", "write post", "create", or "draft".

netease-youdao/LobsterAI · 62 tokens

skin-creator

Create and apply a two-asset LobsterAI visual skin from the user's style description. Use only when the AI Skin Designer kit supplies the structured skinpack workflow marker; do not use for ordinary theme or image requests.

netease-youdao/LobsterAI · 48 tokens

content-planner

WeChat Official Account topic planning and content calendar management. Based on WeChat article search and trending analysis, generates differentiated topic recommendations and outputs structured content calendars. Activated when users mention "topic", "planning", "content calendar", "trending", or "what to write next…

netease-youdao/LobsterAI · 63 tokens

sn-ppt-dazzle

A workflow for turning an approved presentation outline into a single HTML deck that runs in a web browser. It creates a 1280-by-720 layout with animated backgrounds, page transitions, and keyboard navigation.

OpenSenseNova/SenseNova-Skills · 133 tokens

weather

Get current weather and forecasts (no API key required).

netease-youdao/LobsterAI · 13 tokens

sn-image-base

Base-layer skill for the SenseNova-Skills project, providing low-level APIs for image generation, recognition (VLM), and text optimization (LLM). This skill does not preprocess inputs; it only calls backend services and returns results. This skill is not user-facing and is intended for upper-layer skills only.

OpenSenseNova/SenseNova-Skills · 66 tokens