Android Docs Generator
Use this skill to generate or refresh project documentation for Android repositories.
The agent must analyze the repo directly and write docs from real findings.
Default mode (required)
This skill is agent-driven by default. Do not depend on scripts for core behavior.
- The agent must inspect the repository and produce docs directly.
- The agent must prioritize real code evidence over templates.
- The agent must document navigation flows, routes, and screens from actual implementation.
Required outputs
Always generate/update:
README.md (summary + docs index)
docs/architecture.md
docs/navigation.md
Ensure docs/ exists in repository root.
Required repository analysis
Read and extract facts from:
app/src/main/AndroidManifest.xml (package, launcher, declared activities, Application)
app/build.gradle(.kts) + root Gradle files (settings.gradle(.kts), gradle/libs.versions.toml)
app/src/main/res/navigation/*.xml when present
- Compose navigation code (
NavHost, navigation<...>, composable<...>, navigate(...))
- Router/screen models (
AppScreen, Screen, Router, etc.)
- Project layers/packages (
ui/, domain/, data/, injection/, di/, and project-specific variants)
- DI wiring (
Koin/Hilt/etc.), repositories, use cases, and key entry points
Execution workflow (agent)
- Inspect manifest + entry points.
- Inspect Gradle + version catalog to identify stack.
- Inspect navigation implementation (Compose and/or XML nav graphs).
- Inspect package/layer structure and key wiring (DI, repositories, use cases).
- Write/update
README.md, docs/architecture.md, docs/navigation.md with concrete repo evidence.
- Validate docs against quality gate before finishing.
Documentation expectations
- Use concrete names and real paths from repo.
- Avoid generic claims not backed by code.
- Include Mermaid diagrams compatible with GitLab:
graph TD/LR and sequenceDiagram
- keep labels simple; avoid special characters that break parsing.
- Navigation doc must include:
- route inventory
- major functional flows
- back-stack/pop-up behavior if present
- shared/reused screens between flows when applicable
Quality gate before finishing
Before returning, verify docs are not template-like:
- No placeholders (
TODO, TBD, Unknown, etc.) unless truly unknown and explicitly stated.
- Navigation section must mention the actual navigation mechanism used by the app.
- Architecture section must mention real stack elements detected (DI, storage, networking, analytics/crash).
- README must link to generated docs.
Optional helper script
A helper script exists and can be used only as a scaffold, never as final source of truth:
python3 /Users/jfmargar/.codex/skills/android-docs/scripts/generate_docs.py
If used, the agent must still review and correct output before final delivery.
Do not use this script when user explicitly asks for agent-only execution.
Templates
Templates in assets/ are optional layout references:
assets/README.md.tpl
assets/architecture.md.tpl
assets/navigation.md.tpl
Do not copy templates literally if repo findings differ.
1---2name: android-docs3description: Analyze Android repositories and always generate architecture and navigation documentation. Use when Codex must produce README.md as summary/index plus docs/*.md with Mermaid diagrams, treating templates as optional examples (not literal content).4---56# Android Docs Generator78Use this skill to generate or refresh project documentation for Android repositories.9The agent must analyze the repo directly and write docs from real findings.1011## Default mode (required)1213This skill is **agent-driven by default**. Do not depend on scripts for core behavior.1415- The agent must inspect the repository and produce docs directly.16- The agent must prioritize real code evidence over templates.17- The agent must document navigation flows, routes, and screens from actual implementation.1819## Required outputs2021Always generate/update:22- `README.md` (summary + docs index)23- `docs/architecture.md`24- `docs/navigation.md`2526Ensure `docs/` exists in repository root.2728## Required repository analysis2930Read and extract facts from:31- `app/src/main/AndroidManifest.xml` (package, launcher, declared activities, `Application`)32- `app/build.gradle(.kts)` + root Gradle files (`settings.gradle(.kts)`, `gradle/libs.versions.toml`)33- `app/src/main/res/navigation/*.xml` when present34- Compose navigation code (`NavHost`, `navigation<...>`, `composable<...>`, `navigate(...)`)35- Router/screen models (`AppScreen`, `Screen`, `Router`, etc.)36- Project layers/packages (`ui/`, `domain/`, `data/`, `injection/`, `di/`, and project-specific variants)37- DI wiring (`Koin`/`Hilt`/etc.), repositories, use cases, and key entry points3839## Execution workflow (agent)40411. Inspect manifest + entry points.422. Inspect Gradle + version catalog to identify stack.433. Inspect navigation implementation (Compose and/or XML nav graphs).444. Inspect package/layer structure and key wiring (DI, repositories, use cases).455. Write/update `README.md`, `docs/architecture.md`, `docs/navigation.md` with concrete repo evidence.466. Validate docs against quality gate before finishing.4748## Documentation expectations4950- Use concrete names and real paths from repo.51- Avoid generic claims not backed by code.52- Include Mermaid diagrams compatible with GitLab:53 - `graph TD/LR` and `sequenceDiagram`54 - keep labels simple; avoid special characters that break parsing.55- Navigation doc must include:56 - route inventory57 - major functional flows58 - back-stack/pop-up behavior if present59 - shared/reused screens between flows when applicable6061## Quality gate before finishing6263Before returning, verify docs are not template-like:64- No placeholders (`TODO`, `TBD`, `Unknown`, etc.) unless truly unknown and explicitly stated.65- Navigation section must mention the actual navigation mechanism used by the app.66- Architecture section must mention real stack elements detected (DI, storage, networking, analytics/crash).67- README must link to generated docs.6869## Optional helper script7071A helper script exists and can be used only as a scaffold, never as final source of truth:7273```bash74python3 /Users/jfmargar/.codex/skills/android-docs/scripts/generate_docs.py75```7677If used, the agent must still review and correct output before final delivery.78Do not use this script when user explicitly asks for agent-only execution.7980## Templates8182Templates in `assets/` are optional layout references:83- `assets/README.md.tpl`84- `assets/architecture.md.tpl`85- `assets/navigation.md.tpl`8687Do not copy templates literally if repo findings differ.