360 Secure SkillHub
360 安全技能中心

Refactor Agents Md

核心功能:对AGENTS.md指令分类,保留通用内容在根文件,拆分主题内容到子文档,识别并提示矛盾、冗余、过时内容。典型场景:AGENTS.md臃肿杂乱、有矛盾或过时指令,需清理、拆分或评审时使用。支持评审、重写提案、仓库内直接重构三种模式,输出对应优化结果。

clarezoe
clarezoe
热度 47.54
最近更新 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>