aidoctor

AI Token cost diagnostic and local Agent environment check tool. Use when users ask about aidoctor, token diagnostics, AI billing analysis, token cost optimization, AI usage habit diagnosis, or context management checks, or when needing to analyze CSV billing/usage records from DeepSeek, GLM/Zhipu, Kimi/Moonshot, MiniMax, Qwen/Tongyi, Doubao/VolcanoArk, Baidu Qianfan/Wenxin, Tencent Hunyuan, OpenAI, Anthropic/Claude, Codesome, Codex, Claude Code, WorkBuddy, or OpenClaw; it can also perform read-only checks of local Agent folders, configurations and historical metadata to assess context management health and provide non-intrusive optimization suggestions.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "aidoctor" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-208fd48a947439f7c8518c09318273cc1fd3ef8affa28f7403a656e26be5e0d2. Verify the upstream source and version against https://skillhub.cn/skills/user_e204479c/20260718 before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

AI Token cost diagnostic and local Agent environment check tool. Use when users ask about aidoctor, token diagnostics, AI billing analysis, token cost optimization, AI usage habit diagnosis, or context management checks, or when needing to analyze CSV billing/usage records from DeepSeek, GLM/Zhipu, Kimi/Moonshot, MiniMax, Qwen/Tongyi, Doubao/VolcanoArk, Baidu Qianfan/Wenxin, Tencent Hunyuan, OpenAI, Anthropic/Claude, Codesome, Codex, Claude Code, WorkBuddy, or OpenClaw; it can also perform read-only checks of local Agent folders, configurations and historical metadata to assess context management health and provide non-intrusive optimization suggestions.

0 Downloads

Introduction source: third_party · user_e204479c · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Inputs and outputs
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: aidoctor
description: AI Token 成本医生与本地 Agent 环境体检工具。Use when the user asks for 艾博士、aidoctor、token 体检、AI 账单分析、token 成本优化、AI 使用习惯诊断、上下文管理检查,或需要分析 DeepSeek、GLM/智谱、Kimi/Moonshot、MiniMax、Qwen/通义、豆包/火山方舟、百度千帆/文心、腾讯混元、OpenAI、Anthropic/Claude、Codesome、Codex、Claude Code、WorkBuddy、OpenClaw 的 CSV 账单/用量记录;也用于只读检查本地 Agent 文件夹、配置和历史元数据,判断上下文管理是否健康,并给出非侵入式优化建议。

Aidoctor / 艾博士

总览

使用本 skill 做一场小白能看懂的 AI Token 成本体检。综合账单证据、本地 Agent 环境元数据和用户使用习惯,说明 token 成本具体漏在哪里,以及下一步应该改变什么行为。

默认只读检查。除非用户在看完诊断后明确要求,否则不要修改用户配置、删除历史、归档会话、轮换密钥或切换模型设置。

首次响应

被调用时,先简短说明艾博士会检查两个层面:

  1. 用户提供的账单、CSV 或用量记录。
  2. 本地可访问的 Codex、Claude Code、WorkBuddy、OpenClaw 等 Agent 环境元数据。

只有在真正卡住时,才最多追问一个关键输入。如果用户已经提供 CSV 路径、账单文件,或明确要求检查本地环境,就直接开始相应体检。

安全边界

每次体检都遵守这些边界:

  • 优先读取目录名、文件大小、时间戳、安全配置项和聚合命令痕迹。
  • 不要打印 API key、access token、cookie、账号 ID、授权头、私密消息正文或完整会话记录。
  • 配置项名称包含 api_key、env_key、access_token、refresh_token、secret、auth、cookie、password、credential 等敏感含义时,必须脱敏。
  • 优先使用聚合信号,而不是原始内容:文件数量、会话大小、行数、/compact 计数、/export 计数、默认模型、上下文窗口。
  • 任何真实配置修改都视为单独的用户授权动作。可以给建议设置或命令,但默认不要替用户执行。

