codewiki
v0.2.0
Published
CLI utilities for mirroring Google CodeWiki content into Claude Agent Skills.
Maintainers
Readme
Export Google CodeWiki pages into Claude Agent Skills.
What Is codewiki?
codewiki is a small command‑line tool that:
- Fetches documentation from
https://codewiki.google/for a given repository. - Parses the section tree and attachments (tables, diagrams, code snippets).
- Generates a Claude Agent Skill either:
- project‑scoped (default):
./.claude/skills/<skill-name>-codewiki/ - user‑scoped:
~/.claude/skills/<skill-name>-codewiki/(via--target=user:claude)
- project‑scoped (default):
Each generated skill looks roughly like this:
.claude/skills/react-codewiki/
├── SKILL.md
├── codewiki.raw
└── references/
├── overview.md
├── react-core-library.md
├── react-dom-rendering.md
└── ...Claude Code discovers skills in either location depending on your scope:
- Project scope (default):
./.claude/skills - User scope:
~/.claude/skills(set--target=user:claude)
Once the directory exists you can ask Claude questions about that repository and it can read from these Markdown files when needed.
Requirements
- Node.js 20.19.0 or newer
- A Google CodeWiki page for the target repository, for example:
https://codewiki.google/github.com/facebook/reacthttps://codewiki.google/github.com/tailwindlabs/tailwindcss
The CLI talks directly to
https://codewiki.google/using the samebatchexecuteAPI as the web UI. It assumes you have network access and permissions to view the corresponding CodeWiki page in your environment.
Quick Start
Generate a skill for the Tailwind CSS repository:
npx codewiki@latest download \
--ai=claude \
tailwindlabs/tailwindcssGenerate a skill for React, using a custom skill name base:
npx codewiki@latest download \
--ai=codex \
--name=react \
github.com/facebook/reactThese commands will create:
.claude/skills/react-codewiki/
└── SKILL.md
├── codewiki.raw # raw batchexecute payload from CodeWiki
└── references/*.md # one Markdown file per top‑level sectionCommand Reference
codewiki download
Download a CodeWiki page and generate a Claude Agent Skill.
npx codewiki@latest download \
--ai=codex|claude|gemini \
--target=claude|user:claude \
[--name=<skill-base-name>] \
<project_id>Options
--ai(required) Which AI agent this skill is primarily for. Supported values:codexclaudegemini
Today this is used for metadata in
SKILL.mdso that it’s clear which agent the skill was designed around.--target(optional) Output scope / destination for the generated skill directory:claude(default): write to$PWD/.claude/skills/user:claude: write to$HOME/.claude/skills/
--name(optional) Base name for the skill:- Skill directory:
<slug(name)>-codewiki SKILL.mdfrontmattername:<slug(name)>-codewiki
If omitted, the last segment of the repository path is used, e.g.
facebook/react→react-codewiki.- Skill directory:
<project_id>(required) Identifies the project / CodeWiki page. Supported forms:org/repo(e.g.facebook/react)github.com/org/repohttps://github.com/org/repohttps://codewiki.google/github.com/org/repo
Generated layout
For a project‑scoped skill:
npx codewiki@latest download --ai=codex --target=claude --name=react github.com/facebook/reactthe CLI will create something like:
.claude/skills/react-codewiki/
├── SKILL.md
├── codewiki.raw
└── references/
├── overview.md
├── react-core-library.md
├── react-dom-rendering.md
├── react-native-rendering.md
├── react-reconciliation-engine.md
├── react-compiler.md
├── react-hooks-linting.md
├── react-developer-tools.md
├── react-server-components-and-ssr.md
├── react-internal-scheduler.md
├── react-test-renderer.md
└── external-store-synchronization-hook.mdSKILL.md includes:
- A description with snapshot date and commit hash.
- A “How to use this skill” section that lists each file under
references/and includes a one‑line summary of what the section covers (taken from the CodeWiki section summary).
Each file in references/ contains:
- Section headings and body text converted to Markdown.
- Attachments from CodeWiki:
- tables → Markdown blocks where possible,
- diagrams → Graphviz
dotcode blocks, - code excerpts → fenced code blocks.
Output Location
By default skills are written to the current project directory:
$PWD/.claude/skills/<skill-name>/To mimic Claude Code’s user scope, use:
$HOME/.claude/skills/<skill-name>/ (via --target=user:claude)For Developers
From source (this repo)
In the repository root:
pnpm installThen build the CLI:
cd scripts/codewiki
pnpm buildAfter a successful build you can run:
node dist/index.mjs download --ai=claude --target=claude tailwindlabs/tailwindcssFrom npm
The CLI is published as codewiki on npm. Run it without cloning:
npx codewiki@latest download --ai=claude --target=claude tailwindlabs/tailwindcssBuild & Development
This package uses tsdown to build a
Node‑targeted CLI bundle.
Key files:
package.json- Exposes ESM/CJS entry points and a
codewikibin. - Provides
dev,build, andcodewikiscripts.
- Exposes ESM/CJS entry points and a
tsdown.config.ts- Configures
src/index.tsas the entry point. - Emits
dist/index.mjs,dist/index.cjs, anddist/index.d.ts.
- Configures
Common workflows inside scripts/codewiki:
# Run directly with bun during development
pnpm dev # -> bun src/index.ts
# Build dist/ for Node / npm usage
pnpm build # -> tsdown
# Run the built CLI
pnpm codewiki -- helpRoadmap
The initial focus is a solid download experience. Planned enhancements:
codewiki list --target=claude|user:claudeList all*-codewikiskills under./.claude/skills/(or~/.claude/skills/when--target=user:claude), including snapshot date and commit hash.codewiki search <query>Searchhttps://codewiki.google/search?q=<query>and offer a quick way to rundownloadon selected results.codewiki local-create/codewiki local-updateGenerate and incrementally update skills from local projects, using git history to determine which sections need to be regenerated.
These commands are not implemented yet, but the current design
(project_id normalization, CodeWiki section parsing, and structured skill
generation) is intended to support them without breaking changes to the
download command.
