Setup Doctor

io.github.saxenakapilv0.3.2更新於 Oct 2, 2026

Score and improve your AI coding agent setup. Local-only, open source.

已驗證STDIO僅桌面Data & AnalyticsDeveloper Tools

概覽

AI 產生的概覽

在本機稽核並評分你的 AI 編碼代理設定,並把本機會話日誌彙整成可分享的使用卡片。

功能
Setup Doctor 透過 stdio 提供兩個唯讀工具:Doctor 與 Wrapped。Doctor 會稽核 Claude Code、Codex、GitHub Copilot CLI 或 Cursor 的指令檔、技能、子代理、MCP 伺服器、外掛、設定與掛鉤,執行 6 個類別共 29 條規則,回傳 0-100 分、等級,以及每項發現的具體修正建議。Wrapped 會把本機會話日誌彙整為工作階段數、活躍天數、token 數、API 等效成本估算、連續使用天數與人物標籤,並產生可分享的卡片。
適用情境
當你想快速、離線評估某個專案的 AI 編碼代理設定,或定期總結自己的本機代理使用情況時使用。適合想要具體設定修正建議與 CI 分數門檻、又不願把資料傳到外部的開發者。
執行需求
以本機程序方式執行,可透過 npx(npm 套件 setup-doctor)或 Homebrew 安裝;需要 Node.js,讀取 Cursor 日誌需要 Node 22.5+。不需要帳號、API 金鑰、登入或環境變數。僅支援桌面端,沒有網頁版。
安裝前請注意
除了選用的 --fix 模式外,對代理設定與工作階段日誌皆為唯讀;--fix 會先預覽差異、要求確認,並在寫入前備份。本機 HTML 與 JSON 報告可能包含真實專案檔案路徑,分享前請先檢查。Wrapped 卡片與徽章只含彙總數字;只有在傳入 --show-projects 時才會出現專案名稱。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Setup Doctor,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

setup-doctor

Score and improve your AI coding agent setup. Local-only, open source, free.

[Setup Doctor score]

That's this repository's own real score, produced by running setup-doctor against itself (see docs/notes.md for how). It is not a mockup.

setup-doctor audits how Claude Code, GitHub Copilot CLI, Codex or Cursor is configured in your project and globally, gives it a 0-100 score with concrete fixes, and turns your local usage logs into a shareable "Wrapped" card. Everything runs on your machine. Nothing is ever sent anywhere.

[npx setup-doctor terminal output: score, category breakdown and findings]

This is real npx setup-doctor output (against a small demo project, not this repository): a critical secret finding, a dead MCP server command, a thin skill description, and the score capped because of the critical finding. Not a mockup.

What it does

  • Doctor: audits instruction files (CLAUDE.md / .github/copilot-instructions.md / AGENTS.md / .cursorrules), skills, subagents, MCP servers, plugins, settings and hooks. Runs 29 rules across 6 categories and returns a score, a band (Excellent / Good / Needs work / Poor), and a specific fix for every finding.
  • Wrapped: summarizes your local session logs (Claude Code, Codex, GitHub Copilot CLI or Cursor) (sessions, active days, tokens, an API-equivalent cost estimate, streaks, busiest hour, a persona label) into a shareable card, in three visual themes and two sizes, with optional PNG export.
  • Badge: a static or live (shields.io endpoint) README badge showing your current score.
  • HTML report: a single self-contained, themed report file. No network requests, strict Content-Security-Policy, everything inlined.
  • MCP server mode: npx setup-doctor mcp exposes Doctor and Wrapped as read-only tools over stdio for Claude Desktop and other MCP clients; see docs/guide/mcp-server.md. Listed on the official MCP Registry as io.github.saxenakapil/setup-doctor.

Supported agents

