About openwiki-init
openwiki-init is a skill that creates an initial, navigable documentation set for a repository in `openwiki/`. It guides coding agents through repository research, planning, writing, review, and updates to agent instructions and run metadata.
Key features
- 01Inspect Git history and repository state
- 02Inventory code, docs, tests, and operations
- 03Plan a focused set of wiki pages
- 04Write a quickstart and linked pages
- 05Review the wiki tree and record run metadata
Use cases
- 01Create first-pass repository documentation
- 02Map a codebase for humans and future coding agents
- 03Synthesize existing documentation into a wiki
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ kinensake/ openwiki-skills --skill openwiki-initAfter installing, type/openwiki-initin Claude Code to confirm it loaded.
Bundled filesreferences/core.md
Details
From the project READMEWiki Init
Generate first-pass documentation for this repository under openwiki/, useful for both humans and future coding agents.
First, read references/core.md in this skill's directory — it defines the quality rules, structure requirements, security rules, and the AGENTS.md/CLAUDE.md reference template that all output must follow.
This is an initial documentation run: assume openwiki/ does not yet contain useful documentation and build the structure from scratch. If the user gave additional instructions with the invocation, they take priority within these rules.
Workflow
-
Gather git context. Run
git status --short,git rev-parse HEAD,git log --max-count=20 --name-status --oneline, andgit diff --name-status HEADto understand the repo's current state and recent evolution. -
Build a repository inventory: existing docs, app entrypoints, package/config files, major domain folders, tests/evals, data/schema files, skill/playbook files, and operational scripts. Follow the discovery discipline in core.md; use read-only research subagents when the repo has multiple substantial domains. Use git evidence (recent commits, targeted
git blame/git showon high-signal files) to understand how important workflows came to be. -
Plan before writing. Draft a plan listing the intended wiki pages, the source evidence for each page, and remaining questions. Keep the plan out of the repository: hold it in your working notes or a temporary file outside the repo (e.g. a scratchpad or temp directory if your environment provides one) — never leave plan files inside
openwiki/. Keep the set focused: quickstart plus the smallest set of section pages needed to explain the repo clearly — at most 8 pages unless the repository is clearly tiny. -
Write the docs. Create
openwiki/quickstart.mdfirst, then the linked section pages. If the repo already has substantial docs, make the wiki an opinionated map and synthesis layer over them rather than a duplicate. Do not try to document every source file — cover the main architecture, workflows, domain concepts, data models, integrations, operations, tests, and known extension points at the right level of detail. -
Review the tree. Re-check the
openwiki/tree against the section quality rules in core.md: merge, move, or remove low-value single-file directories and stub pages. -
Update root agent instruction files (
AGENTS.md/CLAUDE.md) with the exact OpenWiki reference section from core.md. -
Record run metadata in
openwiki/.last-update.jsonwith"command": "init"(see core.md for the format).
Finish by summarizing the documentation created and any important caveats or open questions. Create a strong first-pass wiki that is accurate and navigable, then stop — it can be refined by later /openwiki-update runs.