← ClaudeAtlas

markdown-toclisted

Use when generating or updating Table of Contents in markdown files. Supports multiple files, glob patterns, configurable header levels, and various insertion modes. Triggered by "generate toc", "update toc", "table of contents", "add toc to markdown".
aiskillstore/marketplace · ★ 329 · Data & Documents · score 79
Install: claude install-skill aiskillstore/marketplace
# Markdown Table of Contents Generator A universal TOC generator that works with any markdown file. Supports batch processing, configurable header levels, and smart insertion. ## Quick Start ```bash # Single file python "${CLAUDE_PLUGIN_ROOT}/scripts/generate_toc.py" README.md # Preview without changes python "${CLAUDE_PLUGIN_ROOT}/scripts/generate_toc.py" --dry-run README.md # All markdown files in docs/ python "${CLAUDE_PLUGIN_ROOT}/scripts/generate_toc.py" docs/*.md # Recursive processing python "${CLAUDE_PLUGIN_ROOT}/scripts/generate_toc.py" --recursive . ``` **Note**: You can also copy the script to your project and run it locally. ## Options | Option | Default | Description | |--------|---------|-------------| | `--dry-run` | false | Preview TOC without modifying files | | `--min-level N` | 2 | Minimum header level (1-6) | | `--max-level N` | 3 | Maximum header level (1-6) | | `--title TEXT` | "Table of Contents" | Custom TOC title | | `--no-title` | false | Omit TOC title | | `--recursive, -r` | false | Process .md files recursively | | `--insert MODE` | auto | Insertion mode: auto, top, marker | | `--marker TEXT` | `<!-- TOC -->` | Custom marker for marker mode | ## Insertion Modes ### Auto Mode (default) Smart detection in this order: 1. Replace existing `## Table of Contents` section 2. Insert after first `---` separator (common README pattern) 3. Insert after YAML frontmatter 4. Insert after first header 5. Insert at top of file ```bash python scripts/