Refactor oversized agent instruction files into a progressive-disclosure structure.

Apache-2.0Auto-check passedAgent Workflows

Install Agent Md Refactor

skills CLI
$ npx skills add micronaut-projects/micronaut-openapi --skill agent-md-refactor -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install micronaut-projects/micronaut-openapi agent-md-refactor --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/micronaut-projects/micronaut-openapi.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/agent-md-refactor .claude/skills/agent-md-refactor && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
agent-md-refactor
GitHub stars
114
Token cost
~766 tokens
SKILL.md length
303 words
Files
3 (incl. references)
Skills in repo
7
Repo updated
First seen
Licence
Apache-2.0

At a glance

Refactor oversized agent instruction files into a progressive-disclosure structure.

  • Works in 6 steps: Inventory instruction sources… → Detect contradictions and resolve by… → Keep only root-level essentials in the… → …
  • Users ask to split AGENTS.md/CLAUDE.md/COPILOT.md
  • SKILL.md covers Goal, Trigger Examples, Procedure and Inputs, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Agent Md Refactor is an agent skill from micronaut-projects/micronaut-openapi. Refactor oversized agent instruction files into a progressive-disclosure structure. Use when users ask to split AGENTS.md/CLAUDE.md/COPILOT.md, reduce instruction bloat, or organize guidance into linked topic files.

