config-doctor
Skill1 starsChanged 3 months agoMITView on GitHub
扫描 Claude Code 所有配置文件,诊断冲突、冗余、过期项和安全风险。覆盖 settings.json、settings.local.json、CLAUDE.md、keybindings、skills、hooks、permissions。用户说"检查配置"、"配置有问题"、"config check"、"设置冲突"、"权限问题"、"config doctor"时触发。
- Reads credentials
2 other projects use a version of this.
Adopted by
Most recently taken up by
- excatt/superclaude-plusplustheir own version, first seen Oct 13, 2026
- neeraj181-dot/ClaudeSkillstheir own version, first seen Aug 25, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- excatt/superclaude-plusplus★ 14same name
- neeraj181-dot/ClaudeSkills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository6 other files it gives its agents.
- concise-modeSkill
- git-workflowSkill
- project-onboardingSkill
- refactor-advisorSkill
- release-notesSkill
- test-generatorSkill
The file
Files
config-doctor · 配置诊断
全量扫描 Claude Code 配置文件,按严重程度输出诊断报告。
扫描范围
| 层级 | 路径 | 说明 |
| 用户全局 | ~/.claude/settings.json | 跨项目生效 |
| 用户本地 | ~/.claude/settings.local.json | 本机覆盖,不提交 |
| 项目级 | <project>/.claude/settings.json | 团队共享,提交到 git |
| 项目本地 | <project>/.claude/settings.local.json | 个人本地覆盖,不提交 |
| 项目指令 | <project>/CLAUDE.md | 项目级 AI 行为规范 |
| 按键绑定 | ~/.claude/keybindings.json | 自定义快捷键 |
| 技能目录 | ~/.claude/skills/ | 已安装 skills |
| 项目元数据 | ~/.claude/projects/ | 项目记忆 |
| 凭证 | ~/.claude/credentials.json | API key 等敏感信息 |
诊断项目
🔴 严重(建议立即修复)
- API key 明文在 settings.json
env.ANTHROPIC_AUTH_TOKEN在非 local 文件中 → 应移到settings.local.json- 避免误提交到 git
- 权限放权过宽
allow: ["Bash(*)"]或allow: ["*"]→ 建议收窄到具体命令WebFetch(*)允许访问任意 URL → 建议加域名白名单
- 凭证文件权限
- 检查
credentials.json是否可被其他用户读取
- 检查
🟡 警告(建议处理)
- 多层配置冲突
- 同一 key 在 user / project / local 中出现不同值 → 列出优先级链,指出生效值
- 例如:用户设
"model": "haiku",项目设"model": "sonnet"→ 项目级覆盖用户级
- 重复权限声明
- 高优先级文件已 allow,低优先级文件又声明一次 → 冗余,建议删除
- 例如:
settings.local.jsonallow 了Bash(git:*),项目settings.json又写一遍
- hooks 配置不一致
- 同名 hook 在多个文件定义 → 列出合并结果
- hook 引用的脚本/命令不存在
- skills 未关联仓库
~/.claude/skills/中有 skill 目录但~/claude-skills/中没有对应 → 可能是手动安装或忘记提交
🔵 提示(改进建议)
- 未知/疑似拼错的配置键
- 不在已知 schema 中的 key → 提示可能拼错或已废弃
- 例如:
"efforLevel"(少了一个 t)
- 缺失的推荐配置
- 没有
outputStyle→ 建议设置 - 没有
language→ 可能影响多语言体验 - 有
settings.json但没有settings.local.json→ 可能存在未隔离的敏感配置
- 没有
- 项目元数据清理
~/.claude/projects/中已删除的项目目录 → 建议清理
- 过时的配置值
- 已重命名的模型名、废弃的实验性 flag
✅ 通过项
- 列出检查通过的项目,给用户信心
输出格式
# 🔍 Claude Code 配置诊断
扫描时间:2026-08-10 15:30
扫描范围:~/.claude/ + 当前项目 .claude/
## 🔴 严重 (1)
- **API key 泄露风险**:`~/.claude/settings.json` 第 3 行
`ANTHROPIC_AUTH_TOKEN` 应移至 `settings.local.json`,当前文件可能被 git 追踪
→ 修复:`Edit` 删除此行,`Write` 到 `settings.local.json`
## 🟡 警告 (3)
- **model 冲突**:用户级 `"haiku"` vs 项目级 `"sonnet"` → 项目级生效为 `sonnet`
- **重复权限**:`Bash(git:*)` 在 user 和 project 中重复声明,建议删除 project 中的
- **孤立 skill**:`~/.claude/skills/old-skill/` 在 `~/claude-skills/` 仓库中不存在
## 🔵 提示 (2)
- **未知键** `"efforLevel"` 在 `settings.json` 第 8 行,是否应为 `"effortLevel"`?
- **建议**:为当前项目创建 `CLAUDE.md` 记录项目上下文
## ✅ 通过 (8)
- 凭证文件权限正常 · keybindings 无冲突 · hooks 配置正确 · 所有 skill 有对应仓库源原则
- 只读不写:默认只诊断不修改,用户确认后才动
- 别大惊小怪:提示(🔵)只列真正有意义的,不过度报警
- 给具体修复路径:每条问题附文件路径+行号+修复操作
- 优先级分层:🔴 安全问题优先,🟡 冗余冲突次之,🔵 改进建议最后
- 知道什么不用管:
history.jsonl、cache/、sessions/、backups/等运行时文件不在扫描范围
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

