improve-doc
Analyze and improve existing documentation using Diataxis principles
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/anderskev/improve-docImprove Doc
Analyze an existing markdown document, classify sections by Diataxis type, identify issues, and interactively refine each section.
Arguments
- Path: Path to the markdown document to improve (required)
Workflow Overview
/beagle-docs:improve-doc docs/guides/getting-started.md
The command runs in two phases:
- Analysis Phase: Parse document, classify sections, identify issues
- Refinement Phase: Interactive loop to improve each section
Gates
Hard sequencing — advance only when the pass condition is met (artifact or explicit user input, not assumed).
Before Phase 2 (refinement):
- Read — Full contents of the file at Path are loaded.
- Pass: Enumerated sections (from
#/##/###headings) cover every heading in the file; titles match the source.
- Pass: Enumerated sections (from
- Core skill —
beagle-docs:docs-styleis loaded (or its path read) before classification.- Pass: Analysis output reflects at least one concrete principle from that skill (name it or quote briefly).
- Handoff — User saw an analysis summary (template in Step 5 or equivalent) and entered
startto begin refinement, orabortto exit.- Pass: If
abort, no writes to Path. Ifstart, proceed to Phase 2.
- Pass: If
Before overwriting the file (Phase 2, Step 4):
- Choices — Every section with open issues has a terminal outcome: applied
yes, unchangedskip, ormodifyloop finished withyesorskip.- Pass: No section left in a pending
modifystate unless the user aborted the whole session (then do not write).
- Pass: No section left in a pending
- Skips — Content for every
skipmatches the original section text (copy preserved, not paraphrased).- Pass: Full block equality check against the initial read (line-for-line, including whitespace).
- Write — Only after the above.
- Pass: Single save to Path; completion report notes backup or major restructure if applicable (Rules).
Ambiguous Diataxis type — If classification is uncertain, do not edit that section until the user answers the clarifying fork (Step 2b) or explicitly confirms your stated default.
Phase 1: Analysis
Step 1: Read Document
Read the target markdown file and parse into sections based on headings:
- Each
#,##,###heading starts a new section - Capture heading level, title, and content
- Preserve hierarchy for context
Step 2: Load Core Skill
Load beagle-docs:docs-style for core writing principles that apply to all documentation types.
Step 3: Classify Each Section
For each section, determine the Diataxis type using these indicators:
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-anderskev-improve-doc": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
explanation-docs
Explanation documentation patterns for understanding-oriented content - conceptual guides that explain why things work the way they do
tutorial-docs
Tutorial patterns for documentation - learning-oriented guides that teach through guided doing
pytest-code-review
Reviews pytest test code for async patterns, fixtures, parametrize, and mocking. Use when reviewing test_*.py files, checking async test functions, fixture usage, or mock patterns.
reference-docs
Reference documentation patterns for API and symbol documentation. Use when writing reference docs, API docs, parameter tables, or technical specifications. Triggers on reference docs, API reference, function reference, parameters table, symbol documentation.
serde-code-review
Reviews serde serialization code for derive patterns, enum representations, custom implementations, and common serialization bugs. Use when reviewing Rust code that uses serde, serde_json, toml, or any serde-based serialization format. Covers attribute macros, field renaming, and format-specific pitfalls.