This skill should be used when the user asks to "generate repository documentation", "create a README", "document API", "write architecture docs", "add CONTRIBUTING guide", "update repo docs", "document codebase", or mentions repository documentation, codebase analysis, or cross-repository integration documentation.
Generate comprehensive, self-contained documentation for code repositories with awareness of cross-repository integration points and dependencies.
Create and maintain repository documentation that includes README files, API documentation, contributing guides, and architecture documents. Each generated document is self-contained while explicitly documenting how the repository interacts with other repositories, services, and external dependencies.
Trigger this skill when:
Before generating documentation, analyze the codebase to understand:
Repository Structure
Glob to discover key files: README.md, package.json, pyproject.toml, go.mod, Cargo.toml, pom.xml, etc.src/, lib/, app/, internal/, etc.).env.example, docker/, k8s/, etc.)docs/, *.md files)Cross-Repository Integration Discovery
Grep for common patterns).gitmodules, workspace declarations, or subpackage referencesTechnology Detection
For each document type, follow the structured templates in examples/. Templates contain:
Key Principle: Every generated document must include an "Integrations" or "Related Repositories" section that explicitly documents:
When updating existing documentation:
ReadEdit to update specific sectionsThe primary entry point for the repository. Use examples/README-template.md as a starting point.
Required sections:
Document public APIs, functions, classes, and endpoints. Use examples/API-template.md.
Required sections:
Guide for contributors. Use examples/CONTRIBUTING-template.md.
Required sections:
High-level design and integration documentation. Use examples/ARCHITECTURE-template.md.
Required sections:
Dedicated document for cross-repository relationships. Use examples/INTEGRATIONS-template.md.
Sections:
When scanning for integration points, search for:
| Pattern | Indicates |
|---|---|
from @org/ | Internal package/repo imports (JS/TS) |
import.*internal | Internal imports (Python/Java) |
github.com/org/ | Go module references to other repos |
client.*[Aa]pi | API clients to other services |
restTemplate | REST client usage (Java) |
fetch( or axios | HTTP calls to external services |
messaging: | Spring Cloud/Sidecar integrations |
pom.xml <artifactId> | Maven dependencies |
Use scripts/find-integration-points.py to automate discovery.
user-service repo for authentication"event-bus via Kafka"Use scripts in scripts/ for automation:
find-integration-points.py - Scan codebase for references to other repositoriesanalyze-repo-structure.py - Generate summary of repository structure and dependenciesExecute scripts without reading into context:
python skills/repo-docs/scripts/find-integration-points.py /path/to/repo
Consult references/ for detailed guidance:
references/best-practices.md - Repository documentation standardsreferences/integration-patterns.md - Common integration patterns and how to document themreferences/tech-detection.md - Technology detection patternsFor detailed guidance beyond this core workflow:
references/best-practices.md - Industry standards for repository documentationreferences/integration-patterns.md - Documenting microservices, monorepos, and distributed systemsreferences/tech-detection.md - Patterns for identifying technologies and frameworksTemplates in examples/ provide starting points:
examples/README-template.md - Standard README structure with integrations sectionexamples/API-template.md - API documentation templateexamples/CONTRIBUTING-template.md - Contributor guide templateexamples/ARCHITECTURE-template.md - Architecture documentation templateexamples/INTEGRATIONS-template.md - Dedicated integrations documentUtilities in scripts/:
scripts/find-integration-points.py - Automated integration discoveryscripts/analyze-repo-structure.py - Repository structure analysisBefore finalizing documentation, verify: