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

kb-lint — скилл для Claude Code: что делает и как установить

Проверяет базу знаний агента на соответствие спецификации и накопленные расхождения. Безопасные ошибки скилл исправляет сам.

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

Что делает kb-lint

Скилл проводит двухэтапную ревизию каталога knowledge/. Сначала детерминированный скрипт scripts/conformance.mjs валидирует YAML frontmatter на соответствие SPEC §11. Без Node.js версии 18 или выше скрипт проверки не запустится. Утилита выявляет синтаксические сбои, неверные форматы дат и битые ссылки.

Второй проход оценивает смысловой дрейф. Модель ищет противоречия между концептами, сиротские статьи без входящих ссылок, пропущенные перекрёстные связи и устаревшие утверждения. Также скилл сверяет типы со схемой spec/types.md и проверяет привязку к коду проекта. Результаты делятся на уровни Error, Warning и Info. Итог аудита дописывается в файл log.md.

Режим fix правит только очевидные дефекты. Он перегенерирует обзорные файлы и обновляет индекс. Менять смысл спорных утверждений скилл не станет. Правки смысловых противоречий и схемы типов требуют подтверждения человека.

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

  • проверить frontmatter заметок скриптом на соответствие SPEC §11
  • найти сиротские концепты без входящих ссылок
  • выявить противоречия и устаревшие утверждения в базе знаний
  • исправить битые ссылки и даты в режиме fix
  • зафиксировать результаты проверки в log.md

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

  • Проверь базу знаний в папке knowledge/ на соответствие спецификации
  • Запусти аудит дрейфа базы и выведи отчёт с ошибками Error
  • Выполни kb-lint fix и исправь безопасные проблемы со ссылками

Как установить kb-lint

1Через Skills CLI (Vercel)

npx skills add stjbrown/agent-knowledge --skill kb-lint -a claude-code

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

~/.claude/skills/kb-lint/SKILL.md

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

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

Вопросы о kb-lint

Как установить kb-lint в Claude Code?

Установите скилл командой npx skills add stjbrown/agent-knowledge --skill kb-lint -a claude-code.

Что делает kb-lint?

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

Что скилл может исправить автоматически?

В режиме fix утилита обновляет устаревшие обзоры, чинит битые ссылки с понятной целью и форматирует даты. Править смысл утверждений без участия пользователя скилл запрещает.

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

SKILL.md · MIT
---
name: kb-lint
description: Health-check a knowledge bundle for conformance and drift; optionally auto-fix safe issues.
disable-model-invocation: true
version: 0.3.2
tags: [knowledge, okf, lint, conformance]
---

# kb-lint — health-check the bundle

Keep a [bundle](../kb/SKILL.md) trustworthy as it **compounds** by catching **drift** — the decay a
growing knowledge base accumulates. Two passes: a **deterministic conformance** check (mechanical,
scripted) and a **drift audit** (fuzzy, judgment). Run both; report findings by severity. With
`fix`, repair what is safe.

## 1. Conformance (deterministic)

For a bundle-wide format or lifecycle migration, first inventory active metadata with the same
frontmatter-aware checker:

```
node "<skill-dir>/scripts/conformance.mjs" <bundle-dir> --inventory --json
```

The inventory parses only each concept's leading YAML frontmatter and reports body `# Citations`
separately. Its `observations` include counts and exact paths for every active top-level key and
status value; `legacy_citations` counts citation sections, numbered items, separately defined
footnote sources, total source records, and common citation shapes; `structured_sources` counts the
postflight concepts, entries, and entries carrying `resource`. An absent observation means zero. Do
not use repository-wide grep to classify active metadata because prose and fenced examples can contain
inactive field names and lifecycle values. Resolve every reported frontmatter error before planning
from the counts.

Run the bundled checker against the target bundle (default `knowledge/`). It is a zero-dependency
Node script (`node >=18`); `<skill-dir>` is this skill's directory — `${CLAUDE_SKILL_DIR}` under
Claude Code, or whatever path your host exposes for the skill:

```
node "<skill-dir>/scripts/conformance.mjs" <bundle-dir>
```

It reports **ERROR** for a hard [SPEC](../kb/references/SPEC.md) §11 failure and **warn** for
producer-profile defects in optional v0.2 fields, broken links, non-ISO log dates, and stale dates.
Optional-family warnings never make the bundle non-conformant. Broken links are explicitly
tolerated by §6.1.

**Completion criterion:** the checker has run and every ERROR it reported is listed for the report
(and fixed, if in `fix` mode).

## 2. Drift audit (judgment)

The checker can't see meaning. Audit the bundle for the ways a compounding artifact rots — this is
the legwork that makes lint worth running. Cover every check:

- **Contradictions** — concepts asserting conflicting facts that aren't linked `conflicts_with`.
- **Stale claims** — statements a newer source has superseded but that were never marked
  `superseded_by`; overviews behind their children.
- **Orphans** — concepts with zero inbound [cross-links](../kb/references/glossary.md) (index/log
  exempt; overviews exempt).
- **Missing cross-references** — concepts about the same entity/theme that don't link to each other.
- **Coverage gaps** — entities named repeatedly across concepts but lacking their own concept; data
  gaps a source or web search could fill.
- **Provenance gaps** — concepts making external claims with neither OKF v0.2 `sources` nor a legacy
  `# Citations` / Reference trail.
