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.
npx agentmods add commands/lee-w/maigo/doctorgit clone --depth 1 https://github.com/Lee-W/maigoWrote 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.
[](https://agentmods.dev/commands/lee-w/maigo/doctor)<a href="https://agentmods.dev/commands/lee-w/maigo/doctor"><img src="https://agentmods.dev/badge/commands/lee-w/maigo/doctor.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00047 | $0.01826 |
| Opus 5 | $0.00023 | $0.00913 |
| Sonnet 5 | $0.00009 | $0.00365 |
| Haiku 4.5 | $0.00005 | $0.00183 |
Grade A, and why
doctor 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 112 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/maigo:doctor
「哪裡不舒服嗎。讓我看看。」 —— 🌑 Mortis
檢查 Maigo 運行所需的外部依賴與配置是否到位。
檢查項目
- 環境依賴:
ghCLI:是否安裝、是否已登入(用gh auth status)。git:是否可用。python3:版本是否 ≥ 3.13。
- Maigo 配置:
~/.config/maigo/memory/:目錄是否存在。MEMORY.md:索引檔是否存在且格式正確。
- 專案配置:
.claude/test-command:是否有自定義測試指令。.claude/skip-test-verification:是否被標記跳過。- Taki 試跑:嘗試偵測當前專案類型並跑一個最小化的檢查(例如
ruff --version或嘗試跑一個不存在的 test 來確認 test runner 有反應)。
- Retry / failure 統計(read-only,只讀不清):讀
.maigo/soyo-must-fix.jsonl(🟡 爽世 must-fix 觸發,teammate_quality_check.py寫入)與.maigo/test-failures.jsonl(🟣 立希 test failure 觸發,verify_completion.py寫入),彙整各 key 的觸發次數 + 最近 3 筆摘要。兩個 log 都是相對當前 repo 的.maigo/底下,不存在或是空的 → 印正常訊息 (新環境 / 還沒觸發過 retry 本來就不該有),不算 error。 - Token usage(read-only):讀
.maigo/token-usage.jsonl,彙整最近 7 天總量並依角色/model 分組。只採用 harness 已提供的 foreground subagent metadata;背景 agent、Codex 或舊版 harness 沒資料時標示 unavailable,不自行估算、不算 error。 - 舊固定檔名孤兒檔(read-only,只列不刪):
.maigo/底下的產物已改成帶識別碼命名 (plan-<id>.md/review-rubric-<id>.md/triage-rubric-<id>.md/pr-comments-<id>.md), 舊固定檔名(.maigo/plan.md、.maigo/review-rubric.md、.maigo/triage-rubric.md、.maigo/pr-comments.md)若還存在,代表是升級前留下的孤兒——只列出來,不自動刪除, 由使用者自己決定要不要清(見artifact-ownership)。
流程
- Orchestrator:
- 執行
gh --version與gh auth status。 - 執行
python3 --version。 - 檢查
~/.config/maigo/memory/路徑。
- 執行
- 立希 (Taki):
- 執行專案偵測。
- 報告當前專案被識別為什麼類型。
- 嘗試執行基本 lint/test 指令(dry-run 模式,不要求過,只要求「能跑」)。
- Orchestrator:讀 retry / failure log,彙整統計(不存在 / 空 → 印正常訊息,不中止):
python3 scripts/retry_log_summary.py
- Orchestrator:讀 token usage metadata(Claude Code plugin 安裝環境用
${CLAUDE_PLUGIN_ROOT}定位;在 Maigo repo 開發時可直接用scripts/):
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/token_usage_summary.py" --root "$PWD"
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.
- 4d ago First seen · 112 lines · 47 tokens per session scan A ac28643700c4
doctor is a command published in the GitHub repository Lee-W/maigo (14 stars, last pushed yesterday), licensed MIT. It adds 47 tokens to every session and 1,826 once invoked, about $0.0002 per session on Opus 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.
Other commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.