К основному содержанию
скилл CX Codex

codebase-wiki — скилл для Claude Code: вики по коду проекта

Скилл, по которому агент пишет вики вашего репозитория в markdown: архитектура, модули, потоки, глоссарий. Пригодится, когда кодовая база разрослась и её надо объяснить людям или агенту.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add inkeep/open-knowledge-skills --skill codebase-wiki -a claude-code
Открыть на GitHub

Что делает codebase-wiki

Скилл задаёт агенту формат вики внутри репозитория. Он читает исходники и раскладывает результат по папкам wiki/: architecture/ с границами систем и слоями, modules/ по одной странице на пакет, flows/ с последовательностями вызовов, concepts/ как глоссарий терминов и guides/ с ответами на вопрос «где поменять X». Точка входа — wiki/OVERVIEW.md с общей схемой и картой разделов.

Генерация идёт по фазам из references/generate-and-refresh.md, а не свободным текстом. Режим определяется сам: пустой source_commit в OVERVIEW.md — значит вики ещё нет и её собирают с нуля; проставленный — значит идёт обновление по диффу source_commit..HEAD, и переписываются только затронутые страницы. Исходный код читается нативными инструментами вроде Read и Grep, а сами страницы пишутся через MCP-сервер OpenKnowledge — руками markdown не правят.

Есть две настройки, которые читаются из вашей формулировки и записываются в OVERVIEW.md: аудитория (internal по умолчанию или public) и глубина (tour, standard по умолчанию, exhaustive). Для работы нужен настроенный MCP-сервер OpenKnowledge, а сам пакет ставится проектно командой ok seed --pack codebase-wiki. Скилл дополняет платформенный open-knowledge, но не заменяет его — правила работы с markdown всё равно идут оттуда. Это повод проверить, что у вас уже настроен OK, иначе скилл просто нечего будет делать.

Какие задачи решает

  • собрать вики по незнакомому репозиторию с нуля
  • обновить устаревшие страницы после серии коммитов
  • объяснить новому разработчику, как устроена архитектура
  • описать сквозной сценарий работы системы диаграммой
  • дать агенту долгоживущий контекст о кодовой базе

Примеры запросов агенту

  • сгенерируй вики по этому репозиторию, аудитория internal, глубина standard
  • обнови вики: пройди дифф от source_commit до HEAD
  • собери вики для публики, без внутренних тикетов и секретов

Как установить codebase-wiki

1Через Skills CLI (Vercel)

npx skills add inkeep/open-knowledge-skills --skill codebase-wiki -a claude-code

2Вручную: положить файлы

~/.claude/skills/codebase-wiki/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/codebase-wiki/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Из того же набора6

open-knowledge-discovery Скилл подсказывает агенту, как устроен OpenKnowledge, как инициализировать проект и как открывать отдельные Markdown-файлы во временном предпросмотре без создания служебных папок. CX Codex +1 15 100установок open-knowledge-write-skill Скилл помогает агенту составить новый SKILL.md: выбрать область действия, оформить frontmatter и проверить, что скилл срабатывает в нужный момент. CX Codex +1 6 900установок open-knowledge Задаёт агенту правила работы внутри проекта OpenKnowledge: чтение, поиск, правка и линтинг markdown через MCP-инструменты. CX Codex +1 4 600установок research-with-sources Скилл ведёт агента по процедуре исследования: сохраняет каждый источник дословно, пишет черновик статьи в research/ и ссылается на каждое утверждение. CX Codex +1 826установок consolidate-notes Превращает уже принятое решение и черновые исследования в одну каноническую статью. Пригодится, когда команда договорилась и хочет зафиксировать источник истины. CX Codex +1 823установок

Похожие

