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

indexion-documentation — скилл для Claude Code: аудит документации

Скилл оценивает покрытие документации, ищет расхождения между кодом и доками и рисует граф зависимостей.

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

Что делает indexion-documentation

Скилл закрывает оценочную сторону работы с документацией: что уже описано, чего не хватает, что устарело. Покрытие считается командой indexion plan documentation --style=coverage . — она показывает общий процент, разбивку по пакетам и отдельно по функциям и типам. Для списка конкретных объявлений без док-комментариев есть indexion grep --undocumented src/.

Расхождения ловит indexion plan reconcile. Он сравнивает символы кода с документацией и выдаёт три вещи: расхождение словаря, устаревшие доки и модули вообще без описания. В таблице Vocabulary Divergence видно расстояние от 0 до 100%: если оно выше 90%, README живёт отдельной от кода жизнью. Проверять можно по области (--scope=package-docs, --scope=tree-docs) или по конкретным файлам через --doc.

У reconcile есть кэш в .indexion/cache/reconcile/. После смены схемы или обновления indexion он устаревает и валится с ошибкой десериализации — тогда его сносит rm -rf .indexion/cache/reconcile. Ещё момент: покрытие в 100% не значит, что доки верные. Маркер ///| без текста тоже считается документированным, поэтому смотрите doc_preview, а не только процент. И reconcile проверяет только направление код → доки, обратную сторону придётся сверять вручную.

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

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

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

  • проверь покрытие документации в проекте
  • найди расхождения между кодом и доками
  • построй граф зависимостей для src/config/

Как установить indexion-documentation

1Через Skills CLI (Vercel)

npx skills add trkbt10/indexion-skills --skill indexion-documentation -a claude-code

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

~/.claude/skills/indexion-documentation/SKILL.md

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

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

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

Похожие

doc-gen ruvnet Генерирует документацию по кодовой базе, находит расхождения между кодом и текстами, а также запускает фоновые проверки по расписанию. Пригодится при частых изменениях в API. CX Codex +1 743установок documentation официальный anthropics Скилл для технического письма: собирает README, справочник по API, ранбук, архитектурный документ или гайд для новичков. Пригодится, когда код есть, а описания к нему нет. CX Codex +1 10 300установок code-documentation bytedance Скилл автоматически создаёт README, API-референс, архитектурную документацию и гайды разработчика прямо из кода. Пригодится, если нужно документировать проект, библиотеку или API без ручной писанины. CX Codex +1 1 900установок technical-documentation wondelai Скилл проверяет и переписывает документацию по гайдлайну Google: README, how-to, справочники API, changelog. Пригодится, когда доки расползлись по тону и структуре. CX Codex +1 1 400установок markdown-documentation aj-geddes Скилл задаёт агенту правила оформления Markdown: README, вики, страницы документации. Пригодится, когда тексты пишет модель и их надо привести к одному виду. CX Codex +1 1 300установок

Рядом в теме «Тексты и документация»

Всё по теме «Тексты и документация» →

Вопросы о indexion-documentation

Как установить indexion-documentation в Claude?

Выполните npx skills add trkbt10/indexion-skills --skill indexion-documentation -a claude-code. Скилл встанет в ~/.claude/skills/indexion-documentation/SKILL.md.

Что делает indexion-documentation?

Считает покрытие документации, ищет расхождения между кодом и доками через plan reconcile и строит граф зависимостей в Mermaid, DOT, D2, тексте или JSON.

Почему plan reconcile падает при запуске?

Устарел кэш в .indexion/cache/reconcile/ после смены схемы или обновления indexion. Удалите его командой rm -rf .indexion/cache/reconcile.

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

SKILL.md · Apache-2.0
---
name: indexion-documentation
description: Documentation analysis — assess coverage, detect code-to-doc drift with plan reconcile, visualize dependencies with doc graph. Answers "what needs docs?" and "are docs still accurate?"
---

# indexion documentation — Documentation Analysis

Assess documentation state and detect drift. This skill covers the
**evaluation side** of the documentation lifecycle: what exists, what's
missing, what's stale. For building READMEs, see `indexion-readme`.

## "What needs documentation?"

```bash
# Quick coverage overview — how much of the public API is documented?
indexion plan documentation --style=coverage .
```

Reports:
- Overall coverage percentage (documented / total pub items)
- Per-package breakdown with README presence
- Functions vs types coverage split

