Regenerate docs/INDEX.md table of contents from directory tree
Scanned 2/12/2026
Install via CLI
openskills install gitwalter/cursor-agent-factory---
name: auto-doc-index
description: Regenerate docs/INDEX.md table of contents from directory tree
type: skill
category: documentation
agents: [doc-maintainer]
knowledge: []
mcp_servers: [filesystem]
axioms: [A1, A3]
---
# Auto-Doc Index
## Purpose
Scan `docs/` directory tree and regenerate `docs/INDEX.md` with categorized table of contents linking to all documentation files. Provides comprehensive navigation structure for the documentation.
## When to Use
- After adding new documentation files
- After removing or moving documentation files
- After reorganizing documentation structure
- When INDEX.md becomes outdated or incomplete
- As part of regular documentation maintenance
## Prerequisites
- Python 3.10+ installed
- Access to `docs/` directory tree
- Write access to `docs/INDEX.md`
## Process
1. **Scan docs directory**: Recursively traverse `docs/` directory tree
2. **Identify markdown files**: Collect all `.md` files with their relative paths
3. **Extract metadata**: Read frontmatter or first heading for file descriptions
4. **Categorize files**: Group files by directory structure and category
5. **Generate TOC**: Create hierarchical table of contents with section headers, nested lists, links, and brief descriptions
6. **Write INDEX.md**: Update or create `docs/INDEX.md` with generated TOC
## Example Usage
```bash
# Regenerate INDEX.md
python scripts/tools/doc-maintainer.py --index
# Preview changes before updating
python scripts/tools/doc-maintainer.py --index --dry-run
# Regenerate with custom categories
python scripts/tools/doc-maintainer.py --index --categories guides,reference,examples
```
## Output
- Updated `docs/INDEX.md` with complete table of contents
- Hierarchical structure matching directory organization
- Links to all documentation files
- Category groupings for easy navigation
## Best Practices
- Run after any documentation file addition, removal, or reorganization
- Use `--dry-run` to preview changes before committing
- Verify all generated links resolve to existing files
- Keep INDEX.md as the single navigation entry point for documentation
No comments yet. Be the first to comment!
Create Mermaid diagrams for flowcharts, sequences, ERDs, and
Draft release notes and changelog entries from git history or merged PRs between two refs (tags/SHAs/branches), including breaking changes, migrations, and upgrade steps. Use when the user asks for release notes, changelog updates, or a GitHub Release draft.
Explain how claude-mem captures observations, when memory injection kicks in, and where data lives. Use when the user asks "how does claude-mem work?" or "what is this thing doing?".
Review a pull request or contribution deeply, explain it tutorial-style for a maintainer, and produce a polished report artifact such as HTML or Markdown. Use when asked to analyze a PR, explain a contributor's design decisions, compare it with similar systems, or prepare a merge recommendation.
Generate the stable Paperclip release changelog at releases/vYYYY.MDD.P.md by reading commits, changesets, and merged PR context since the last stable tag.