skills/emasoft/markdown-toc/SKILL.md
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".
npx skillsauth add aiskillstore/marketplace markdown-tocInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A universal TOC generator that works with any markdown file. Supports batch processing, configurable header levels, and smart insertion.
# 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.
| 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 |
Smart detection in this order:
## Table of Contents section--- separator (common README pattern)python scripts/generate_toc.py README.md
Insert at top of file, respecting YAML frontmatter:
python scripts/generate_toc.py --insert top README.md
Insert/replace between marker pairs:
python scripts/generate_toc.py --insert marker README.md
In your markdown file:
<!-- TOC -->
(TOC will be inserted/updated here)
<!-- /TOC -->
Custom markers:
python scripts/generate_toc.py --insert marker --marker "<!-- INDEX -->" README.md
Include only H2-H3 (default):
python scripts/generate_toc.py README.md
Include H1-H4:
python scripts/generate_toc.py --min-level 1 --max-level 4 README.md
Include only H2:
python scripts/generate_toc.py --min-level 2 --max-level 2 README.md
# All .md in current directory
python scripts/generate_toc.py *.md
# All .md in docs/
python scripts/generate_toc.py docs/*.md
# Specific pattern
python scripts/generate_toc.py docs/guide-*.md
# All .md files recursively
python scripts/generate_toc.py --recursive .
# Recursive in specific directory
python scripts/generate_toc.py --recursive docs/
python scripts/generate_toc.py README.md CONTRIBUTING.md docs/
## Table of Contents
- [Installation](#installation)
- [Usage](#usage)
- [Basic Usage](#basic-usage)
- [Advanced Usage](#advanced-usage)
- [Contributing](#contributing)
python scripts/generate_toc.py --no-title README.md
- [Installation](#installation)
- [Usage](#usage)
- [Basic Usage](#basic-usage)
python scripts/generate_toc.py --title "Contents" README.md
## Contents
- [Installation](#installation)
GitHub-compatible anchors:
**bold**, `code`)| Header | Anchor |
|--------|--------|
| ## Getting Started | #getting-started |
| ## **Bold** Header | #bold-header |
| ## Header with code`` | #header-with-code |
| ## Header #1 | #header-1 |
The script automatically skips:
--- markers)Always preview first with --dry-run:
python scripts/generate_toc.py --dry-run README.md
Output:
[INFO] Found 1 markdown file(s)
============================================================
File: README.md
============================================================
## Table of Contents
- [Installation](#installation)
- [Usage](#usage)
...
Found 15 headers (levels 2-3)
python scripts/generate_toc.py --recursive --dry-run .
# Review output, then:
python scripts/generate_toc.py --recursive .
# Add markers to files, then:
python scripts/generate_toc.py --insert marker --recursive docs/
# Deep TOC for main README
python scripts/generate_toc.py --max-level 4 README.md
# Shallow TOC for guides
python scripts/generate_toc.py --max-level 2 docs/guides/*.md
File may only have H1 headers. Use --min-level 1.
Use --insert marker with explicit markers for precise control.
Check for duplicate headers (GitHub appends -1, -2, etc.).
This script is fully portable:
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.