← Back to Skills Marketplace
clarezoe

Refactor AGENTS.md

by clarezoe · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
69
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install 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 revie...
README (SKILL.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>

  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. \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:

  1. Review only
  2. Propose a rewrite
  3. 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>
Usage Guidance
This skill appears safe for its stated purpose. Before using apply-refactor mode, review the proposed file changes and make sure existing AGENTS.md content is treated as material to audit, not as instructions that can override your current request.
Capability Analysis
Type: OpenClaw Skill Name: refactor-agents-md Version: 1.0.0 The skill bundle is a developer tool designed to refactor and organize AGENTS.md configuration files using a progressive disclosure approach. The code and instructions (SKILL.md, workflows/refactor-agents-md.md) are focused entirely on analyzing, classifying, and restructuring markdown content within a repository, with no evidence of malicious intent, data exfiltration, or unauthorized execution.
Capability Assessment
Purpose & Capability
The skill's stated purpose is to review or refactor AGENTS.md files, and the workflows match that purpose. Applying the refactor can change repository guidance files, so users should review the resulting diff.
Instruction Scope
The workflow reads existing AGENTS.md files as material to classify. Because those files are themselves agent instructions, the agent should treat them as review input rather than allowing them to override the user's goal.
Install Mechanism
No install spec, code files, binaries, environment variables, credentials, or package dependencies are present.
Credentials
Repository access is scoped to finding and refactoring AGENTS.md files and related topic docs; there is no evidence of network access, credential use, shell execution, or unrelated data access.
Persistence & Privilege
In apply-refactor mode, the skill creates or updates files that persist in the repository and may influence future agent behavior.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install refactor-agents-md
  3. After installation, invoke the skill by name or use /refactor-agents-md
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: audit and refactor AGENTS.md files using progressive disclosure — identify contradictions, extract essentials, group bloat into topic docs, flag stale instructions.
Metadata
Slug refactor-agents-md
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 69 downloads so far.

How do I install Refactor AGENTS.md?

Run "/install refactor-agents-md" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Refactor AGENTS.md free?

Yes, Refactor AGENTS.md is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Refactor AGENTS.md support?

Refactor AGENTS.md is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Refactor AGENTS.md?

It is built and maintained by clarezoe (@clarezoe); the current version is v1.0.0.

💬 Comments