mcpbeat Sign in

Markdown Document Structurer Skill for Claude

Reorganizes markdown documents into well-structured, consistent format while preserving content and improving readability. Use when Claude needs to: (1) Fix heading hierarchy issues (skipped levels, multiple h1s), (2) Generate or update table of contents, (3) Standardize formatting (lists, code blocks, emphasis, links), (4) Improve grammar and spelling, (5) Add missing standard sections (installation, usage, etc.), (6) Remove redundant or duplicate content, (7) Restructure technical docs, READMEs, or long-form content for better organization and flow.

6k tokens
context cost
the whole folder, loaded on every use
4
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
141
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/ArabelaTso/Skills-4-SE --skill markdown-document-structurer

The instruction itself

42 sections, as written by the author

Markdown Document Structurer

Reorganize and improve markdown documents while preserving content integrity.

Workflow

1. Analyze Current Structure

Automated analysis:

python scripts/analyze_structure.py <markdown_file>

Manual analysis:

  • Read the document to understand content and purpose
  • Identify document type (README, technical doc, tutorial, article)
  • Note structural issues and inconsistencies

2. Identify Issues

Check for:

Heading Hierarchy:

  • Multiple h1 headings
  • Skipped heading levels (h1 → h3)
  • Inconsistent heading progression

Table of Contents:

  • Missing TOC when document has 3+ main sections
  • Outdated TOC that doesn't match current structure
  • Incorrect anchor links

Formatting Consistency:

  • Mixed list markers (-, *, +)
  • Code blocks without language specification
  • Inconsistent emphasis styles (** vs __, * vs _)
  • Inconsistent link formats

Content Issues:

  • Missing standard sections for document type
  • Duplicate or redundant sections
  • Poor section organization
  • Grammar and spelling errors

3. Plan Restructuring

Determine:

  • Target document structure based on type (see document-patterns.md)
  • Which sections to add, merge, or reorganize
  • Formatting standards to apply (see markdown-best-practices.md)
  • Content improvements needed

4. Apply Restructuring

Follow this order:

Step 1: Fix Heading Hierarchy

  • Ensure single h1 for document title
  • Fix skipped levels
  • Maintain logical progression

Step 2: Reorganize Sections

  • Reorder sections for logical flow
  • Merge duplicate sections
  • Add missing standard sections
  • Remove redundant content

Step 3: Generate/Update TOC

  • Create TOC if document has 3+ sections
  • Update existing TOC to match structure
  • Ensure anchor links are correct

Step 4: Standardize Formatting

  • Use - for unordered lists
  • Specify language for code blocks
  • Use bold and *italic* consistently
  • Standardize link formats
  • Fix spacing and blank lines

Step 5: Improve Content

  • Fix grammar and spelling
  • Improve clarity where needed
  • Preserve all original information
  • Maintain author's voice and style

5. Verify Results

Check:

  • All content preserved
  • Heading hierarchy correct
  • TOC matches structure
  • Formatting consistent
  • No broken links
  • Grammar improved
  • Document flows logically

Document Type Guidelines

README Files

Standard structure:

  • Title and brief description
  • Table of contents (if 3+ sections)
  • Features/highlights
  • Installation
  • Usage examples
  • Configuration
  • Contributing
  • License

Required sections:

  • Installation instructions
  • Basic usage example
  • License information

See document-patterns.md for detailed README patterns.

Technical Documentation

Standard structure:

  • Title
  • Overview
  • Table of contents
  • Prerequisites
  • Installation/setup
  • Basic usage
  • Advanced usage
  • API reference (if applicable)
  • Examples

10. Troubleshooting

11. Additional resources

Required sections:

  • Prerequisites
  • Installation/setup
  • Basic usage examples

Long-Form Content (Articles, Tutorials)

Standard structure:

  • Title
  • Introduction/hook
  • Table of contents
  • Main content sections
  • Conclusion
  • References/resources

For tutorials specifically:

  • Prerequisites section
  • Step-by-step structure
  • Verification/testing steps
  • Next steps

Formatting Standards

