content-allocation
БесплатноБез исполняемых скриптовНе проверенOne topic, one home. Routes content to its canonical store (CLAUDE.md, PROJECT.md, MEMORY.md, docs/, memory/) and audits for duplication. TRIGGER when…
от akaszubski★ 35 звёзд на GitHubОб этом скилле
Content Allocation
A methodology for keeping project context lean and unambiguous. Every piece of content has exactly one canonical home; every other appearance is a one-line pointer.
Methodology: One Topic, One Home
Core rule: If a piece of content lives in two places, one of them is wrong. The canonical store owns the content; every other location is a one-line pointer to it.
Why this matters:
CLAUDE.mdandMEMORY.mdare loaded every turn. Every line there has compounding cost across the project's lifetime.- Duplication drifts. When the same fact lives in two files, the next edit will update one and leave the other stale.
- Readers (humans and assistants) waste tokens hunting through redundant copies for the authoritative version.
The pattern works in three moves:
- Identify the canonical home for a topic using the routing table below.
- Move the content to that home. Compress all other appearances to a single-line pointer (
See: docs/RUNBOOK.md). - Enforce size budgets so the canonical home does not bloat into a second copy of the wider docs tree.
Routing Table
The canonical stores in a typical Claude Code project, in load-order:
| Store | Loaded | Owns | Does NOT own |
|---|---|---|---|
~/.claude/CLAUDE.md (global) |
every turn, every repo | Assistant default behaviour; user's machines, SSH, session history queries | Anything project-specific |
CLAUDE.md (project root) |
every turn, this repo | Hard rules, gates, canonical paths, pointers, top-N gotchas | Vision, purpose, architecture, history, current state, deep reference |
.claude/PROJECT.md |
session start | Purpose, GOALS, SCOPE, CONSTRAINTS, alignment criteria, project philosophy | Behaviour rules; operational sequences; full architecture diagrams; current state |
memory/MEMORY.md + memory/*.md |
MEMORY auto-loaded; files retrievable | Durable lessons (with why), findings, calibration, active state | Hard rules; full architecture |
docs/RUNBOOK.md |
on demand | Operational sequences (periodic maintenance, batch finalize, resumes, common queries) | Architecture; rules |
docs/architecture/*.md |
on demand | High-level system architecture, layers, diagrams, ADRs | Behaviour rules; deep component internals |
docs/<TOPIC>.md (per-domain) |
on demand | Deep reference per topic (testing, security, hooks, libraries) | Behaviour; vision |
Plugin user-facing docs/*.md |
on demand | Shipped-with-plugin reference (commands, troubleshooting) | Maintainer-internal flows |
| GitHub issues | on reference | Current/open/closed work, decision threads | Anything else |
If a topic spans two stores: the narrative lives in PROJECT.md or docs/; the rule lives in CLAUDE.md; both reference each other as 1-line pointers.
Routing Decision Algorithm
When you have new content to place, walk this 9-step ordered list and stop at the first match:
- Does it change behaviour every turn? ("always do X / never do Y") →
CLAUDE.mdCritical Rules section. - Does it describe scope, purpose, or architecture? ("why this project exists, what's in/out of scope") →
.claude/PROJECT.md. - Is it a durable lesson + the why? ("we learned X because Y") →
memory/feedback_*.md(+ one-line index entry inMEMORY.md). - Is it active state or a current finding? ("session N discovered Z, still unresolved") →
memory/finding_*.md(+ index entry). - Is it an operational sequence? ("how do I do X — the steps") →
docs/RUNBOOK.md. - Is it reference data? (registries: hooks, agents, skills, libraries, commands) →
docs/<REGISTRY>.md. User-facing command catalogue → plugin'sdocs/COMMANDS.md. - Is it a pitfall or gotcha with a reproducer? → memory if recent and repeatable;
docs/<TOPIC>.mdif catalogued. - Is it deep architectural detail? →
docs/<TOPIC>.md(e.g.HOOK-COMPOSITION.md,SECURITY.md). - Is it a plugin-user-facing fix? → plugin's
docs/TROUBLESHOOTING.md.
If you reach step 9 without a match, the content is probably scratch work or belongs in a GitHub issue.
Size Budgets
Auto-loaded files have hard ceilings. Exceed them and you pay the cost every turn.
| File | Target | Hard ceiling | Why |
|---|---|---|---|
CLAUDE.md |
≤100 lines | 200 | Loaded every turn. A size-validation hook should warn above 200. |
.claude/PROJECT.md |
≤150 lines | 200 | Loaded at session start. Above 200 = operational drift, not architecture. |
MEMORY.md |
≤150 lines | 200 | Often truncated above 200 when auto-loaded. |
memory/*.md (individual) |
1–3 KB | 3 KB | >3 KB usually means it should be promoted to a docs/ page. |
Rules of thumb:
MEMORY.mdentries should be ≤150 chars per line. If you cannot summarise a finding in one line, the underlying file needs splitting.- Memory files below 500 bytes with no active finding should be compressed to an index entry or deleted
Установить content-allocation в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditBashGlobGrepFAQ
Что делает скилл content-allocation?
One topic, one home. Routes content to its canonical store (CLAUDE.md, PROJECT.md, MEMORY.md, docs/, memory/) and audits for duplication. TRIGGER when: auditing CLAUDE.md/PROJECT.md/MEMORY.md sizes, deduplicating docs, applying the content-allocation pattern to a new repo, running /align --content. DO NOT TRIGGER when: implementing features, writing tests, routine code edits, debugging.
Как установить скилл content-allocation?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл content-allocation запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic