Claude-skill-registry doc-index-update

Maintain table of contents and index files across documentation. Use when adding, removing, or renaming documentation files.

install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/doc-index-update" ~/.claude/skills/majiayu000-claude-skill-registry-doc-index-update && rm -rf "$T"
manifest: skills/data/doc-index-update/SKILL.md
source content

Documentation Index Update Skill

Purpose: Maintain table of contents and index files across documentation. Auto-updates when docs are added, removed, or renamed.

Trigger

When: Any documentation file is created, deleted, or renamed Context Needed: Changed file path, action type, existing index MCP Tools:

list_dir
,
read_file
,
replace_string_in_file

Index Files

DirectoryIndex FilePurpose
docs/
README.mdMain documentation hub
docs/technical/architecture/
README.mdArchitecture overview
docs/technical/backend/database/
README.mdSchema index
docs/technical/frontend/
README.mdFrontend docs index
docs/templates/
README.mdTemplate guide

Index Format

# [Directory Name]

## Contents

| Document            | Type           | Status   | Description       |
| :------------------ | :------------- | :------- | :---------------- |
| [Doc Name](path.md) | feature-design | approved | Brief description |

Auto-Generated Sections

From Frontmatter

document_type: "feature-design" # → Type column
status: "approved" # → Status column
# First line of content          # → Description

Directory Tree

## Structure

docs/technical/backend/ ├── DATABASE-DESIGN.md ├── database/ │ ├── 01-AUTH-SCHEMA.md │ ├── 02-BUSINESS-SCHEMA.md │ └── ... └── features/ └── FEAT-001-AUTH-MODULE.md

Update Actions

ActionIndex Change
File createdAdd row to table
File deletedRemove row
File renamedUpdate link
Status changedUpdate status column
MovedUpdate path, possibly different index

Workflow

  1. Detect change - What file changed?
  2. Find parent index - Which README.md?
  3. Read frontmatter - Extract metadata
  4. Update table - Add/remove/modify row
  5. Regenerate tree - If structure changed
  6. Save index - Write changes

GLOSSARY.md Sync

When new terms are introduced:

  1. Check if term exists in GLOSSARY.md
  2. If not, add to appropriate section
  3. Maintain alphabetical order

Cross-Reference Validation

After index update:

  • All links resolve
  • No orphan files (not in any index)
  • Status badges accurate
  • Types match actual document_type

Reference