/install refactor-agents-md
\x3Cobjective> Refactor AGENTS.md files so the root file stays small, stable, and broadly useful while detailed guidance moves into focused follow-up docs. The skill helps identify contradictions, separate essentials from bloat, and produce a clearer instruction hierarchy that is easier for agents to follow. \x3C/objective>
\x3Cquick_start>
- Identify whether the user wants a review, a rewrite proposal, or an in-repo refactor.
- Read the current AGENTS.md content and classify each instruction as root-essential, topic-specific, conflicting, redundant, vague, or stale.
- Keep only universal instructions in the root file, move the rest into topic docs, and surface any contradictions before editing. \x3C/quick_start>
\x3Cessential_principles> \x3Cprinciple name="keep-root-minimal"> The root AGENTS.md should contain only what applies to every task: a one-line project description, package manager expectations if non-default, non-standard build or typecheck commands, and truly universal constraints. \x3C/principle>
\x3Cprinciple name="resolve-conflicts-first"> If two instructions disagree, do not silently merge them. Surface the conflict, explain the tradeoff briefly, and ask the user which version to keep before rewriting. \x3C/principle>
\x3Cprinciple name="group-by-purpose"> Move remaining guidance into separate files grouped by topic or behavior, not by author, chronology, or file location. \x3C/principle>
\x3Cprinciple name="delete-bloat"> Flag redundant, vague, self-evident, or outdated instructions for deletion instead of preserving them in a new location. \x3C/principle>
\x3Cprinciple name="prefer_progressive_disclosure"> Keep the root file as a router into narrower guidance. Detail belongs in follow-up docs that are only read when relevant. \x3C/principle> \x3C/essential_principles>
\x3Cintake> Ask the user which mode they want:
- Review only
- Propose a rewrite
- Apply the refactor in the repo
If the user already gave enough context, skip extra questions and go straight to the matching workflow. \x3C/intake>
\x3Crouting> \x3Cmode name="review-only">workflows/audit-agents-md.md\x3C/mode> \x3Cmode name="propose-rewrite">workflows/audit-agents-md.md\x3C/mode> \x3Cmode name="apply-refactor">workflows/refactor-agents-md.md\x3C/mode> \x3C/routing>
\x3Creference_index> All shared guidance lives in references/:
Principles and heuristics: references/principles.md \x3C/reference_index>
\x3Cworkflows_index> \x3Cworkflow name="audit-agents-md.md">Review an AGENTS.md file, classify instructions, and propose a minimal split.\x3C/workflow> \x3Cworkflow name="refactor-agents-md.md">Inspect the repo and rewrite AGENTS.md files in place.\x3C/workflow> \x3C/workflows_index>
\x3Csuccess_criteria> The skill is complete when it can consistently:
- identify contradictions before rewriting
- keep root AGENTS.md content minimal
- split topic-specific guidance into separate docs
- flag redundant, vague, and stale instructions for deletion
- produce a clear proposed file structure or apply it in the repo \x3C/success_criteria>
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install refactor-agents-md - 安装完成后,直接呼叫该 Skill 的名称或使用
/refactor-agents-md触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Refactor AGENTS.md 是什么?
Refactors AGENTS.md files into a minimal root file plus topic-specific follow-up docs using progressive disclosure. Use when cleaning up, splitting, or revie... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 69 次。
如何安装 Refactor AGENTS.md?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install refactor-agents-md」即可一键安装,无需额外配置。
Refactor AGENTS.md 是免费的吗?
是的,Refactor AGENTS.md 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Refactor AGENTS.md 支持哪些平台?
Refactor AGENTS.md 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Refactor AGENTS.md?
由 clarezoe(@clarezoe)开发并维护,当前版本 v1.0.0。