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

knowledge-layers · haowjy, claude — скилл для Claude Code: хранение знаний

Скилл knowledge-layers для Claude Code распределяет знания проекта между локальной документацией, базой знаний и рабочими папками. Активируется при чтении или записи постоянной документации и выборе места для новых сведений.

Apache-2.0 441 установок ★ 601 обновлён 2026-10-25

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

Что делает knowledge-layers

Скилл помогает решить, где хранить сведения о проекте: рядом с кодом или документами, в базе знаний (KB) либо в рабочей папке задачи. AGENTS.md и .context/ описывают каталог, где лежат; KB хранит причины проектных решений и факты, не привязанные к одной директории; рабочая папка — ход текущей задачи, решения и открытые вопросы.

Для записи в AGENTS.md или .context/ сначала нужно загрузить /creative-writing-skills:qi-layer. Перед изменением KB скилл требует прочитать её AGENTS.md; для переноса или переименования страницы нужно исправить ссылки. Отложенные задачи, затрагивающие несколько каталогов или требующие внешней видимости, относятся к трекеру задач. Для обслуживания KB предусмотрены инструкции по сбору изменений и проверке актуальности страниц; /creative-writing-skills:md-validation проверяет ссылки и диаграммы.

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

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

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

  • Разбери, куда положить сведения о модуле: в AGENTS.md, .context/, KB или папку текущей задачи.
  • Подготовь постоянную запись о принятом решении и укажи причину и цену компромисса.
  • Проведи ревизию KB: найди устаревшие сведения и проверь ссылки.

Как установить knowledge-layers

1Через Skills CLI (Vercel)

npx skills add haowjy/creative-writing-skills --skill knowledge-layers -a claude-code

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

~/.claude/skills/knowledge-layers/SKILL.md

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

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

Вопросы о knowledge-layers

Как установить knowledge-layers в Claude Code?

Выполни npx skills add haowjy/creative-writing-skills --skill knowledge-layers -a claude-code. Файл скилла находится по пути ~/.claude/skills/knowledge-layers/SKILL.md.

Что делает knowledge-layers?

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

Что загрузить перед редактированием AGENTS.md или .context/?

Сначала загрузи /creative-writing-skills:qi-layer. Для записи в KB также нужно прочитать её собственный AGENTS.md.

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

SKILL.md · Apache-2.0
---
name: knowledge-layers
description: 'Use when deciding where knowledge goes or reading/writing durable docs: AGENTS.md and .context/ beside what they describe, the KB, and work directories.'
metadata:
  type: reference
---

# Knowledge Layers

Knowledge lives next to what it describes. Load `/creative-writing-skills:qi-layer` before writing
`AGENTS.md` or `.context/`.

## Three Places

| Place | What goes there | Reader |
|---|---|---|
| Beside what it describes (`AGENTS.md`, `.context/`) | Knowledge about this directory and what's in it (code, chapters, docs), and its deferred work in `.context/TODO` (must-do) and `FUTURE` (nice-to-have) | An agent about to work in the directory |
| KB | Why the project is the way it is, where no one directory owns the reason; domain concepts; facts about the outside world | A future agent or the owner, without this work's context |
| Work directory | This work item's state: what's in progress, its decisions and their reasons, open questions, scratch | Agents on this work item |

Colocate first. Knowledge about one part of the project goes in its
`AGENTS.md` or `.context/`, even when it reads like a concept: a doc far from
what it describes isn't updated when that thing changes. The KB holds what
would survive rewriting any one part. Deferred work that spans
directories or needs outside visibility goes to the issue tracker.

## The KB Records Why

A KB page says what the project does, or what the human chose it should
do, and why: the reason, the fact or
constraint behind it, and what would change it. The reason is the content.
An agent that knows it can tell when it stops holding; an agent given only
the verdict can only obey it. A rule whose reason nobody can state gets
deleted. State the behavior and its reason without names, quotes or session
IDs: a line lifted from a conversation reads as a ruling.

