Install
openclaw skills install codewiki-generatorGenerate a deep, code-first project wiki and VitePress documentation site (DeepWiki-style) for a repository. Use when asked to create a complete wiki/manual...
openclaw skills install codewiki-generatorGenerate a DeepWiki-style, code-first documentation site for a given repository. The output will reside in the codewiki/ directory, including a VitePress configuration and an auto-generated sidebar. The documentation must reflect the project's current state and prioritize explaining the system's design rationale over merely describing its functionality.
Ask the user: "What language should the documentation be written in? (e.g., English, 中文, 日本語, etc.)" IF the user specifies a language THEN store the provided language and apply it to all generated prose content. ELSE IF the user does not specify a language THEN default to English.
README, docs/) as secondary hints.Execute the analyzer script to scan the codebase and generate structured metadata. <skill-root> refers to the directory containing this SKILL.md.
python3 <skill-root>/scripts/codewiki_analyze.py \
--repo-root <repo-root> \
--out-dir codewiki \
--force
This command generates the following outputs:
codewiki/.meta/ directory containing deps.json, entrypoints.json, evidence.json, doc_plan.json, and symbols.json (if ctags is available).codewiki/quality-report.md detailing coverage and pages with low confidence..md files.Note: This step does not generate placeholder .md files. The LLM is responsible for writing documentation content directly in Step 4.
Note: Images referenced in existing Markdown files are copied into codewiki/assets/.
references/structure-and-heuristics.md.Read codewiki/.meta/doc_plan.json and process each planned page:
.md file only for pages containing actual content.Writing guidelines:
# Related Code block (fenced text block), not a heading./, (), and : in labels, and prefer node[plain label].Refer to references/doc-templates.md for detailed, evidence-linked page templates.
After documentation generation, update the sidebar to reflect the actual files:
python3 <skill-root>/scripts/codewiki_bootstrap.py \
--repo-root <repo-root> \
--out-dir codewiki \
--refresh-sidebar
Install documentation dependencies (Mermaid support is enabled by default):
npm --prefix codewiki install
Launch the documentation site:
npm --prefix codewiki run docs:dev
Alternative launch command (without prior npm install):
npx -p vitepress -p vitepress-plugin-mermaid -p mermaid vitepress dev codewiki
After the site is operational, inform the user about available options:
"Documentation site is ready! You can now:
Let me know if you'd like to proceed with any of these."
These workflows are available for execution after the core documentation generation process is complete.
Deploy the documentation site to Cloudflare Pages using the wrangler CLI.
Trigger: The user requests to deploy, publish, or host the documentation.
See: references/deploy-cloudflare.md for comprehensive instructions (including wrangler installation, login verification, build process, deployment, and updating index.md with the live URL).
Translate existing documentation into a second language and configure the VitePress language switcher.
Trigger: The user requests translation, multi-language, or internationalization (i18n) support.
See: references/i18n-setup.md for comprehensive instructions (including directory structure, VitePress locales configuration, and translation guidelines).
codewiki_analyze.py: Scans the codebase and generates .meta/*.json metadata files.codewiki_bootstrap.py: Scaffolds the codewiki/ directory, copies referenced images, and generates the sidebar.structure-and-heuristics.md: Contains rules for module selection and signal identification.doc-templates.md: Provides comprehensive, evidence-linked templates for all page types.deploy-cloudflare.md: Details the workflow for deploying to Cloudflare Pages.i18n-setup.md: Outlines the configuration process for multi-language support.vitepress/: Contains minimal VitePress configuration and a landing page template.