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
tutorial-docs
Tutorial patterns for documentation - learning-oriented guides that teach through guided doing
fetch-pr-feedback
Fetch review comments from a PR and evaluate with receive-feedback skill
swift-testing-code-review
Reviews Swift Testing code for proper use of
rust-testing-code-review
Reviews Rust test code for unit test patterns, integration test structure, async testing, mocking approaches, and property-based testing. Covers Rust 2024 edition changes including async fn in traits for mocks,
explanation-docs
Explanation documentation patterns for understanding-oriented content - conceptual guides that explain why things work the way they do