docs-builder
БесплатноЗапускает вложенные скриптыНе проверенReorg a docs corpus, split an oversized doc, search it, keep pages current, index them
от hamr0★ 28 звёзд на GitHubОб этом скилле
docs-builder
Keep project docs current, complete and findable, and split a file when it outgrows its row in docs/index.md. Why it works this way, measured numbers and history: docs/product/docs-builder-README.md.
This does NOT make docs cheaper to read — never sell it as a token saving. Every mechanical step is the docs-builder.cjs script beside this file, the $DB path below (vanilla Node, zero deps). A model does two things only: classify and propose themes, and write pages.
- Heavy model work always spawns a worker, tier stated explicitly (an omitted tier inherits the parent's). Never name a vendor model. Hand the worker its inputs — it has no skill text of its own — and it does the work itself, no sub-spawning. Anything that asks the user stays in the main session. Fall back to inline only if your tool cannot spawn.
Setup
docs-builder.cjs sits next to this file in docs-builder/, installed or run from the package. Never search the target repo for it, never reconstruct it from this spec; if it exists nowhere, say so and stop. Set DB to its ABSOLUTE path, then cd to the target repo root:
DB=<absolute path to docs-builder.cjs>
cd <target repo root>
Every command below is node $DB …. Everything the script writes (docs/.docs-builder/* state, docs/index.md, docs/log.md, the ledger, the config pointer) lands under the target repo; REPO= is only needed when not running from its root.
Hard rules
- Only
.mdfiles are ever opened, read, edited or listed — a non-.mdfile is never touched, not even to report a mention. - Never moved, enforced in code:
README.md,index.md,log.md,CHANGELOG.md,LICENSE.md,CONTRIBUTING.md,CODE_OF_CONDUCT.md,SECURITY.md,CLAUDE.md,AGENTS.md,AGENT.md(case-insensitive, any depth), every dot-dir,node_modules/. - Nothing moves before the user approves the table. Only after approval does
apply-reorgrun; it refuses while any row'sbucketis empty. - Never split N files in one shot on a list the user has not seen.
reorgnever splits.cleanup <file.md>is the ONLY entry to the split pipeline: exactly one.mdfile, refuses a missing or protected one.cleanup-applyrefuses without alabels.jsonthat has exactly onecore: truetheme.- The original is always archived byte-identical (
git mvintodocs/archive/); every cleanup output is a new file, nothing edits a source doc. docs/index.mdhas exactly one writer:index-flat— never hand-edit it.- Never rewrite
CHANGELOG.mdorlog.mdlinks (any depth). Nothing underdocs/archive/is ever a rewrite target; links elsewhere that point at an archived file are still repaired. - Commit only through the printed pathspec recipe; never
git add -A,git add -uorgit commit -a.
Invocation
With an argument (reorg [dir], cleanup <file>, search <query words...>) run that mode directly, no question.
Bare /docs-builder — ALWAYS ask, never auto-detect. Run node $DB due first and put its one-line verdict in the question text. Then AskUserQuestion, one question, header Mode, exactly these two options:
Question: What should docs-builder do?
- First run — sort root-level
.mdfiles and everything underdocs/into product/wiki/logs/archive, then split anything too big into pages and index them. Use when docs are a pile of loose files, or docs-builder has never run here.- Docs drift — docs moved on since the last run: report what changed, rebuild the index, re-run lint. Nothing is restructured and nothing is split.
Do not offer a third option and do not recommend one. If due cannot run, say so plainly and ask anyway.
search is explicit-argument only, never a third picker option: /docs-builder search <query words...> runs node $DB search <query words...> (BM25 over docs/.docs-builder/outline.json, N= sets the result count, default 10; a first argument ending in .json is read as the outline path). Read-only, no model, nothing moves.
| Choice | Runs |
|---|---|
| First run | Reorg steps 1-3, then Finish; split each file the user picks (Cleanup), then Finish again |
| Docs drift | node $DB reorg, then Finish |
reorg [dir] / cleanup <file> |
those steps directly |
Buckets
product— docs about the product itself: specs, PRDs, designs. Flat.wiki— generic knowledge: conventions, how-tos, standards. Flat; also where split pages go.logs— one-time, timely records: POCs, experiments, incident write-ups, reports. The only bucket that nests, one level:docs/logs/<group>/.archive— self-declared dead. Frozen: never re-checked.docs/.docs-builder/is machine state (plan, outline, labels, tasks, ledger,commit-*.txt); never hand-edit it.
Reorg — a whole corpus
1. Discover — nothing moves, nothing is classified:
node $DB discover
Scope with no argument: .md files at t
Установить docs-builder в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditGrepGlobTaskAskUserQuestionBash(node:*)Bash(git:*)Bash(rg:*)Вложенные файлы
FAQ
Что делает скилл docs-builder?
Reorg a docs corpus, split an oversized doc, search it, keep pages current, index them
Как установить скилл docs-builder?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл docs-builder запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
agent-skill-stack
Find, evaluate, and assemble the smallest compatible set of AI Agent Skills for an end-to-end natural-language goal. Use when a user wants Skills for a…
от GitHubbuild-evidence-map
Build an auditable evidence map for a contested technical choice, research synthesis, proposal review, or consequential decision. Use when Copilot must…
от GitHubpinecone-rag
Build production RAG pipelines and persistent agent memory using Pinecone as the vector database backend. ALWAYS USE THIS SKILL when the user mentions…
от GitHubqdrant-monitoring-debugging
Diagnoses Qdrant production issues using metrics and observability tools. Use when someone reports 'optimizer stuck', 'indexing too slow', 'memory too high'…
от GitHub