kmp-docs-generator
Use this skill to generate or refresh documentation for Kotlin Multiplatform Compose repositories.
The agent must analyze the repo directly and produce docs from verified findings.
Default mode (required)
This skill is agent-driven by default.
- The agent must inspect code and configuration directly.
- The agent must prioritize repository evidence over assumptions.
- Documentation must reflect the current implementation, not ideal/target architecture.
Scope
This skill always targets the current working directory and manages only:
README.md (project summary + docs index)
docs/overview.md
docs/architecture.md
docs/navigation.md
docs/flows.md
It does not generate or modify AGENTS.md.
Create/Update behavior
- If outputs do not exist, create them.
- If outputs exist, rewrite fully to maintain consistency between files.
Required repository analysis
Read and extract facts from:
- Root config:
settings.gradle(.kts), build.gradle(.kts), gradle/libs.versions.toml
- KMP module setup (
android, ios, wasm/js, shared/common modules when present)
- Entry points (Android
Application/Activity, iOS app entry, shared App() composable)
- Navigation implementation:
- destination models (
AppDestination, Screen, sealed routes, etc.)
- route registration (
NavHost, navigation, composable)
- transition calls (
navigate(...), pop/back-stack rules)
- Project structure and layers (
ui, domain, data, plus legacy/shared variants)
- DI and service wiring (Koin/Hilt/manual DI)
Execution workflow (agent)
- Inspect repository structure and module graph.
- Identify platform entry points and shared app entry.
- Inspect navigation code and route definitions.
- Map screens/features to flows and transitions.
- Inspect architecture and dependencies per layer.
- Write/update
README.md + all files under docs/.
- Validate consistency with quality gate before finishing.
Output expectations
README.md: concise summary and links to docs/*.
docs/overview.md: functional overview and module responsibilities.
docs/architecture.md: layers, DI, data flow, relevant dependencies.
docs/navigation.md: route inventory, transitions, back-stack/pop rules.
docs/flows.md: main operational flows aligned with navigation.
Write in Spanish by default unless user asks otherwise.
Diagrams
Use Mermaid compatible with GitLab:
graph TD/LR
sequenceDiagram
Keep labels simple; avoid special characters that can break parser compatibility.
Quality gate (must pass)
Before returning, verify:
- No invented facts.
- No placeholders (
TODO, TBD, Unknown) unless explicitly justified.
docs/navigation.md and docs/flows.md describe the same real navigation.
README.md links correctly to all generated docs files.
- Cross-file terminology is consistent (same route/screen names everywhere).
Optional helpers
If helper scripts/templates exist in this skill folder, they are scaffolding only.
They must never be treated as source of truth; final output must be manually validated against repository code.
Non-goals
- Do not modify runtime code just to “fit” documentation.
- Do not preserve stale docs when repository behavior has changed.
1---2name: kmp-docs-generator3description: Analyze Kotlin Multiplatform Compose repositories and generate or update README.md plus docs/overview.md, docs/architecture.md, docs/navigation.md, and docs/flows.md from real repo inspection. Use when project docs must be created if missing or fully refreshed if present.4---56# kmp-docs-generator78Use this skill to generate or refresh documentation for Kotlin Multiplatform Compose repositories.9The agent must analyze the repo directly and produce docs from verified findings.1011## Default mode (required)1213This skill is **agent-driven by default**.1415- The agent must inspect code and configuration directly.16- The agent must prioritize repository evidence over assumptions.17- Documentation must reflect the current implementation, not ideal/target architecture.1819## Scope2021This skill always targets the current working directory and manages only:2223- `README.md` (project summary + docs index)24- `docs/overview.md`25- `docs/architecture.md`26- `docs/navigation.md`27- `docs/flows.md`2829It does not generate or modify `AGENTS.md`.3031## Create/Update behavior3233- If outputs do not exist, create them.34- If outputs exist, rewrite fully to maintain consistency between files.3536## Required repository analysis3738Read and extract facts from:39- Root config: `settings.gradle(.kts)`, `build.gradle(.kts)`, `gradle/libs.versions.toml`40- KMP module setup (`android`, `ios`, `wasm/js`, shared/common modules when present)41- Entry points (Android `Application`/`Activity`, iOS app entry, shared `App()` composable)42- Navigation implementation:43 - destination models (`AppDestination`, `Screen`, sealed routes, etc.)44 - route registration (`NavHost`, `navigation`, `composable`)45 - transition calls (`navigate(...)`, pop/back-stack rules)46- Project structure and layers (`ui`, `domain`, `data`, plus legacy/shared variants)47- DI and service wiring (Koin/Hilt/manual DI)4849## Execution workflow (agent)50511. Inspect repository structure and module graph.522. Identify platform entry points and shared app entry.533. Inspect navigation code and route definitions.544. Map screens/features to flows and transitions.555. Inspect architecture and dependencies per layer.566. Write/update `README.md` + all files under `docs/`.577. Validate consistency with quality gate before finishing.5859## Output expectations6061- `README.md`: concise summary and links to `docs/*`.62- `docs/overview.md`: functional overview and module responsibilities.63- `docs/architecture.md`: layers, DI, data flow, relevant dependencies.64- `docs/navigation.md`: route inventory, transitions, back-stack/pop rules.65- `docs/flows.md`: main operational flows aligned with navigation.6667Write in Spanish by default unless user asks otherwise.6869## Diagrams7071Use Mermaid compatible with GitLab:72- `graph TD/LR`73- `sequenceDiagram`7475Keep labels simple; avoid special characters that can break parser compatibility.7677## Quality gate (must pass)7879Before returning, verify:80- No invented facts.81- No placeholders (`TODO`, `TBD`, `Unknown`) unless explicitly justified.82- `docs/navigation.md` and `docs/flows.md` describe the same real navigation.83- `README.md` links correctly to all generated docs files.84- Cross-file terminology is consistent (same route/screen names everywhere).8586## Optional helpers8788If helper scripts/templates exist in this skill folder, they are scaffolding only.89They must never be treated as source of truth; final output must be manually validated against repository code.9091## Non-goals9293- Do not modify runtime code just to “fit” documentation.94- Do not preserve stale docs when repository behavior has changed.