index
Manage and query the documentation dependency index. Use this to identify which documents need to be updated when code changes.
When & Why to Use This Skill
This Claude skill provides a specialized framework for managing documentation dependency indexes, enabling developers to maintain perfect synchronization between source code and technical documentation. By facilitating automated impact analysis, it identifies exactly which documents require updates when code changes occur, significantly reducing the risk of outdated documentation and improving knowledge base reliability.
Use Cases
- Pre-coding Impact Analysis: Identify all technical documents affected by a specific file change before starting development to ensure comprehensive documentation coverage.
- Documentation-Code Mapping: Establish and track explicit relationships between source code files and their corresponding architectural or functional guides.
- Integrity Auditing: Automatically verify the validity of documentation paths and dependencies to prevent broken links and orphaned documentation entries.
- Architecture Visualization: Generate Mermaid-based topology graphs to visualize the complex relationships and dependencies between different documentation modules and code components.
| name | index |
|---|---|
| description | Manage and query the documentation dependency index. Use this to identify which documents need to be updated when code changes. |
Documentation Index Skill
This skill allows you to track relationships between code and documentation, enabling "Impact Analysis". Before making changes to code, you should check which documents describe that code. After making changes, you should update the relevant documents and the index itself.
Commands
Check Impact
Find out which documents are affected by a change to a specific file.
Command: ./scripts/index impact <filepath> [--format json]
Use this before editing any code.
List Index
View all indexed relationships.
Command: ./scripts/index list [--format json]
Add/Update Entry
Register a relationship between a document and code files, or between documents.
Command: ./scripts/index add <doc_path> [--related "src/file1.py,src/file2.py"] [--depends "docs/other.md"] [--force]
doc_path: The documentation file (e.g.,docs/architecture/auth.md).--related: Comma-separated list of files (code or other) thatdoc_pathdescribes.--depends: Comma-separated list of other documents thatdoc_pathdepends on.
Remove Entry
Remove a document from the index or specific items from it.
Command: ./scripts/index remove <doc_path> [--item "src/file1.py"] [--section related|depends_on]
Check Integrity
Verify that all paths in the index actually exist.
Command: ./scripts/index check [--format json]
Visualize
Generate a Mermaid graph of the documentation topology.
Command: ./scripts/index graph
Workflow
- Before Coding: Run
./scripts/index impact src/target_file.pyto see what docs need attention. - After Coding:
- Update the identified docs.
- If you created new files, add them to the index using
./scripts/index add. - If you deprecated files, remove them using
./scripts/index remove.
- Validation: Run
./scripts/index checkto ensure the index is healthy.