Its SKILL.md is about 770 tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/examples-and-anti-patterns.md` and `references/refactor-playbook.md`). Compatibility notes: Repositories using markdown instruction files such as AGENTS.md, CLAUDE.md, or COPILOT.md

It sits in Agent Workflows, covering Agent instruction files, Refactoring and OpenAPI specifications. It works with OpenAPI. The repository describes itself as: Generates OpenAPI / Swagger Documentation for Micronaut projects. The licence is Apache-2.0.

When your agent uses it

  • Users ask to split AGENTS.md/CLAUDE.md/COPILOT.md
  • Reduce instruction bloat
  • Organize guidance into linked topic files

Example prompts

  • “/agent-md-refactor”

Requirements

  • Compatibility (from SKILL.md): Repositories using markdown instruction files such as AGENTS.md, CLAUDE.md, or COPILOT.md

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Inventory instruction sources (AGENTS.md, CLAUDE.md, COPILOT.md, related guidance docs).
  2. Detect contradictions and resolve by repository precedence.
  3. Keep only root-level essentials in the root instruction file.
  4. Group remaining content into 3-8 linked topic files with clear names.
  5. Remove non-actionable, redundant, and outdated directives.
  6. Validate links, coverage, and consistency before completion.

What it can do on your machine

Read from SKILL.md and the folder at commit 3d2ce62. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Repositories using markdown instruction files such as AGENTS.md, CLAUDE.md, or COPILOT.md

    From compatibility in the SKILL.md frontmatter.

Context cost

Agent Md Refactor loads about 766 tokens when it runs, and up to ~1.6k if it reads all its reference files. Until then it costs about 58 tokens; SKILL.md has 303 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~58
When it runs · the whole SKILL.md, loaded when a task matches
~766
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from micronaut-projects/micronaut-openapi at commit 3d2ce62, republished under its Apache-2.0 licence (© micronaut-projects). 303 words, ~766 tokens.

Download SKILL.mdSave it as .claude/skills/agent-md-refactor/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
agent-md-refactor
description
Refactor oversized agent instruction files into a progressive-disclosure structure. Use when users ask to split AGENTS.md/CLAUDE.md/COPILOT.md, reduce instruction bloat, or organize guidance into linked topic files.
compatibility
Repositories using markdown instruction files such as AGENTS.md, CLAUDE.md, or COPILOT.md
license
Apache-2.0
metadata.author
Álvaro Sánchez-Mariscal
metadata.version
1.0.0

Agent MD Refactor

Refactor monolithic instruction files into a compact root file plus linked topic files. Keep this file focused on execution flow and load detailed templates/examples from references.

Goal

Deliver a maintainable instruction system with:

  • a minimal root instruction file containing only universal guidance,
  • linked topic files for detailed rules,
  • contradictions resolved and vague/redundant rules removed.

Trigger Examples

Should trigger:

  • "Refactor this AGENTS.md to use progressive disclosure."
  • "Split my CLAUDE.md into focused instruction files."
  • "My instruction file is too long, reorganize it."

Should not trigger:

  • "Explain what AGENTS.md is."
  • "Fix one typo in CLAUDE.md."
  • "Write a brand-new coding standard from scratch."

More examples: examples-and-anti-patterns.

Procedure

  1. Inventory instruction sources (AGENTS.md, CLAUDE.md, COPILOT.md, related guidance docs).
  2. Detect contradictions and resolve by repository precedence.
  3. Keep only root-level essentials in the root instruction file.
  4. Group remaining content into 3-8 linked topic files with clear names.
  5. Remove non-actionable, redundant, and outdated directives.
  6. Validate links, coverage, and consistency before completion.

Detailed step playbook: refactor-playbook.

Inputs

  • Root instruction file path(s)
  • Existing repository conventions (commands, toolchain, style)
  • User constraints (must-keep rules, preferred layout)

Outputs

  • Refactored root instruction file (minimal, universal guidance)
  • Topic files with detailed rules
  • List of removed/merged rules with rationale
  • Notes on contradiction handling

Edge Cases

  • If rule precedence is impossible to infer, request one targeted user decision.
  • If multiple files repeat the same rule, keep one canonical source and replace others with links.
  • If the instruction file is already concise, avoid unnecessary splitting.
  • Use relative markdown links for portability.

Validation Checklist

  • Frontmatter is valid YAML and name matches directory.
  • Description states capability and usage triggers.
  • Root file contains only universal instructions.
  • Topic files are self-contained and linked from root.
  • Contradictions are resolved or explicitly called out.
  • Vague/default/redundant directives are removed or rewritten.
  • Relative links resolve.

References

© micronaut-projects, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in .agents/skills/agent-md-refactor of micronaut-projects/micronaut-openapi.

  • SKILL.md
  • references/examples-and-anti-patterns.md
  • references/refactor-playbook.md

Open the folder on GitHubat commit 3d2ce62

Used in 2 other repositories

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders. This page covers the copy in micronaut-projects/micronaut-openapi, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Agent Md Refactor next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Agent Md Refactor compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Agent Md Refactor this skillmicronaut-projects/micronaut-openapi114—~766Automated safety check: PassApache-2.0
Eng Contract Codegen Coshipcompozy/compozy2.8k—~664Automated safety check: PassMIT
API Designaiskillstore/marketplace4301 repos~1.8kAutomated safety check: PassApache-2.0
Tasksgenkovich/sdd171—~4.8kAutomated safety check: PassMIT
MCP Server Builderalirezarezvani/claude-skills28k—~985Automated safety check: PassMIT
CLI MCP DocsChatbotXIO/ChatbotX878—~1.3kAutomated safety check: PassCustom licence

Similar skills

  • Contract co-ship for Compozy wire changes. An agent skill from compozy/compozy.

    2.8k GitHub stars~664 tokensUpdated today
    Backend & APIsAuto-check passed
  • API Design

    aiskillstore/marketplace

    Design RESTful and GraphQL APIs following best practices. An agent skill from aiskillstore/marketplace.

    430 GitHub starsUsed in 1 repo~1.8k tokens
    Backend & APIsAuto-check passed
  • Tasks

    genkovich/sdd

    A skill your agent uses to break a designed feature into atomic, ≤1-day tasks with a dependency graph, a per-task Definition of Done, and a machine-readable tasks.json that the implement engine…

    171 GitHub stars~4.8k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • MCP Server Builder

    alirezarezvani/claude-skills

    Design and ship production-ready MCP (Model Context Protocol) servers from OpenAPI contracts instead of hand-written tool wrappers.

    28k GitHub stars~985 tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • CLI MCP Docs

    ChatbotXIO/ChatbotX

    Use after adding, renaming, or removing a public oRPC procedure, or after changing an operation's MCP visibility.

    878 GitHub stars~1.3k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • MCP Server Builder

    borghei/Claude-Skills

    Build MCP (Model Context Protocol) servers with tool definitions, resource providers, prompt templates, and transports.

    874 GitHub stars~1.9k tokensUpdated today
    Agent WorkflowsAuto-check passed

More from micronaut-projects/micronaut-openapi

  • Docs

    micronaut-projects/micronaut-openapi

    Write and maintain Micronaut Framework module guides for micronaut-projects repositories.

    114 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Gradle

    micronaut-projects/micronaut-openapi

    Execute Gradle maintainer operations for Micronaut repositories using micronaut-build internals and modern Gradle best practices.

    114 GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Guides

    micronaut-projects/micronaut-openapi

    Create or update standalone Micronaut Guides in micronaut-projects/micronaut-guides, including topic discovery, guide authoring, validation, PDF export, and pull request handoff.

    114 GitHub stars~1.9k tokensUpdated today
    Auto-check: notes
  • Skill Creator

    micronaut-projects/micronaut-openapi

    Create new Agent Skills or improve existing ones in an agent-agnostic way.

    114 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Coding

    micronaut-projects/micronaut-openapi

    Implement and review Java code changes for Micronaut framework repositories using maintainer standards, including JSpecify null-safety conventions.

    114 GitHub stars~2.6k tokensUpdated today
    Auto-check passed
  • Micronaut Sourcegen

    micronaut-projects/micronaut-openapi

    Add, integrate, or review Micronaut Sourcegen usage in modules that generate Java source, Kotlin source, Groovy-compatible source, or bytecode from ObjectDef, TypeDef, MethodDef, ExpressionDef…

    114 GitHub stars~3.3k tokensUpdated today
    Auto-check passed

Works with

Questions about Agent Md Refactor

What does Agent Md Refactor do?

Refactor oversized agent instruction files into a progressive-disclosure structure. Agent Md Refactor is an agent skill from micronaut-projects/micronaut-openapi. Refactor oversized agent instruction files into a progressive-disclosure structure.

When should I use Agent Md Refactor?

Agent Md Refactor fits situations like: users ask to split AGENTS.md/CLAUDE.md/COPILOT.md; reduce instruction bloat; organize guidance into linked topic files.

How do I install Agent Md Refactor in Claude Code?

Run `npx skills add micronaut-projects/micronaut-openapi --skill agent-md-refactor -a claude-code`. Or copy the skill folder (.agents/skills/agent-md-refactor in micronaut-projects/micronaut-openapi) into .claude/skills/agent-md-refactor in your project. Claude Code loads it when a task matches its description.

How do I install Agent Md Refactor in Codex?

Run `npx skills add micronaut-projects/micronaut-openapi --skill agent-md-refactor -a codex`. Or copy the skill folder (.agents/skills/agent-md-refactor in micronaut-projects/micronaut-openapi) into .agents/skills/agent-md-refactor in your project. Codex loads it when a task matches its description.

Can I use Agent Md Refactor in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add micronaut-projects/micronaut-openapi --skill agent-md-refactor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agent-md-refactor, .gemini/skills/agent-md-refactor, .github/skills/agent-md-refactor and .opencode/skills/agent-md-refactor in your project.

What does Agent Md Refactor need to run?

SKILL.md names no scripts, command-line tools or credentials: Agent Md Refactor is instructions for the agent only. Compatibility (from SKILL.md): Repositories using markdown instruction files such as AGENTS.md, CLAUDE.md, or COPILOT.md.

Does Agent Md Refactor access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Agent Md Refactor safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Agent Md Refactor use?

Agent Md Refactor is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Agent Md Refactor use?

About 766 tokens (SKILL.md is roughly 3.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 787 tokens, read only when the agent opens those files.

What are the alternatives to Agent Md Refactor?

Skills that share tags, products or a category with Agent Md Refactor: Eng Contract Codegen Coship (compozy/compozy, 2.8k stars), API Design (aiskillstore/marketplace, 430 stars), Tasks (genkovich/sdd, 171 stars) and MCP Server Builder (alirezarezvani/claude-skills, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Agent Md Refactor?

micronaut-projects (a GitHub organization) maintains it in micronaut-projects/micronaut-openapi, which has 114 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 7, 2026.

Source: micronaut-projects/micronaut-openapi on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.