AgentDoctorWrapped
Claude CodeFull (all 29 rules)Supported
CodexInstructions + MCP rulesSupported
GitHub Copilot CLIInstructions, skills, MCP and settings/hooks rulesSupported
CursorInstructions + MCP + project skills rulesSupported on Node 22.5+ (reads Cursor's local state.vscdb via the built-in node:sqlite module; verified against a real Cursor install, see docs/notes.md)

Subagents, plugins, settings and hooks checks are Claude Code/Copilot-specific; those categories are simply excluded from the score for Codex/Cursor-only setups rather than counted against you. Skills checks (.claude/skills for Claude Code/Copilot CLI, project-scope .cursor/skills for Cursor) apply to all three; Cursor's own global/personal skills live in a cloud-synced store rather than a fixed local path, so only its project-scope skills are read (see docs/notes.md). Copilot CLI is documented to read several of Claude Code's own files directly (.claude/skills, .claude/settings.json, and the "portable format" .mcp.json); when a project is detected as both agents, a real problem in one of those shared files is scored once, not once per agent, and the report notes which other agent it also affects.

Install and run

No install needed, run it with npx:

bash
npx setup-doctor                        # audit the current project (terminal report)npx setup-doctor doctor --format html   # self-contained HTML reportnpx setup-doctor doctor --fix --dry-run # preview safe, mechanical fixes (nothing is changed)npx setup-doctor badge                  # write a README badgenpx setup-doctor wrapped --period 30d   # usage summary + shareable cardnpx setup-doctor rules                  # list all 29 rulesnpx setup-doctor explain INS-02         # explain what a rule checks and how to fix itnpx setup-doctor mcp                    # start an MCP server (doctor + wrapped as read-only tools)

Or install it with Homebrew (macOS/Linux):

bash
brew install saxenakapil/setup-doctor/setup-doctor

From the saxenakapil/homebrew-setup-doctor tap: installs the same npm package npx would run, tracks new releases automatically (the tap's own CI bumps the formula daily against npm), and every change to the formula is built and tested end to end on real macOS and Linux runners before it merges.

Or install the Claude Code plugin from this repository's marketplace, which exposes /setup-doctor:doctor and /setup-doctor:wrapped as skills that call the same CLI. Cursor users can copy skills-cursor/ into their own project's .cursor/skills/ for the same two skills, adapted for Cursor; see docs/guide/cursor-skills.md.

Common flags

FlagApplies toWhat it does
--agent claude|codex|cursor|copilot|alldoctor, badge, wrappedWhich agent setup to read (default: auto-detect for doctor/badge, claude for wrapped)
--scope project|global|alldoctor, badgeWhich locations to check
--formatdoctor: terminal|json|html; wrapped: terminal|json (no html)Output format
--theme playful|technical|mixdoctor --format html, badge, wrappedVisual theme (default playful for doctor/badge, technical for wrapped)
--min-severity low|medium|high|criticaldoctorHide findings below this level (score is unaffected)
--ci --fail-under <n>doctorExit 1 if the score is below n, for CI gates
--ci --comparedoctorAppends the score to a local .setupdoctor-history.jsonl and exits 1 if it dropped since the last --ci run; --compare alone (no --ci) just prints the delta
--period 7d|30d|ytd|all|YYYY-MM-DD:YYYY-MM-DDwrappedTime window (default 30d)
--anonymize / --show-projectswrappedHide project names everywhere / show them on the card (default hidden)
--no-costwrappedRemove cost figures
--trendwrappedShow the change vs the previous period of the same length (sessions, active days, tokens, cost); not available for --period all
--tz <IANA zone>wrappedTimezone for date boundaries (default: local)
--out <path> / --yesdoctor, badge, wrappedOutput folder / overwrite existing files without asking
--config <path>doctor, badge, rules, wrappedConfiguration file (default: <path>/.setupdoctorrc, see docs/guide/config.md); its agent/scope/theme/minSeverity fields act as real defaults for the equivalent flag
--no-colordoctor, wrappedDisable ANSI color (also off for --ci, NO_COLOR, or non-TTY output)
--fix / --dry-run / --allow-dirtydoctorPropose (and optionally apply) safe, mechanical fixes; see docs/guide/fix-mode.md

Run npx setup-doctor --help for the full list.

Badge

md
![Setup Doctor score](https://img.shields.io/badge/setup%20doctor-88%20Good-yellowgreen)

npx setup-doctor badge writes setup-doctor-badge.svg and prints a snippet like the one above, with your real score. Pass --endpoint to also write a shields.io endpoint JSON file; see docs/examples/badge-workflow.yml for a GitHub Actions workflow that publishes a live badge from your own CI. docs/examples/ci-gate-workflow.yml shows using --ci --fail-under to block a PR on a low score.

Privacy

  • No network calls at runtime. No telemetry, no update checks, no remote fonts or scripts in any output: enforced by an automated check in CI (scripts/check-no-network.mjs).
  • Read-only on your agent configuration and session logs, everywhere except the optional --fix mode, which previews a diff, asks for confirmation, and saves a backup before touching anything.
  • Secret-like values are never printed. Findings report the rule and location only; the value always shows as [REDACTED].
  • The Wrapped card and the badge contain aggregate numbers only: no prompts, file paths, usernames or repo names. Project names appear only if you pass --show-projects, and --anonymize hides them everywhere, including the local report.
  • The session log parser reads metadata only (timestamps, model, token counts, tool names) and drops message text as each line is read; it is never held in memory beyond the current line.
  • Local reports (the HTML report, JSON output) can still contain real file paths from your project; a footer in the HTML report reminds you of that before you share it.

What this will never do

  • Never call out to the network, at any point, for any reason. Not for telemetry, not for update checks, not to fetch a rule update or a fresher price table. This is enforced by an automated CI check (scripts/check-no-network.mjs), not just a policy.
  • Never execute anything it finds. It never imports child_process and never runs a hook, script, or MCP server command. MCP commands are only checked for existence on PATH.
  • Never touch your files without --fix, and even then, never without a preview, a confirmation, and a backup first. Every other command is read-only, always.
  • Never require an account, an API key, or a login. There is nothing to sign up for and nothing to configure before your first run.
  • Never charge for anything. setup-doctor is free and MIT-licensed, and will stay that way; there is no paid tier this project is funneling you toward.
  • Never add a runtime dependency casually. The budget is 0 to 3, forever, and every one is reviewed on its own merits (see docs/notes.md for the audit trail on @resvg/resvg-js, optional and only used for PNG export, and on @modelcontextprotocol/sdk plus its required zod peer dependency, used only by mcp mode and kept out of the main dist/bin.js bundle entirely).

Guide

Every command, with real (not fabricated) output and worked examples:

Docs

  • docs/scope.md: the frozen v1 scope, data model, outputs and build plan
  • docs/rules.md: every rule, with detection logic, severity and fix text
  • docs/themes.md: the three visual themes' design tokens and layouts
  • docs/notes.md: assumptions, deviations from the spec, and decisions made while building (including everything verified against real Claude Code / Copilot / Codex / Cursor installs and documentation)

Development

bash
npm install          # first time; commit package-lock.jsonnpm run typecheck     # tsc --noEmitnpm test              # vitestnpm run check          # typecheck + tests + privacy guard + version sync + em dash guard (run before every commit)npm run build          # bundles src/bin.ts to dist/bin.jsnpm run smoke:publish  # packs the real tarball, installs it into a scratch project, runs the installed bin

The repository must stay public: Claude Code's plugin marketplace and Cowork are reported not to sync private repositories.

License

MIT. See LICENSE. Bundled font licenses (SIL Open Font License 1.1) are in src/data/fonts/LICENSES.md.

來源:README.md,提交 a62c2ca

工具

0
工具後設資料尚未被收錄。

版本歷史

1
  1. v0.3.2最新Oct 2, 2026