codewiki
Installation
SKILL.md
CodeWiki — Product Knowledge Base Generator
Scan code, fetch product context, discover user flows, and generate a structured codewiki/ knowledge base.
Output templates are in this skill's templates/ directory. Read each template only when generating that specific file — do NOT load all templates at once.
HARD RULES
- Phase 1 is not optional. Product context is the difference between a useful wiki and a mechanical code listing. Complete it before scanning. If user can't answer, use the code-first fallback.
- Multi-repo workspace must be verified before scanning. If repos aren't in a shared parent folder, stop and help the user set it up.
- Never scan all repos simultaneously. Use Scan → Write to
_scratch/→ Carry 30-line summary → Next. This is how you survive large multi-repo projects. - Never skip a service in microservices. User flows that touch 5 services are useless if one is undocumented. Every service gets at least a lightweight scan.
- Scan in priority order. Infrastructure/contracts → gateway → frontends → core business services → supporting services.
- Report progress between repos. Tell the user what you found and which repo is next. Do not ask for permission between repos — just continue. Only pause on errors or contradictions.
- On startup, check if
codewiki/_scratch/exists. If it does, offer to resume from previous scan data. - Always use
codewiki/(no dot prefix). Ensures visibility in file explorers and default git tracking. - Adaptive detection. If hardcoded grep patterns don't match anything for a component, read the entry point file and trace outward. Don't report "no endpoints found" without trying alternative approaches.
- WebFetch failures. Report the specific error (401, 404, timeout) and continue. Never silently skip a URL.