- **v0.2 metadata drift** — `sources` entries without `resource`, footnote labels without a matching
  `sources[].id`, malformed `generated`/`verified` actors or dates, invalid lifecycle values, and
  Attested Computations missing their required runtime or computation contract.
- **Repository drift** — for living repository documentation, missing paths in
  `sources[].resource`, evidence that no longer supports the documented behavior, or source changes
  since `spec/repository_state.md`'s `documented_revision` that affect a concept without a
  corresponding update. A lingering `documented_worktree: true` there requires comparison with the
  current working tree. Skip this check when repository evidence or Git history is unavailable.
- **Schema drift** — types used but absent from `spec/types.md`; documented types that no longer
  describe their concepts; spelling/case variants; or one overloaded type hiding several recurring,
  materially distinct entity kinds. Treat unused documented types as Info, not an error.

**Completion criterion:** every check above has been run across the whole bundle and its findings
recorded — not a sample.

## 3. Report

Present findings grouped by check, each tagged:

- **Error** — §11 conformance failures. The bundle is non-conformant until fixed.
- **Warning** — drift that degrades trust (contradictions, stale claims, orphans, broken links).
- **Info** — suggestions (coverage gaps, new concepts or sources worth adding).

Turn coverage gaps into concrete next moves: questions to investigate, sources to
[ingest](../kb-ingest/SKILL.md), or repository evidence to inspect through
[kb-document](../kb-document/SKILL.md). Append a dated summary (counts + notable findings) to the
bundle's `log.md` — append-only.

**Completion criterion:** a severity-grouped report is delivered and a `log.md` summary appended.

## Fix mode

If invoked with `fix`, repair only what is **safe and unambiguous**, then re-report what was fixed
vs. what needs a human:

- **Safe to auto-fix:** stale overviews (regenerate from children), missing cross-links, malformed
  log dates, broken links with an obvious target, index entries out of sync with files.
- **Never auto-fix:** anything that changes a claim's meaning. A contradiction or a stale *claim* is
  resolved by [ingest](../kb-ingest/SKILL.md) under the [trust model](../kb/references/trust-model.md)
  (**supersede**/**conflict**) — never by editing meaning in place here. Type renames, merges,
  splits, deprecations, and migrations also require user confirmation; report the proposed schema
  change and affected concepts together. Route living repository behavior that needs a meaning
  update to [kb-document](../kb-document/SKILL.md), which applies the trust model's narrow
  versioned-repository exception with source evidence and a revision log.

**Completion criterion:** every safe issue is fixed and every meaning-level issue is flagged (not
touched); the re-report distinguishes the two.

© stjbrown · MIT · stjbrown/agent-knowledge

Похожие скиллы

Все скиллы по теме «Настройка агента: память, контекст, субагенты» →
setup-matt-pocock-skills Matt Pocock Скилл настраивает репозиторий для инженерных скиллов Matt Pocock: задаёт трекер задач, метки триажа и расположение доменной документации. Запустите его перед первым использованием остальных скиллов. 1 052 851установок ask-matt Matt Pocock Помогает выбрать подходящий скилл или рабочий поток из набора Matt Pocock. Пригодится, когда непонятно, с чего начать задачу: от идеи до разбора бага. 766 587установок to-tickets Matt Pocock Разбивает план, спецификацию или переписку на небольшие сквозные задачи и отмечает, какие из них блокируют остальные. Пригодится, когда нужно согласовать порядок работы до публикации задач в трекере. 711 230установок writing-plans Jesse Vincent Скилл превращает требования к многошаговой задаче в подробный план реализации до начала работы с кодом. Пригодится, когда исполнителю нужно зафиксировать файлы, интерфейсы и проверки. CX Codex 282 859установок caveman-review JuliusBrussee Пишет замечания к коду одной строкой: место, проблема, исправление. Пригодится, когда ревью диффа или PR надо пройти быстро и без воды. CX Codex +1 411 800установок caveman-compress JuliusBrussee Сжимает CLAUDE.md, списки задач и другие текстовые файлы в краткий формат, сохраняя читаемую резервную копию. CX Codex +1 411 500установок

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

kb Скилл-хаб для организации памяти ассистента в формате OKF. Помогает структурировать базу знаний репозитория и направляет запросы к специализированным скиллам семейства kb. CX Codex +1 ★ 41звёзд репо kb-visualize Строит интерактивный граф понятий из knowledge bundle и показывает связи между ними. Выручает, когда нужно изучить весь набор или проследить связи вокруг одного понятия. CX Codex +1 ★ 41звёзд репо kb-query Скилл отвечает на вопросы по уже собранной базе knowledge/, а не ищет всё заново. Пригодится, когда в репозитории лежит готовый набор концепций. CX Codex +1 ★ 41звёзд репо kb-init Скилл создаёт в проекте каркас базы знаний OKF v0.2 и настраивает её схему под конкретную область. Пригодится, когда вы начинаете вики или добавляете набор в knowledge/. CX Codex +1 ★ 41звёзд репо kb-ingest Читает заметку, письмо, PDF или веб-страницу один раз и раскладывает извлечённые сущности и связи по базе knowledge/, чтобы знания не выводились заново на каждый запрос. CX Codex +1 ★ 41звёзд репо kb-document Создаёт и обновляет документацию репозитория внутри базы знаний OKF. Помогает зафиксировать архитектуру и связи в коде, не изменяя исходные файлы проекта. CX Codex +1 ★ 41звёзд репо

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

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