codebase-documenter mhattingpete Разбирает незнакомый репозиторий и пишет по нему документацию: архитектура, компоненты, поток данных, гайд по разработке. Пригодится при онбординге и передаче проекта. CX Codex +1 587установок wiki Yeachan-Heo Ведёт markdown-базу знаний по проекту в .omc/wiki/: страницы, индекс и журнал операций сохраняются между сессиями. CX Codex +1 614установок codebase-onboarding Alireza Rezvani Собирает вводные документы по незнакомому репозиторию: языки, конфиги, структура, шаги локальной установки. Пригодится, когда в команду приходит новый человек или после крупного рефакторинга. 698установок codebase-summarizer patricio0312rev Скилл сканирует репозиторий и собирает ARCHITECTURE.md: точки входа, связи модулей, диаграммы и подсказки, куда лезть за правкой. CX Codex +1 394установок wiki-ingest Ar9av Забирает документы, папки, сырой текст и ссылки в вики Obsidian: перерабатывает их в связанные страницы и пропускает то, что уже разобрано. CX Codex +1 3 600установок wiki-update Ar9av Синхронизирует архитектурные решения и контекст проекта в базу знаний Obsidian. Помогает сохранить выводы и структуру связей между кодом и заметками. CX Codex +1 3 400установок

Рядом в теме «Настройка агента: память, контекст, субагенты»

Все скиллы по теме «Настройка агента: память, контекст, субагенты» →

Вопросы о codebase-wiki

Как установить codebase-wiki в Claude?

Через npx: npx skills add inkeep/open-knowledge-skills --skill codebase-wiki -a claude-code. Файл скилла окажется в ~/.claude/skills/codebase-wiki/SKILL.md.

Что делает codebase-wiki?

Задаёт агенту процедуру генерации и обновления вики по вашему коду: разделы architecture/, modules/, flows/, concepts/, guides/ и хаб wiki/OVERVIEW.md.

Что нужно, чтобы скилл заработал?

Настроенный MCP-сервер OpenKnowledge и установка пакета командой ok seed --pack codebase-wiki. Без OK страницы вики нечем писать и проверять ссылки.

Исходный текст

SKILL.md · MIT
---
name: codebase-wiki
description: "How to work in a Codebase Wiki project (the `codebase-wiki` starter pack): an agent-authored, source-grounded wiki of the surrounding codebase. Read when the project has a `wiki/` knowledge base with `architecture/`, `modules/`, `flows/`, `concepts/`, and `guides/` sections plus `wiki/OVERVIEW.md`, or when asked to generate or refresh a wiki of this codebase. Carries the per-folder rules and freshness + log discipline, summarizes the audience/depth knobs and source-reference convention, and bundles the full generate/refresh procedure in `references/`. Complements the platform `open-knowledge` skill; does not replace it."
compatibility: "Any agent host with the OpenKnowledge MCP server configured. Installed project-local by `ok seed --pack codebase-wiki` (`ok-beta` for Beta)."
metadata:
  pack: "codebase-wiki"
  author: "Inkeep"
  repository: "https://github.com/inkeep/open-knowledge-skills"
---
# Codebase Wiki pack — how to work here

This project holds an **agent-authored wiki of a codebase** — DeepWiki, but living in the repo. A coding agent reads the source and writes a navigable, diagram-rich, source-grounded wiki as markdown under `wiki/`. It is version-controlled and diffable, private by default, human+agent co-editable, renders in OK's live preview, and doubles as durable grounding context for future agent sessions. There is no separate Q&A surface — Q&A is "the OK-grounded agent + `search`".

> This skill is pack guidance. The platform `/open-knowledge` skill (read/write/preview/linking/grounding rules) still governs every markdown operation — this layers the wiki workflow on top.

## The shape

```
wiki/
  OVERVIEW.md     hub: what it is, a big-picture architecture diagram, a nav map to every section.
                  Frontmatter carries `profile` (audience/depth) + `source_commit` (freshness anchor).
  log.md          append-only generation / refresh audit trail
  architecture/   system boundaries, layers, subsystems, cross-cutting concerns + diagrams
  modules/        one page per package / module: purpose, entry points, key files, deps
  flows/          key end-to-end flows as sequence / flow diagrams + narrative
  concepts/       glossary: atomic pages for domain terms / core abstractions
  guides/         task-oriented "how / where do I change X" (filled at depth >= standard)
```

## Generating + refreshing

Don't free-hand it — read **[references/generate-and-refresh.md](references/generate-and-refresh.md)** and follow the phased, STOP-gated procedure. It auto-detects mode: a stubbed `OVERVIEW.md` (empty `source_commit`) → **generate** (survey → overview → architecture → modules → flows → concepts → link-graph audit); a stamped `source_commit` → **refresh** (diff `source_commit..HEAD`, update only affected pages, re-stamp).

