By syf2211
RuleDoctor — reinject rules after compaction, block forbidden commands, audit session logs for read-rate and compliance.
核心产物: skills/ruledoctor/SKILL.md — 复制一个文件夹即可安装。
同仓库还提供可选 CLI(事后体检)与 Hook(危险 shell 硬拦),不必为了用 Skill 而装它们。
Skill 安装说明 · 用户指南 · Hook 是什么? · 只看 Skill 目录
npm 上尚无 ruledoctor 包(npm i -g ruledoctor 会 404)。
Skill 用 GitHub / npx skills add;CLI 用 npm i -g github:syf2211/ruledoctor 或 clone 后 npm link。
| 烦事 | Skill 帮你 |
|---|---|
有 CLAUDE.md 但助手不读 | 开场 Read 根规则 + .ruledoctor.json 里的 required_reads |
| 开场复述一整篇规则 | 默认只报:读了哪些文件 + 最多 3 条硬约束(你说「展开」才长篇) |
| 聊久了像忘了规矩 | 你说上下文被压缩 → 重新 Read |
危险 git push --force | Skill 应口头拒绝;要 宿主硬拦 见下方 Hook |
git clone https://github.com/syf2211/ruledoctor.git
cp -R ruledoctor/skills/ruledoctor ~/.claude/skills/
cp -R ruledoctor/skills/ruledoctor ~/.codex/skills/
# Cursor → ~/.cursor/skills/ 或项目 .cursor/skills/
npx skills add syf2211/ruledoctor --skill ruledoctor -g -y
新开对话,在有规则文件的项目里试一个小任务。
CC Switch:仓库 syf2211/ruledoctor,子目录 skills → 说明。
项目还没有规则?可用 CLI 生成模板(可选):
cd ruledoctor && npm install && npm run build
node dist/index.js setup -p /path/to/your-project
在 .ruledoctor.json 里配置 required_reads,例如 docs/agent_workflow_protocol.md。
| 层 | 干什么 | 抽象规则(中文、汇报、验证说明) | 命令式规则(force push) |
|---|---|---|---|
| Skill | 提醒读规则、口头拒绝 | 主要靠这个 | 软拒绝 |
| Hook | 会话节点跑脚本 | 不能拦「回复没写验证」 | 可硬拦 Bash |
| CLI | 扫 jsonl 出报告 | 仅启发式/读到率 | 事后核对 |
「必须用中文、做完要汇报」不能靠当前 Hook 在发消息/出回复时自动发现或补全。机制说明见 Hook 是什么?。
只装 Skill 就够用 的情况最多。需要时再装:
npm i -g github:syf2211/ruledoctor
ruledoctor --cwd your-project --last-session # 事后报告
Hook(注入规则锚点、拦 shell、结束出报告):
node dist/index.js setup -p /path/to/your-project
required_reads 里的路径会被 Read(若存在)。| 路径 | 用途 |
|---|---|
skills/ruledoctor/ | 你要安装的 Skill |
docs/ | 用户文档 + 仓库结构说明 |
src/、test/ | CLI 开发与测试(CI) |
scripts/、plugin/ | Hook / Claude 插件 |
docs/internal/ | 维护者笔记 |
MIT
Executes bash commands
Hook triggers when Bash tool is used
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub syf2211/ruledoctor --plugin ruledoctorUltra-compressed communication mode. Cuts ~75% of tokens while keeping full technical accuracy by speaking like a caveman.
Memory compression system for Claude Code - persist context across sessions
Multi-model consensus engine integrating OpenAI Codex CLI, Gemini CLI, and Claude CLI for collaborative code review and problem-solving.
Curate auto-memory, promote learnings to CLAUDE.md and rules, extract proven patterns into reusable skills.