
Setup Doctor
io.github.saxenakapilv0.3.2更新于 Oct 2, 2026
Score and improve your AI coding agent setup. Local-only, open source.
概览
在本地审计并评分你的 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 密钥、登录或环境变量。仅支持桌面端,无网页版。
安装
在 SourceWeft 中
- 打开 控制台中的 Setup Doctor,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
setup-doctor
Score and improve your AI coding agent setup. Local-only, open source, free.
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-doctoraudits 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 mcpexposes Doctor and Wrapped as read-only tools over stdio for Claude Desktop and other MCP clients; seedocs/guide/mcp-server.md. Listed on the official MCP Registry asio.github.saxenakapil/setup-doctor.
Supported agents
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:
Or install it with Homebrew (macOS/Linux):
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
Run npx setup-doctor --help for the full list.
Badge
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
--fixmode, 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--anonymizehides 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_processand never runs a hook, script, or MCP server command. MCP commands are only checked for existence onPATH. - 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-doctoris 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.mdfor the audit trail on@resvg/resvg-js, optional and only used for PNG export, and on@modelcontextprotocol/sdkplus its requiredzodpeer dependency, used only bymcpmode and kept out of the maindist/bin.jsbundle entirely).
Guide
Every command, with real (not fabricated) output and worked examples:
docs/guide/getting-started.md: your first run, reading the score and a findingdocs/guide/doctor.md: everydoctorflag,--format json's full shape, exit codesdocs/guide/wrapped.md: periods, privacy flags, the card,--format jsondocs/guide/fix-mode.md: a real--fixwalkthrough,--dry-runvs. applying, backupsdocs/guide/ci-integration.md: the Marketplace Action, the example GitHub Actions workflows, and the pre-commit hook, explaineddocs/guide/agents.md: what each agent reads, and how a shared file is scored once, not twicedocs/guide/config.md:.setupdoctorrcfully worked, includingignoreand what it does not do yetdocs/guide/mcp-server.md: using Doctor and Wrapped as read-only MCP tools from Claude Desktop or another MCP clientdocs/guide/cursor-skills.md: using Doctor and Wrapped as Cursor skillsdocs/guide/troubleshooting.md: "nothing to check," a wrong-looking score, and more
Docs
docs/scope.md: the frozen v1 scope, data model, outputs and build plandocs/rules.md: every rule, with detection logic, severity and fix textdocs/themes.md: the three visual themes' design tokens and layoutsdocs/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
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- v0.3.2最新Oct 2, 2026
