From ruledoctor
Use when the project has rule files (CLAUDE.md, .cursorrules, CONTRIBUTING.md, .cursor/rules) or .ruledoctor.json required_reads; before git push or deploy; when context was compacted. Read listed rules and required_reads first; refuse violations; re-read after long sessions. Default user message: files read + 3 hard constraints only unless user asks for full summary.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ruledoctor:ruledoctorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
| 层 | 作用 |
| 层 | 作用 |
|---|---|
| 本 Skill | 提醒你先读规则、拒绝违禁操作、压缩后重读(软约束) |
CLI ruledoctor | 用户要求时,用本地会话日志做事后核对 |
Hook(ruledoctor setup) | 在 Bash 执行前硬拦截部分命令;SessionStart/压缩后注入规则摘要;结束可出报告(见下) |
读规则 ≠ 一定遵守。「必须用中文、要汇报、要写验证」 靠本 Skill + 项目规则(软约束);只有能写成 shell 子串的危险命令 才适合 Hook 硬拦。人话说明:Hook 是什么?
.cursor/rules/,或 .ruledoctor.json 里有 required_readsCLAUDE.md、AGENTS.md、.cursorrules、CONTRIBUTING.md、.github/copilot-instructions.md、.cursor/rules/*.{md,mdc}.ruledoctor.json → required_reads 数组,例如:
"required_reads": ["docs/agent_workflow_protocol.md", "README.md"]
README.md 只有写进清单才强制 Read,不会默认扫全库。required_reads 里每一项(文件必须存在)。默认只说:
required_reads)仅当用户说「展开规则 / 完整摘要 / 列出全部」时,再发更长摘要。
git push --force、git push -f、rm -rf /、提交密钥。required_reads 项;默认仍用「文件列表 + 3 条硬约束」汇报。ruledoctor --cwd "<项目根>" --last-session
~/.claude/skills/ruledoctor/ · ~/.codex/skills/ruledoctor/ · Cursor:~/.cursor/skills/ruledoctor/
仓库:https://github.com/syf2211/ruledoctor (skills/ruledoctor)
用户文档:https://github.com/syf2211/ruledoctor/blob/main/docs/用户指南.md
npx claudepluginhub syf2211/ruledoctor --plugin ruledoctorCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.