mdtoc

Generate and update GitHub-style tables of contents in Markdown files.

2|1|Updated Aug 23, 2025
One-click install
npx skills add https://github.com/neozenith/agentic-dotfiles --skill mdtoc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mdtoc
Source: https://github.com/neozenith/agentic-dotfiles/tree/main/skills/mdtoc
Command: npx skills add https://github.com/neozenith/agentic-dotfiles --skill mdtoc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Manages and maintains accurate table of contents for Markdown files, streamlining the process of navigating and referencing document sections.

Core Features & Use Cases

  • Automatically Generate TOC: Adds or updates a table of contents based on the document's header structure.
  • GitHub Style TOC: Follows GitHub-style TOC with configurable header levels.
  • Configurable Header Levels: Customize the depth of the TOC headers.

Quick Start

Run 'mdtoc --in-place --no-list-coherence github --header-levels 4 <markdown-file>'

Frequently Asked Questions about mdtoc

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

FAQPage Schema
How do I automatically generate a table of contents for a Markdown file?

You can automatically generate a Markdown table of contents by running a script that parses header structures and updates the document in place for easy navigation.

Can I customize header levels in a GitHub-style Markdown TOC?

Yes, you can configure header levels in a GitHub-style Markdown TOC, allowing you to set the specific depth of headers included in the generated table of contents.

What is the best way to update existing tables of contents in Markdown documentation?

The best way to update tables of contents in Markdown documentation is using an automated tool that re-parses header structures and applies changes in place to maintain list coherence.

Does the Markdown TOC generator work without external dependencies?

Yes, the Markdown TOC generator runs as a standalone script without requiring external dependencies, streamlining the process of managing document references.

How do I ensure list coherence when updating a Markdown table of contents?

To ensure list coherence when updating a Markdown table of contents, use specific script flags that enforce structural consistency across the configured header levels during generation.