Organize by topic, not as a register of decisions: no decision IDs, no
`decisions/` tree, no lists of rejected options. Keep a rejected option only
with the fact that sank it ("a fixed request deadline killed healthy long
generations"). Without its reason it reads as a ban nobody can re-examine.

Two things reach the KB: what the human chose, and what finished work
established. An option they floated, a question they asked, or a list they
gave without picking stays in the work directory until they choose. Read how
they said it: "maybe X?" is not a choice, and a choice made with a hedge is
written "for now" or "trying".

Before writing about some work, read the docs, `AGENTS.md`, `.context/` and
comments it updated. Link to them and write only what they don't say. When
they say all of it, the KB gets a link or nothing.

## Every Choice Is a Tradeoff

Every choice a project records gave something up for what it gained, and
holds while that trade still pays. Write each as how things stand now, with
its reason and what it costs, beside the work it describes, so a later agent
can tell when the trade stops paying. Change it when the reason stops
holding or the human asks for something else (`/creative-writing-skills:intent-modeling`), and
update the page in the same change. A choice the human made, such as what
the product does for its users, changes when they say so: bring them the
evidence.

Write a choice as behavior and reason, not as a rule. Don't add a "must",
"never" or "always" the human didn't say, or a line for what a careful agent
protects unprompted, such as users' data or a passing build. Written down as
a rule, it gets applied past its reason: an agent told that users' data
must survive keeps code whose only job is to keep old links working.

Instructions about how agents work (permissions, approvals, what needs the
human, lessons from past mistakes) are not tradeoffs: follow them, and write
them as instructions.

## Current Truth

Every durable layer states the best current understanding and never
narrates its own history. Delete superseded content, and content whose
subject is gone, on sight, even with nothing to put in its place: agents
reason from what they load, and stale knowledge is worse than a gap.
Delete rather than move aside: version control is the archive, and a tree
without it, other than a work directory, gets a copy before you delete.
Commit untracked files before deleting them, and say in the commit message
what went and why. The agent that owns a tree's content deletes from it; a
structural role flags instead.

`AGENTS.md` and `.context/` describe the tree that contains them: update
them in the same change as what they describe. In a code project,
`resources/code.md` maps this onto branches and merges.

## KB Operations

A KB carries its own `AGENTS.md`, written per `/creative-writing-skills:qi-layer`. Read it before
writing; for that KB it wins over this skill. `resources/bootstrap.md` is a
starting layout for a new KB.

- **Ingest:** to capture a settled change, follow `resources/capture.md`.
- **Maintain:** when moving or renaming a page, fix every reference to it.
- **Sweep:** when asked, read each page in the tree against the project as
  it is now (the code, the other pages, the docs) and delete or correct what
  no longer holds: stale claims, contradictions, orphan pages, rules with no
  reason. `/creative-writing-skills:md-validation` checks links and diagrams.

Flag what needs the human inline, with the date and both sides:

```markdown
> [!FLAG] **Needs human review**: this page says X; `other-page.md` says Y.
> Both may be partly right. Flagged 2026-04-28.
```

© haowjy · Apache-2.0 · haowjy/creative-writing-skills

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

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

Сначала — knowledge-layers от других авторов.

knowledge-layers haowjy Скилл knowledge-layers для Claude Code решает, в какой слой проекта писать знание: AGENTS.md, .context/, KB, docs/ или рабочий каталог. Устраняет путаницу агента при поиске контекста. CX Codex +1 441установок layers-domain jamiemill Скилл layers-domain помогает зафиксировать терминологию, разногласия и границы контекстов предметной области до проектирования интерфейса. CX Codex +1 2 000установок layers-conceptual-model jamiemill Скилл layers-conceptual-model для Claude Code описывает объекты продукта, их связи, состояния и термины до проектирования интерфейса. Помогает зафиксировать меняющуюся модель предметной области. CX Codex +1 2 000установок firecrawl-knowledge-ingest firecrawl Скилл firecrawl-knowledge-ingest для сохранения сайтов документации, справочников и баз знаний в markdown или JSON. Работает с динамическим контентом, авторизацией и пагинацией — нужен API-ключ Firecrawl. CX Codex +1 31 600установок open-knowledge-discovery Inkeep Скилл open-knowledge-discovery подсказывает агенту, как устроен OpenKnowledge, как инициализировать проект и как открывать отдельные Markdown-файлы во временном предпросмотре без создания служебных папок. CX Codex +1 15 300установок okf-knowledge-base Inkeep Скилл okf-knowledge-base для Claude Code помогает создавать и проверять наборы знаний в формате OKF. Он включается при работе с OKF, предупреждениями плагина okf и выбором типов или ссылок. CX Codex +1 9 400установок retrieving-developer-knowledge официальный Google LLC Скилл retrieving-developer-knowledge для Claude Code находит актуальные данные в официальной документации Google. Извлекает параметры CLI, синтаксис API и правила IAM прямо в текущий диалог. CX Codex +1 4 100установок

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

Весь набор →
zoom-out Скилл zoom-out запускает параллельных «исследователей» по разным углам незнакомой области и собирает их отчёты в одну карту: структура, знания, история решений. CX Codex +1 443установок zoom-out Скилл zoom-out для Claude Code помогает освоиться в незнакомой части проекта. Он собирает карту структуры, знаний и истории решений по запросу сориентировать в коде. CX Codex +1 443установок structured-artifact Скилл structured-artifact для сборки структурированных HTML-артефактов: помогает агенту решить, как подать материал, и только потом выбрать инструменты. CX Codex +1 443установок qi-layer Скилл qi-layer задаёт правила описания контекста и ролей агентов в файлах AGENTS.md и .context/CONTEXT.md. Включается при настройке и поддержке системных инструкций проекта. CX Codex +1 441установок md-validation Скилл md-validation для Claude Code проверяет ссылки в Markdown и синтаксис Mermaid. Запускайте его после правок документации, до коммита. CX Codex +1 441установок md-validation Скилл md-validation для Claude Code проверяет ссылки в Markdown и диаграммы Mermaid. Он включается по запросу проверить ссылки или Mermaid перед сдачей материала. CX Codex +1 441установок knowledge-layers Скилл knowledge-layers для Claude Code решает, в какой слой проекта писать знание: AGENTS.md, .context/, KB, docs/ или рабочий каталог. Устраняет путаницу агента при поиске контекста. CX Codex +1 441установок qi-layer Скилл qi-layer задаёт правила, по которым агент пишет и поддерживает AGENTS.md и .context/CONTEXT.md, чтобы инструкции оставались короткими и рабочими. CX Codex +1 441установок

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

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