skill-refactoring

Refactor bloated skill.md files by moving detailed content into references/.

5|1|Updated Dec 22, 2025
One-click install
npx skills add https://github.com/buddyh/agent-skills --skill skill-refactoring
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: skill-refactoring
Source: https://github.com/buddyh/agent-skills/tree/main/skill-refactoring
Command: npx skills add https://github.com/buddyh/agent-skills --skill skill-refactoring

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Refactor bloated skill.md files by moving detailed content into references/ while keeping the top-level skill.md concise and discoverable.

Core Features & Use Cases

  • Progressive disclosure: shift detailed content to references/ while preserving navigation from skill.md.
  • Loading strategy: specify when to read each reference file to minimize context for Claude.
  • Maintainability: keep skill.md under 500 lines and preserve original content in references/ for retrieval.

Quick Start

Start by identifying a large skill.md, create a references/ folder, and move non-essential content into focused reference files.

Frequently Asked Questions about skill-refactoring

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor a bloated skill.md file to improve loading strategy?

Refactor a bloated skill.md by moving detailed content into focused reference files like methodology.md or templates.md, keeping the top-level file concise and updating loading guidance for progressive disclosure.

What is progressive disclosure for documentation and when should I use it?

Progressive disclosure shifts detailed documentation into separate reference files, minimizing context loading by specifying when to read each file. Use it when a top-level file exceeds 500 lines and overwhelms the reader.

How do I split a large markdown file into references without losing information?

Split a large markdown file by creating a references folder, moving non-essential content into focused files, and updating the top-level file to guide retrieval. All original information is preserved without creating extraneous files.

Does this refactoring approach work with both Claude Code and Codex?

Yes, this refactoring approach ensures the structured references support progressive loading for both Claude Code and Codex, allowing each environment to read specific files only when needed.

What is the best way to organize references in a skill directory?

Organize references by creating a small, focused set of files such as best-practices.md, templates.md, and methodology.md, then update the top-level file to direct Claude on exactly when to read each reference.

When should I not use progressive disclosure for documentation?

Avoid progressive disclosure if the top-level markdown file is already concise and under 500 lines, as splitting minimal content into separate reference files adds unnecessary navigation overhead without context benefits.