maintain-docs
Periodic documentation maintenance audit. Finds orphaned docs, detects drift between .cursor/rules/ and docs/developer/, validates doc correctness against…
от grafana★ 24 звезды на GitHub
Установить maintain-docs в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Documentation maintenance
A periodic skill that audits the documentation knowledge base, detects gaps and drift, validates correctness against the codebase, and opens PRs to incrementally close issues. Designed to be run repeatedly — each invocation checks previous PR outcomes to calibrate effort, uses a complexity budget to address the highest-priority findings, and tracks structural issues in a persistent backlog across runs.
For the architectural rationale behind this skill's design — including the materialized view concept, the distinction between code-coupled facts and human intent, and the prioritization philosophy — see intent.md.
Hard constraints
These constraints are absolute and override any other instructions:
- NEVER modify source code files. This skill may only create or edit markdown (
.md,.mdc) and text files. No.ts,.tsx,.js,.jsx,.json,.css, or any other code files — ever. This applies to all sub-agents invoked by this skill. - Before opening a PR, verify this constraint. Run
git diff --name-onlyand confirm every changed file ends in.mdor.mdc. If any source file appears, abort and report the violation. - Ignore
docs/design/entirely. Design documents are maintained by humans using the design-review skill. They are not documentation and are not in scope. - Do not rewrite documentation from scratch. This skill makes targeted, incremental edits. If a doc needs major restructuring, recommend it for separate work with a rationale — do not attempt it in this run.
- Run
npm run prettierbefore committing. The CI build chain requires formatted files. - NEVER commit or push directly to main. All changes must be on a feature branch submitted as a PR.
Duplication governance principle
The documentation has two tiers with distinct roles:
.cursor/rules/files: Compact, prescriptive agent constraints. What agents must do or must not do when working in a domain. These are loaded into agent context.docs/developer/files: Comprehensive reference documentation. How things work in detail, with examples and explanations. These are for deep dives.
When both tiers cover the same topic, the rule file should include a "For full reference, see docs/developer/..." link. Neither should duplicate the other's content verbatim. When drift is detected, the resolution is: check the codebase to determine which version is correct, update the incorrect version, then ensure the cross-reference link exists in both directions.
Design rationale in docs
Some docs/developer/ files contain design rationale — ## Key Design Decisions, ### Why X? subsections, or inline explanations of tradeoffs. This rationale is valuable context for agents making implementation decisions.
The maintain-docs skill treats design rationale as opportunistic, not systematic:
- When validating a doc for staleness, check whether existing rationale sections are still accurate against the code. Fix factual errors in rationale the same way you fix factual errors in any other section.
- When extracting rationale from code comments or design docs during a staleness fix, it is acceptable to add a brief
## Design notessection summarizing what was found — but only when there is substantial, citable content to extract. Every claim must cite its source (e.g.,(from code comment in X)or(from design doc Y)). - Never create stub sections with TODO placeholders. A doc with no design rationale section is better than a doc with an empty template prompting humans to fill it in. Those stubs become permanent debt.
- Never fabricate rationale. If the code and design docs don't contain clear rationale signals, leave the doc as-is. The absence of documented rationale is information, not a gap to be filled with guesses.
Maintenance backlog
The file docs/_maintenance-backlog.md is the skill's persistent memory across runs. It has three sections:
- Work items — structural recommendations and deferred issues that cannot be resolved through incremental edits (e.g., "rule file is too long and should be split," "two docs should be merged").
- Validated docs — a record of which docs were checked against their source code and found accurate, with the date of validation. This prevents the skill from re-checking docs that haven't meaningfully changed since last validation.
- Exclusions — files that have been reviewed and confirmed as not needing a routing entry. These are filtered out of orphan detection so the skill stops flagging them.
Rules for the backlog file:
- If the file does not exist, create it on the first run with the template below.
- Read it at the start of Phase 0 to incorporate carry-forward items, validated timestamps, and exclusions.
- Write to it at the end of Phase 3 — add new structural recommendations, remove resolved items, update validated timestamps, and add new exclusions.
- Each wo
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- intent.md
FAQ
Что делает скилл maintain-docs?
Periodic documentation maintenance audit. Finds orphaned docs, detects drift between .cursor/rules/ and docs/developer/, validates doc correctness against source code, tracks structural issues in a persistent backlog, and opens PRs to close highest-priority gaps per run. Use when the user asks to audit documentation, sync docs, or maintain the knowledge base.
Как установить скилл maintain-docs?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл maintain-docs запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…