doc-refactor

Refactor documents by simplifying content and converting flows into sequenceDiagrams.

189|25|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/sd0xdev/sd0x-harness --skill doc-refactor-sd0xdev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: doc-refactor
Source: https://github.com/sd0xdev/sd0x-harness/tree/main/skills/doc-refactor
Command: npx skills add https://github.com/sd0xdev/sd0x-harness --skill doc-refactor-sd0xdev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Long, redundant documents like CLAUDE.md, rules files, and agent definitions become hard to maintain and consume excessive context. This Skill condenses them without losing key information. ## Core Features & Use Cases - Information-preserving simplification: Analyzes a document, separates core information from redundancy, and reduces line count while keeping key content intact. - Structural conversion: Turns long paragraphs into tables and step-by-step flows into Mermaid sequenceDiagrams, merging duplicates into a single source. - Use Case: Your CLAUDE.md has grown to 200 lines of repetitive instructions. Run the refactor to shrink it below the 50-line target while preserving every rule. ## Quick Start Ask the agent to refactor the document at a given path, for example: refactor and simplify my CLAUDE.md file without losing any information.

Frequently Asked Questions about doc-refactor

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

FAQPage Schema
How do I simplify a long Markdown document without losing information?▼

Dispatch the doc-refactor agent with the file path. It analyzes the original content, separates core information from redundancy, converts paragraphs to tables and steps to sequenceDiagrams, then validates that key information is preserved and line count is reduced.

How to condense a CLAUDE.md file that is too long?▼

Run the doc-refactor skill on the CLAUDE.md file. It targets under 50 lines for CLAUDE.md by merging duplicates into a single source and restructuring verbose sections into tables or diagrams.

When should I not use document refactoring?▼

Do not use it for code refactoring, which belongs to /simplify or /refactor, for review-only passes, which belong to /codex-review-doc, or for writing new documents, which belong to /tech-spec or /create-request.

What are the line count targets for refactored documents?▼

The simplification standards target under 50 lines for CLAUDE.md, under 30 lines for rules/*.md files, and under 50 lines for agents/*.md files.

Does document refactoring preserve all original information?▼

Yes, validation is a built-in step. After refactoring, the skill checks that key information is preserved and reports the original versus simplified line counts plus a summary of changes.