Headings

  • Single h1 (#) for title
  • Sequential levels (no skipping)
  • One blank line before and after

Lists

  • Use - for unordered lists
  • Proper indentation (2 or 4 spaces)
  • One blank line before and after

Code Blocks

  • Always specify language: `python
  • One blank line before and after

Emphasis

  • Use bold for strong emphasis
  • Use *italic* for emphasis
  • Avoid mixing styles
  • Use inline format: text
  • Use reference format for repeated links

Spacing

  • One blank line between sections
  • No trailing whitespace
  • Consistent blank line usage

See markdown-best-practices.md for complete formatting guidelines.

Content Preservation Rules

Always preserve:

  • All factual information
  • Code examples
  • Technical details
  • Links and references
  • Author's key points

Safe to modify:

  • Grammar and spelling
  • Sentence structure for clarity
  • Section organization
  • Formatting consistency

Never:

  • Remove content without user approval
  • Change technical accuracy
  • Alter code examples (except formatting)
  • Modify links or URLs

Handling Redundancy

Identifying Duplicates

  • Same section headings
  • Repeated installation instructions
  • Duplicate code examples
  • Overlapping explanations

Consolidation Strategy

  • Identify all duplicate content
  • Keep the most complete version
  • Merge complementary information
  • Add cross-references if needed
  • Remove redundant sections

Example

Before:

## Installation
npm install package

## Installing the Package
Run npm install package

## Setup
Install with npm install package

After:

## Installation

Install the package using npm:

npm install package

Adding Missing Sections

Detection

Check document type and identify missing standard sections:

  • README: Installation, Usage, License
  • Technical docs: Prerequisites, Examples, Troubleshooting
  • Tutorials: Prerequisites, Verification steps, Next steps

Adding Sections

  • Determine appropriate location in document flow
  • Add section with appropriate heading level
  • Include placeholder content or note that section needs completion
  • Inform user about added sections

Example

## Installation

*Installation instructions to be added*

## Usage

*Usage examples to be added*

Table of Contents Generation

When to Generate

  • Document has 3+ main sections (h2)
  • Technical documentation
  • Long-form content (>500 lines)

Placement

  • After title and description
  • Before main content
  • Use h2: ## Table of Contents

Format

## Table of Contents
- [Section 1](#section-1)
- [Section 2](#section-2)
  - [Subsection 2.1](#subsection-21)
  - [Subsection 2.2](#subsection-22)
- [Section 3](#section-3)

Anchor Generation

  • Lowercase all text
  • Replace spaces with hyphens
  • Remove special characters except hyphens
  • Example: "API Reference Guide" → #api-reference-guide

Grammar and Spelling

Approach

  • Fix obvious errors
  • Improve clarity without changing meaning
  • Maintain author's voice and style
  • Preserve technical terminology

Common Fixes

  • Subject-verb agreement
  • Tense consistency
  • Article usage (a, an, the)
  • Common spelling errors
  • Punctuation

Caution

  • Don't change technical terms
  • Preserve code-related text exactly
  • Keep domain-specific language
  • Maintain intentional informal tone

Output Format

After restructuring, provide:

  • Summary of changes:
  • Structural improvements
  • Sections added/removed/merged
  • Formatting fixes
  • Content improvements
  • Restructured document:
  • Complete markdown with all changes applied
  • Notes:
  • Any sections needing user input
  • Recommendations for further improvement
  • Warnings about significant changes

Best Practices

Analysis

  • Understand document purpose before restructuring
  • Identify document type to apply appropriate structure
  • Use automated analysis script for quick assessment
  • Note all issues before making changes

Restructuring

  • Make one type of change at a time
  • Preserve all content unless clearly redundant
  • Maintain logical flow and readability
  • Follow established patterns for document type

Quality

  • Verify all links work
  • Ensure TOC matches structure
  • Check heading hierarchy
  • Confirm formatting consistency
  • Test code blocks if possible

Communication

  • Explain significant structural changes
  • Highlight added or removed sections
  • Note any content needing user input
  • Provide rationale for major reorganization

Other skills for the same job

different authors, same section of the catalogue
DOCX
by anthropics
vendor ×16

Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks

7k tokens
PDF
by anthropics
vendor ×16

Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.

13k tokens scripts
PPTX
by JayZeeDesign
×15

Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks

308k tokens scripts
Canvas Design
by anthropics
vendor ×13

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

1388k tokens
PDF
by anthropics
vendor ×10

Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.

15k tokens scripts
DOCX
by w95
×6

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.

5k tokens
PPTX
by w95
×4

Use this skill any time a .pptx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates, layouts, speaker notes, or comments. Trigger whenever the user mentions \"deck,\" \"slides,\" \"presentation,\" or references a .pptx filename, regardless of what they plan to do with the content afterward. If a .pptx file needs to be opened, created, or touched, use this skill.

2k tokens
Obsidian Markdown
by ZhanlinCui
×3

Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax. Use when working with .md files in Obsidian, or when the user mentions wikilinks, callouts, frontmatter, tags, embeds, or Obsidian notes.

3k tokens

How to use it

Copy the folder

Take arabelatso/markdown-document-structurer from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.

Install what it needs

The instructions reference npm. Without those the skill loads but fails at the first command.