How ekuttan/codewiki works
1. What this repository is
- This is not an application runtime; it is a Claude Code skill package named CodeWiki.
- Its purpose is to guide Claude Code to scan another codebase and generate a structured knowledge base for that target project.
2. Top-level composition
- The repo is intentionally small:
- SKILL.md = the behavior/specification for the skill.
- templates/ = markdown templates for generated documentation.
- README.md = product/usage documentation for humans.
- LICENSE = MIT license.
- There are no source modules, services, build scripts, or package manifests, which signals this is a documentation/prompt repository rather than a software system with executable components.
3. Core control plane: SKILL.md
- SKILL.md is the heart of the repo.
- It defines how Claude Code should run the /codewiki workflow: what to scan, what questions to ask, how to confirm findings, and how to write outputs.
- Architecturally, this file is the orchestrator: it transforms the skill from static documentation into an interactive analysis pipeline.
4. Template subsystem: templates/
- The templates/ folder defines the shape of the generated knowledge base.
- Each template corresponds to one documentation artifact:
- architecture.md
- service-map.md
- events.md
- user-flow.md
- readme.md
- claude-md.md
- This is the repo’s main extensibility boundary: changing templates changes the output structure without changing the underlying scan behavior.
5. Output model
- The skill does not store generated docs in this repository by default; it generates them in a target project under codewiki/ and may also generate or merge CLAUDE.md.
- So the repo’s architecture is a generator definition, while the actual knowledge base is a separate downstream artifact in the scanned project.
6. Interaction model
- The user invokes /codewiki inside Claude Code against a target codebase.
- The skill then follows an interactive flow: infer product context, scan the codebase, discover user flows, verify architecture, and generate docs.
- This makes the system LLM-driven and local, not server-driven or event-driven in the traditional software sense.
7. Multi-repo / large-system handling
- README describes a specific orchestration strategy for multi-repo products: scan sibling repos under a shared parent directory, inventory them, prioritize infrastructure and contracts, then scan apps and services one at a time.
- The important architectural boundary here is context management: the skill is designed to carry forward compact summaries rather than full repo contents.
- This is a key part of the system’s design, even though it is implemented as prompt behavior rather than code.
8. Primary data flows
- Input: a target codebase, optional product context, and optional URLs provided by the user.
- Processing: Claude Code reads source files, dependency manifests, routes, env vars, models, and configs from the target project.
- Output: generated markdown knowledge base files and CLAUDE.md.
- The repo itself does not persist application data; the only persistent outputs are documentation artifacts written to the user’s project.
9. Security and trust boundary
- The skill runs locally inside Claude Code.
- It explicitly avoids sending code to a backend or collecting telemetry.
- The only external fetches mentioned are user-provided URLs during product-context gathering.
- From an architecture diagram perspective, the trust boundary is between the local workspace and any explicit external docs URLs the user chooses to supply.
10. Customization points
- templates/ lets teams tailor the generated documentation sections and style.
- SKILL.md lets teams change the scan and confirmation behavior.
- This means the repo is designed to be adapted as a documentation generation framework, not a fixed product.
11. What is intentionally missing
- There is no API, database, queue, web frontend, or worker infrastructure in this repository.
- Those concepts appear only as things the skill can discover in other repos it scans.
- So the architectural diagram for this repo should center on prompt/spec files → Claude Code execution → generated docs, not on runtime services.
12. How to depict it
- A clear diagram would show:
- the human/operator invoking /codewiki,
- Claude Code consuming SKILL.md and templates/,
- the target repository being scanned as input,
- generated documentation written back to the target project,
- optional external docs URLs as auxiliary input.
- That accurately captures the repo as a skill-based documentation generator with no standalone runtime.
Main entry points: templates Templates · SKILL.md SKILL.md · README.md README.md · LICENSE LICENSE
Components 18
CodeWiki repo
Skill package and documentation for the CodeWiki workflow.
- SKILL.md · Defines the /codewiki workflow, scan process, confirmation steps, and output rules.
SKILL.md - README.md · Human-facing overview and multi-repo operating guidance.
README.md - LICENSE · MIT license for the skill package.
LICENSE - Templates · Markdown blueprints for the generated knowledge base.
templates - Architecture · Template for architecture documentation.
templates/architecture.md - Service map · Template for service and boundary mapping.
templates/service-map.md - Events · Template for event and message documentation.
templates/events.md - User flow · Template for end-user journey documentation.
templates/user-flow.md - Project readme · Template for generated repository README output.
templates/readme.md - CLAUDE.md · Template for generated Claude guidance merged into the target project.
templates/claude-md.md
Claude Code flow
Interactive local execution against a target codebase.
- Operator · Invokes /codewiki and supplies context, scope, and optional URLs.
- Claude Code · Runs the interactive analysis and documentation workflow inside the workspace.
- Target codebase · External project being analyzed for structure, flows, and contracts.
- External docs · User-provided URLs used only for context gathering when needed.
- Code signals · Source files, manifests, routes, env vars, models, and configs read from the target project.
- Compact context · Summaries carried forward across large or multi-repo scans.
Generated artifacts
Documentation written into the scanned project.
- codewiki/ · Knowledge base directory written into the target project.
- CLAUDE.md · Optional merged Claude guidance file written in the target project.
Connections 21
- Operator → Claude Code: invokes /codewiki · Starts the local workflow with optional context and scope.
- Claude Code → SKILL.md: loads spec · Uses the skill definition as the workflow controller.
- Claude Code → Templates: loads templates · Uses templates to shape the generated documentation.
- Templates → Architecture: contains · Architecture template file.
- Templates → Service map: contains · Service map template file.
- Templates → Events: contains · Events template file.
- Templates → User flow: contains · User flow template file.
- Templates → Project readme: contains · Generated README template file.
- Templates → CLAUDE.md: contains · CLAUDE.md template file.
- Operator → Target codebase: selects target · Points the workflow at the repository to analyze.
- Operator → External docs: supplies optional URLs · Adds outside context when relevant.
- Claude Code → Code signals: reads · Collects source and configuration signals from the target project.
- External docs → Claude Code: context only · Optional auxiliary information for product understanding.
- Code signals → Compact context: condenses · Large repositories are reduced to compact summaries for continued analysis.
- Compact context → Claude Code: feeds follow-up · Supports iterative scanning and multi-repo orchestration.
- SKILL.md → Claude Code: directs workflow · Specifies scanning, confirmation, and generation behavior.
- Claude Code → codewiki/: writes docs · Generates structured documentation in the target project.
- Claude Code → CLAUDE.md: writes guidance · May generate or merge Claude guidance in the target project.
- Target codebase → Code signals: provides · The analyzed codebase is the source of truth for architecture and flows.
- SKILL.md → README.md: describes · Documents the skill’s usage and operating model.
- SKILL.md → LICENSE: governs · The package is distributed under MIT terms.