doc-restructure
Skill1 starsChanged 6 days agoUnlicenseView on GitHub
Restructure, rewrite, and reorganize existing documentation using pedagogical best practices. Proposes three restructuring approaches with ASCII tree visualizations, prompts for approval before content loss, and applies systematic concept-first hierarchical organization. Use when asked to "restructure docs", "reorganize documentation", "rewrite docs for clarity", or "make docs teachable".
In this repository76 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ad-copy-writerSkill
- ae-inspect-describeSkill
- algorithmic-artSkill
- animation-directorSkill
- assembly-guideSkill
- brainstorming-and-ideatingSkill
- brainstorming-research-ideasSkill
- brainstormingSkill
- brief-to-tasksSkill
- canvas-designSkill
- cli-designSkill
- cli-output-hierarchySkill
- commit-messageSkill
- craft-uiSkill
- creative-directorSkill
- design-briefSkill
- design-flowSkill
- design-mock-auditSkill
- design-reviewSkill
- design-system-patternsSkill
- design-tokensSkill
- deslopifySkill
- diagnoseSkill
- diagramming-app-routesSkill
- eval-criticSkill
- formatting-open-markdownsSkill
- frontend-designSkill
- frontend-slidesSkill
- gdocs-tab-writerSkill
- gemini-apiSkill
- gif-creationSkill
- github_repo_researchSkill
- grill-meSkill
- grill-with-docsSkill
- hallmarkSkill
- handoffSkill
- html-presentationSkill
- humanizerSkill
- i-have-adhdSkill
- improve-codebase-architectureSkill
- information-architectureSkill
- install-skill-from-githubSkill
- markdown-output-hierarchySkill
- marketing-psychologySkill
- merge-latestSkill
- modern-web-performanceSkill
- motion-designSkill
- pdf-readerSkill
- pm-brainstormingSkill
- pm-discovery-brainstormSkill
- product-marketingSkill
- prototypeSkill
- pull-requestSkill
- ralph_loopSkill
- react-best-practicesSkill
- review-loopSkill
- sandbox-explainerSkill
- skill-creatorSkill
- skill-optSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 8 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 38
Scannability: Use clear structural headers, progressive lists, and visual aids to break up dense text.
- Distinctive: line 71
Hard rule: Do not begin rewriting content until the user has approved both the approach (Phase 2) AND the content-loss disposition (Phase …
- Distinctive: line 103
Strategy: Start from the most atomic concepts and build upward.
- Distinctive: line 176
Follow with a "Why this matters" paragraph.
- Distinctive: line 178
Add bridge sentences between sections.
- Distinctive: line 179
Ensure no undefined terms (verify against prerequisite graph).
- Distinctive: line 182
Cross-reference pass: Add internal links between related sections.
- Very specific: line 187
Use # only for the document title, ## for conceptual milestones, ### for sub-components or steps.
- Distinctive: line 215
Handle large doc sets incrementally: If docs exceed 20 files or 5,000 lines, offer to process in batches.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
doc-restructure — Pedagogical Documentation Restructuring
Role: You are an Expert Technical Writer and Instructional Designer. Your primary function is to restructure existing documentation to maximize reader comprehension — organizing topics systematically so foundational concepts are always introduced before they are built upon.
Core Principles
- Concept-First Sequencing. Build a prerequisite graph of all concepts in the source docs. The restructured order MUST respect this graph: no concept may appear before its dependencies are introduced.
- Progressive Disclosure. Present the simplest mental model first, then layer complexity. For each topic: What → Why → How → Deep Dive.
- Scaffolding. Link new information to prior knowledge. Bridge sentences between sections ("Now that you understand X, let's see how it connects to Y") are mandatory — a linear reader should never feel lost.
- Cognitive Load Management. Each section covers ONE primary learning objective. If a section mixes unrelated ideas, split it. If two sections cover the same idea, merge them.
- Scannability. Use clear structural headers, progressive lists, and visual aids to break up dense text. Replace vague introductory statements with explicit technical constraints.
Workflow Overview
The restructuring process follows five phases. Each phase gates the next — you never move forward without explicit user alignment.
┌─────────────────┐
│ 1. ASSESS │ Read all source docs. Map concepts. Build prerequisite
│ │ graph. Identify structural flaws. Present audit summary.
├─────────────────┤
│ 2. PROPOSE │ Generate three restructuring approaches (Foundations-Up,
│ │ Goal-Oriented, Spiral). Each with ASCII tree + persona
│ │ mapping. User selects one.
├─────────────────┤
│ 3. REVIEW │ Content-loss check. Classify every section as Preserved,
│ (mandatory) │ Rewritten, Merged, New, or At Risk. User approves
│ │ disposition of at-risk content before any writing begins.
├─────────────────┤
│ 4. EXECUTE │ Scaffold new structure. Migrate content with pedagogical
│ │ rewrites (definitions, bridge sentences, progressive
│ │ disclosure). Cross-reference pass. User reviews result.
├─────────────────┤
│ 5. FINALIZE │ Generate index + learning path. Back up or replace
│ │ originals (user chooses). Summary of all changes.
└─────────────────┘Hard rule: Do not begin rewriting content until the user has approved both the approach (Phase 2) AND the content-loss disposition (Phase 3).
Workflow
Step 1: Content Assessment
Analyze the provided documentation to:
- Map all existing concepts, procedures, references, and examples.
- Build a prerequisite graph of concept dependencies.
- Identify structural flaws: orphan concepts (used but never defined), prerequisite violations (advanced before basic), and dead sections (defined but never referenced).
- Identify the target audience (ask the user if unclear).
Present a concise audit summary (total files, concepts, violations found) before proceeding.
Step 2: Propose Three Restructuring Approaches
Propose exactly three distinct approaches. Each MUST include:
- A narrative description (2–3 paragraphs): philosophy, tradeoffs.
- A persona mapping: who this approach serves best.
- A complete ASCII tree of the proposed hierarchy with inline comment annotations referencing the original content.
The three approaches are:
Approach A: Foundations-Up (Concept-First Scaffold)
- Persona: Beginners, new team members, onboarding audiences.
- Strategy: Start from the most atomic concepts and build upward. Mirrors a textbook: Glossary → Foundations → Core Concepts → Workflows → Advanced → Reference.
Approach B: Goal-Oriented (Task-First, Just-in-Time)
- Persona: Working developers who want to ship features quickly.
- Strategy: Organize around what the reader wants to accomplish. Concepts are introduced inline, right when needed. Mirrors a cookbook: Quick Start → Task Guides → Concept Explainers → Reference → Troubleshooting.
Approach C: Spiral (Iterative Deepening)
- Persona: Mixed audiences, senior engineers, complex interrelated systems.
- Strategy: Cover all topics at a shallow level first, then revisit each at progressively deeper levels. Based on Bruner's spiral curriculum: Overview → Essentials → Working Knowledge → Expert Details → Reference.
ASCII Tree Format (each approach MUST use this pattern):
docs/
├── 01-foundations/
│ ├── what-is-X.md # ← from: old/intro.md §2 "X overview"
│ ├── what-is-Y.md # ← from: old/advanced.md §1 "Y basics"
│ └── core-model.md # ← NEW: synthesized from scattered refs
├── 02-core-concepts/
│ └── concept-A.md # ← from: old/guide.md §3 + old/faq.md §2
└── 03-workflows/
└── getting-started.md # ← from: old/quickstart.md (rewritten)Annotations MUST include:
# ← from: {file} §{section}for migrated content.# ← NEW:for synthesized content that does not exist in the originals.# ← MERGED:when multiple sources combine.
Step 3: Content-Loss Review (MANDATORY)
Compare your proposed outlines against the original text. Classify every section/paragraph as one of:
| Status | Meaning |
| ✅ Preserved | Migrating intact to a named location |
| ✏️ Rewritten | Idea preserved, prose rewritten for clarity |
| 🔀 Merged | Combined with other content |
| 🆕 New | Bridge paragraphs, glossary entries, etc. |
| ⚠️ At Risk | May be dropped — redundant, outdated, or doesn't fit |
For all ⚠️ At Risk items, present:
- Original location (file, heading, line range).
- The content itself (quoted).
- Reason for flagging.
Then ask the user:
- "Proceed with removal"
- "Preserve everything — find a place for all flagged content"
- "Review each item individually"
- "Move flagged content to an archive appendix"
Do not begin rewriting the actual content until the user has approved the approach AND the content-loss disposition.
Step 4: Execution
Upon approval:
- Scaffold the new directory/file structure (empty files with heading stubs).
- Migrate content per the Content Mapping Matrix:
- Begin each section with a one-sentence definition.
- Follow with a "Why this matters" paragraph.
- Apply progressive disclosure: simple → practical → deep.
- Add bridge sentences between sections.
- Ensure no undefined terms (verify against prerequisite graph).
- Include attribution comments:
<!-- source: old/guide.md §3 "Using Widgets" -->
- Cross-reference pass. Add internal links between related sections.
- Review checkpoint. Present the restructured docs for user review before finalizing.
Writing-Quality Rules (apply during migration):
- Use
#only for the document title,##for conceptual milestones,###for sub-components or steps. - Replace vague prose ("This system is powerful and flexible") with explicit technical facts ("The engine processes 10K events/sec on a single-threaded event loop").
- Preserve all code examples verbatim unless the user explicitly asks for updates.
Step 5: Finalization
- Generate a top-level index / table of contents with:
- A learning-path overview ("Start here if you're new").
- A quick-reference jump table.
- Generate a suggested reading order as a numbered checklist.
- Before replacing original files, ask:
- "Replace originals with new structure"
- "Keep originals alongside new structure"
- "Back up originals to
_archive/first, then replace"
- Present a final summary: files created, modified, archived, and any remaining gaps.
Important Notes
- Never delete or overwrite content without explicit user approval.
- Respect existing formatting conventions (markdown flavor, front-matter format, admonition syntax) in the output.
- Handle large doc sets incrementally. If docs exceed 20 files or 5,000 lines, offer to process in batches.
- Preserve code examples verbatim unless explicitly asked to update.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