Output example:
```
Overall Coverage: 81% (2285/2806)
Functions: 89%, Types: 75%
```

For a detailed plan with prioritized action items:

```bash
# Full plan with priorities and package inventory
indexion plan documentation .

# As a GitHub Issue for tracking
indexion plan documentation --format=github-issue .

# JSON for scripting
indexion plan documentation --format=json .
```

For a quick per-file listing of undocumented items:

```bash
# Which pub declarations lack doc comments?
indexion grep --undocumented src/
```

**How detection works:** Uses KGF tokenization to find visibility keywords
(`pub`, `public`, `export`) paired with declaration keywords (`fn`, `struct`,
`enum`, `type`, `trait`). Associates `///` doc comments with declarations.
Language-agnostic — works for any KGF-supported language.

**Caveat:** `///|` marker-only comments count as "documented" even without
descriptive text. Check `doc_preview` in the output for quality, not just coverage.

## "Are my docs up to date?"

Detect drift between implementation code and documentation.

```bash
# Full reconcile report in markdown
indexion plan reconcile --format=md .
```

This compares code symbols against documentation and reports:
- **Vocabulary divergence**: source code terms missing from co-located docs
- **Stale docs**: code changed after docs were last updated
- **Missing docs**: code modules with no documentation coverage

**Read the report:**

The Vocabulary Divergence table shows distance (0-100%) between code vocabulary
and documentation. 90%+ distance means the README is essentially unrelated to
the current code. Check the Gap Terms column for specific missing vocabulary.

**Scoped checks:**

```bash
# Check only package-level docs
indexion plan reconcile --scope=package-docs .

# Check only tree-level docs
indexion plan reconcile --scope=tree-docs .

# Check specific documents
indexion plan reconcile --doc='docs/**/*.md' .
indexion plan reconcile --doc-spec=markdown .
```

**Timestamp strategies:**

```bash
# Use git commit timestamps (more accurate for collaborative projects)
indexion plan reconcile --git .

# Use file mtimes only (faster, no git dependency)
indexion plan reconcile --mtime-only .
```

**Cache and drift:**

`plan reconcile` maintains a cache at `.indexion/cache/reconcile/`. After schema
changes or indexion upgrades, the cache can become stale and cause deserialization
errors. Clear it:

```bash
rm -rf .indexion/cache/reconcile
```

## "Show me the dependency structure"

Generate dependency diagrams for understanding module relationships.

```bash
# Mermaid diagram (default — embeddable in GitHub README)
indexion doc graph src/config/

# Other formats
indexion doc graph --format=dot src/     # Graphviz DOT
indexion doc graph --format=d2 src/      # D2
indexion doc graph --format=text src/    # ASCII text
indexion doc graph --format=json src/    # Machine-readable

# Custom title and output file
indexion doc graph --title="KGF Dependencies" --output=deps.mmd src/kgf/
```

## Analysis Workflow

```bash
# 1. What's the current state?
indexion plan documentation --style=coverage .

# 2. What specific items lack docs?
indexion grep --undocumented src/

# 3. Has code drifted from existing docs?
indexion plan reconcile --format=md .

# 4. What does the dependency structure look like?
indexion doc graph --output=deps.mmd src/

# 5. Fix flagged docs, re-verify
indexion plan reconcile --format=md .
```

## Common Pitfalls

**"plan reconcile shows 90%+ divergence everywhere"**
- Auto-generated skeleton READMEs (API listing only) have high divergence because
  they lack the vocabulary of the actual implementation. Enrich them with
  descriptions of what the code does, not just what it exports.

**"plan documentation says 100% coverage but docs are wrong"**
- Coverage measures presence of doc comments, not accuracy. A `///|` marker
  counts as documented. Use `plan reconcile` to check content accuracy.

**"plan reconcile crashes on startup"**
- Cache deserialization error after schema changes. Clear it:
  `rm -rf .indexion/cache/reconcile`

**"plan reconcile detects drift I already fixed"**
- The `--git` flag uses commit timestamps. If you fixed docs but haven't committed,
  mtime-based detection (`--mtime-only`) will see the fix, but git-based won't.

**Reconcile only checks implementation -> docs direction.** It detects code terms
missing from docs, but does NOT detect docs referencing nonexistent CLI options.
For that direction, compare each README against `indexion <command> --help` manually.

© trkbt10 · Apache-2.0 · trkbt10/indexion-skills

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

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

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