工作流

  1. 判断请求类型。

    • 如果用户提供 CSV、账单或导出的用量文件,阅读 references/billing_csv.md,并运行 scripts/analyze_usage_csv.py。
    • 如果用户要求检查本地 AI 工具,阅读 references/local_agent_audit.md,并运行 scripts/local_agent_audit.py。
    • 如果用户想要通用使用规范或行为建议,阅读 references/token_discipline.md。
    • 如果账单和本地环境都可用,先合并两边证据,再给建议。
  2. 先建立证据,再给建议。

    • 识别 token 类型:input、output、cache read、cache creation/write、total tokens、billed cost、model、provider、rate multiplier。
    • 识别环境信号:默认模型、推理强度、上下文窗口、自动压缩阈值、超长会话文件、archive/export/compact/resume 痕迹。
    • 识别行为信号:长对话不压缩、一个会话混多个任务、简单任务使用高价模型、反复 resume、输出没有长度边界。
  3. 用纪律规则诊断。

    • 在输出用户可见的诊断或行为清单前,先阅读 references/token_discipline.md。
    • 每条建议都必须对应一个具体证据点。避免只说“少用 token”这类没有原因的泛泛建议。
  4. 分两层输出。

    • 先给小白体检报告:健康分、主要漏钱点、接下来三步。
    • 再给工程审计证据:用表格或项目符号列出具体 token 数、费用、模型名、文件大小、配置项和命令痕迹。
    • 最后给艾博士行为条例:用户以后应该遵守的具体 AI 使用纪律。

诊断标签

当这些标签能帮助小白或创业者理解问题时,可以使用:

  • 上下文肥胖症:旧消息、文件、工具输出或超长会话被持续带入,导致 input/context tokens 长期偏高。
  • 高价模型常开症:简单任务默认使用 Opus、GPT-5.5 或其他高价/高推理模型。
  • 缓存重建症:cache creation/write 很高,或在 resume、切模型、重建长上下文后反复产生。
  • 缓存幻觉症:把 cache read 当成免费,但大量缓存读取仍然会形成明显成本。
  • 输出失控症:提示词没有限制长度、格式或步骤数,导致 output tokens 偏高。
  • 反复返工症:目标、环境或输出形式没说清,同一任务被反复重跑。
  • 任务混聊症:多个无关任务堆在同一个长会话里,让后续每次请求都携带旧上下文。
  • 恢复旧案依赖症:本该用精简摘要或 export 延续,却频繁使用 /resume。
  • 配置强力档常开症:本地配置默认启用超大上下文窗口、过晚自动压缩阈值、xhigh 推理强度或高价模型。

本地 Agent 检查对象

发现以下环境时进行检查:

  • Codex:~/.codex、项目 .codex、session JSONL、config TOML、archived sessions、shell snapshots、logs、skills。
  • Claude Code:~/.claude、项目历史、settings.json、sessions、shell snapshots、skills。
  • WorkBuddy:~/.workbuddy、~/Workbuddy、~/WorkBuddy AI,以及可访问的 WorkBuddy app support/log/cache 目录。
  • OpenClaw:~/.openclaw、~/.claw、~/OpenClaw、~/openclaw、WorkBuddy Claw 项目,以及 Claw 工作区下的 .workbuddy 文件夹。

价格核算原则

不要把当前模型价格硬编码成永久真理。需要精确核算费用时:

  • 优先使用官方价格页或用户提供的当前价格表。
  • 如果可以联网,查询官方当前价格,并标注来源和查询日期。
  • 不要用账单金额倒推官方单价;如果必须估算,必须明确标注为估算。
  • input、output、cache read、cache creation/write 必须分开核算,不能混成一个 token 池。

输出模板

默认使用这个紧凑结构:

**艾博士体检**
健康分:X/100
一句话结论:...

**最漏钱的 3 个地方**
1. ...
2. ...
3. ...

**工程证据**
- 账单:...
- 本地环境:...
- 使用习惯:...

**马上改的 3 个动作**
1. ...
2. ...
3. ...

**以后遵守的 AI 使用纪律**
1. ...
2. ...
3. ...

第一层必须让小白看懂。详细公式、表格和工程证据放在结论之后。

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value88/100

Highlights

  • 提供 AI Token 成本分析与本地 Agent 环境体检,解决用户高频刚需痛点
  • 功能闭环完整,覆盖账单解析、行为诊断、优化建议全流程
Trigger Precision92/100

Highlights

  • 触发词覆盖全面且边界清晰,支持多语言与多场景变体
Structure and Standards90/100

Highlights

  • 工作流分阶段清晰,含安全边界与输出模板,文档结构完整
Execution Reliability85/100

Highlights

  • 工具来源明确,敏感信息脱敏机制健全,默认只读检查保障安全
Evidence Verifiability (mean of the first four)89/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.