**Two toolsets.** Read source code with NATIVE tools (`Read`/`Grep`/`Glob`/`Bash`) — OK MCP does not index non-markdown source. Author and audit the wiki with OK MCP verbs (`write`/`edit` for pages, `links`/`search` for the graph). Never hand-write wiki markdown with native `Write`/`Edit`.

## The two knobs

Two natural-language knobs, read from the user's request (e.g. "build the wiki, public and exhaustive") and recorded in `OVERVIEW.md` frontmatter (`profile: <audience>/<depth>`) so refreshes stay consistent:

- **`audience`** — `internal` (default) or `public`. `public` means polished prose, no secrets / internal infra / ticket numbers, and GitHub-URL source references.
- **`depth`** — `tour` | `standard` (default) | `exhaustive`. Scales coverage from OVERVIEW + architecture + top flows up through per-package module pages, concepts, and task guides.

[references/generate-and-refresh.md](references/generate-and-refresh.md) is the authoritative source for exactly how each knob shapes the output — read it before generating.

## Source-reference convention

- **Intra-wiki navigation** → OK doc links — they build the backlink / hub / orphan graph, so link liberally; density is how the wiki stays navigable.
- **Code references** → relative links + symbol code-spans (`internal`) or GitHub blob URLs (`public`). Source-file links stay out of the navigation graph (`links` tracks only `.md`/`.mdx` edges, so they never show as graph dead-links or orphans) — but a wrong-depth path still surfaces in the write/edit `brokenLinks` response (`no-such-file`, or `unresolvable` if it overshoots the content root), so count the `../` hops from the page's folder. Never invent paths — reference only files you actually read.

The full rules — the GitHub-URL / relative fallback, the `#Lxx` caveat, and the exact code-span shape — live in [references/generate-and-refresh.md](references/generate-and-refresh.md).

## Per-folder rules

**`architecture/`** — One page per architectural area (boundaries, layers, subsystems, cross-cutting concerns). Each: a `mermaid` system-context or component diagram, key components (with source refs), and the design decisions behind them. Uses the `architecture-page` template. At `depth: tour`, modules fold in here.

**`modules/`** — One page per package / module: purpose, responsibilities, public API / entry points, key files (linked per the convention), dependencies, and flows it participates in. Uses the `module-page` template. Skipped at `tour`; sub-module depth scales with the knob.

**`flows/`** — Key end-to-end sequences as `mermaid` sequence / flow diagrams + narrative. Uses the `flow-page` template; add a **Failure modes** section at `exhaustive`. Link every module and concept the flow crosses.

**`concepts/`** — Atomic glossary pages (one term each): definition, why it matters, where it lives in the code. Uses the `concept-page` template. Keep small and densely cross-linked so each concept becomes a hub.

**`guides/`** — Task-oriented "how / where do I change X" walkthroughs: goal, steps, relevant code, gotchas. Uses the `guide-page` template. Populated at `standard`, rich at `exhaustive`, thin/empty at `tour`.

## Freshness discipline (MUST)

`OVERVIEW.md` frontmatter carries `source_commit` — the git HEAD the wiki was last generated/refreshed against. It is the freshness anchor: refresh mode diffs `source_commit..HEAD` to update only the affected pages, then re-stamps it. **Always re-stamp `source_commit` after a generate or refresh run** — a stale anchor silently breaks incremental refresh.

## Log discipline (MUST)

`wiki/log.md` is an append-only audit trail. **Append one dated entry per generation or refresh run** — one per run, not per page. Reference touched pages as markdown links (`[Server](./modules/server.md)`) so they register in the backlink graph. Entry shape:

```markdown
## YYYY-MM-DD: <generate | refresh>

- Profile: <audience>/<depth>
- source_commit: <short-sha> (was <prev-sha> on refresh)
- Coverage: <sections / packages written or updated>
- Pages: [Overview](./OVERVIEW.md), [Server](./modules/server.md), ...
```

## Templates

Each folder ships a starter template (`architecture-page`, `module-page`, `flow-page`, `concept-page`, `guide-page`). Create with `write({ document: { path, template: "<name>" } })`. Templates carry only structure (headings + frontmatter scaffold); what each section is for is described above and in [references/generate-and-refresh.md](references/generate-and-refresh.md), not repeated inside document bodies.

© Inkeep · MIT · inkeep/open-knowledge-skills

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой