Agent skill
doc-index-update
Maintain table of contents and index files across documentation. Use when adding, removing, or renaming documentation files.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/doc-index-update
SKILL.md
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
| Directory | Index File | Purpose |
|---|---|---|
docs/ |
README.md | Main documentation hub |
docs/technical/architecture/ |
README.md | Architecture overview |
docs/technical/backend/database/ |
README.md | Schema index |
docs/technical/frontend/ |
README.md | Frontend docs index |
docs/templates/ |
README.md | Template 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
| Action | Index Change |
|---|---|
| File created | Add row to table |
| File deleted | Remove row |
| File renamed | Update link |
| Status changed | Update status column |
| Moved | Update path, possibly different index |
Workflow
- Detect change - What file changed?
- Find parent index - Which README.md?
- Read frontmatter - Extract metadata
- Update table - Add/remove/modify row
- Regenerate tree - If structure changed
- Save index - Write changes
GLOSSARY.md Sync
When new terms are introduced:
- Check if term exists in GLOSSARY.md
- If not, add to appropriate section
- 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
- DOCUMENTATION-WORKFLOW.md
- GLOSSARY.md
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?