360 Secure SkillHub
360 安全技能中心

Refactor Agents Md

用于审查、拆分或改写 AGENTS.md / CLAUDE.md:先把指令分类为根文件必要、主题专属、冲突、冗余、含糊或过时,保留通用内容于根文件,将细节拆入主题文档,改动前暴露矛盾并标记可删除内容;支持仅评审、给出改写方案或就地重构三种模式。

clarezoe
clarezoe
热度 47.51
最近更新 2026-06-09 21:21:48
分类:开发依赖:读写文件 / 内部调用大模型应用场景:工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add refactor-agents-md
Metadata
name
refactor-agents-md
description
Refactors AGENTS.md files into a minimal root file plus topic-specific follow-up docs using progressive disclosure. Use when cleaning up, splitting, or reviewing AGENTS.md / CLAUDE.md guidance — or when the file has grown into a "ball of mud" with contradictions, bloat, and stale instructions.
license
MIT-0
metadata
{"openclaw":{"emoji":"🧹","homepage":"https://github.com/Fei2-Labs/skill-genie"},"category":"developer-tools","author":"Skill Genie","tags":["agents-md","claude-md","refactoring","progressive-disclosure","ai-config"],"version":"1.0.2","license":"MIT-0","hermes":{"tags":["agents-md","claude-md","refactoring","progressive-disclosure","ai-config"]}}

<quick_start>

  1. Identify whether the user wants a review, a rewrite proposal, or an in-repo refactor.
  2. Read the current AGENTS.md content and classify each instruction as root-essential, topic-specific, conflicting, redundant, vague, or stale.
  3. Keep only universal instructions in the root file, move the rest into topic docs, and surface any contradictions before editing. </quick_start>

<essential_principles> 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.

If the user already gave enough context, skip extra questions and go straight to the matching workflow.

<reference_index> All shared guidance lives in references/:

Principles and heuristics: references/principles.md </reference_index>

<workflows_index> Review an AGENTS.md file, classify instructions, and propose a minimal split. Inspect the repo and rewrite AGENTS.md files in place. </workflows_index>

<success_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 </success_criteria>