con un clic
improve-doc
Analyze and improve existing documentation using Diataxis principles
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Analyze and improve existing documentation using Diataxis principles
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Use when you need a bite-sized, TDD-driven implementation plan but do NOT have a brainstorm-beagle spec to plan against. quick-plan reconstructs intent from the current conversation, fans out domain-expert exploration subagents across the codebase, and synthesizes the same plan format write-plan produces — without requiring `.beagle/concepts/<slug>/spec.md`. Triggers on: "quick plan", "plan this out", "plan what we just discussed", "turn this into an implementation plan", "plan this without a spec", "I don't have a spec, just plan it", "write-plan but no spec". Make sure to use this skill whenever the user wants an implementation or TDD plan and there is no spec to plan against — even if they just say "plan it" after discussing a feature. Writes to `.beagle/plans/<slug>/plan.md`. If a finalized spec already exists at `.beagle/concepts/<slug>/spec.md`, prefer write-plan. Does NOT brainstorm specs, write code, or execute the plan — produces the plan document (and an optional handoff prompt) only.
Use when the user has a fuzzy idea and wants to shape it into a concrete project spec before planning or building. Triggers on: "brainstorm this", "I have an idea for...", "help me think through this project", "what should I build", "spec this out". Also catches vague feature descriptions needing structured questioning to clarify scope. Does NOT write code, plan implementation, review strategy docs, or run strategy interviews — produces a WHAT/WHY spec through dialogue, not a HOW plan.
Use as the follow-up to brainstorm-beagle when a spec has an Open Questions section (or quietly carries latent gaps) that need closing before planning or implementation can begin. Triggers on: "resolve the open questions", "close the gaps in this spec", "research the open items", "finalize my spec", "make this spec implementation-ready", "answer the TBDs". Also triggers whenever the user points at a brainstorm-beagle spec and asks for research, proposals, or answers to unresolved items. Orchestrates parallel research subagents when available (falls back to inline sequential research otherwise), proposes answers one at a time for user approval, then rewrites the spec in place so it arrives at planning with no known gaps. Does NOT write code, design implementation, or create plans — it only produces a complete spec.
Use when you have a finalized brainstorm-beagle spec at `.beagle/concepts/<slug>/spec.md` and need a bite-sized, TDD-driven implementation plan before any code is written. Triggers on: "write a plan", "plan this spec", "turn the spec into a plan", "now plan the implementation", "write-plan". Reads the spec, designs the file structure, decomposes work into 2-5 minute TDD steps with exact paths and commands, self-reviews against the spec, gets user approval, then writes to `.beagle/concepts/<slug>/plan.md` and offers to generate an execution handoff prompt via the subagent-prompt skill. Does NOT brainstorm specs, write code, or execute the plan — produces the plan document (and an optional handoff prompt) only.
Core technical documentation writing principles for voice, tone, structure, and LLM-friendly patterns. Use when writing or reviewing any documentation.
Generate first-draft technical documentation from code analysis
| name | improve-doc |
| description | Analyze and improve existing documentation using Diataxis principles |
| disable-model-invocation | true |
Analyze an existing markdown document, classify sections by Diataxis type, identify issues, and interactively refine each section.
Invoke the improve-doc skill with a document path, e.g. improve-doc docs/guides/getting-started.md.
The skill runs in two phases:
Hard sequencing — advance only when the pass condition is met (artifact or explicit user input, not assumed).
Before Phase 2 (refinement):
# / ## / ### headings) cover every heading in the file; titles match the source.start to begin refinement, or abort to exit.
abort, no writes to Path. If start, proceed to Phase 2.Before overwriting the file (Phase 2, Step 4):
yes, unchanged skip, or modify loop finished with yes or skip.
modify state unless the user aborted the whole session (then do not write).skip matches the original section text (copy preserved, not paraphrased).
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.
Read the target markdown file and parse into sections based on headings:
#, ##, ### heading starts a new sectionLoad docs-style for core writing principles that apply to all documentation types.
For each section, determine the Diataxis type using these indicators (for the full decision procedure and the two key distinctions, see docs-style/references/diataxis-compass.md):
| Type | Indicators |
|---|---|
| Tutorial | "Let's", "we will", step-by-step learning, builds toward a project, minimal explanation of why |
| How-To | "How to" title, task-focused steps, assumes prior knowledge, goal-oriented |
| Reference | Parameter tables, type signatures, API specs, factual descriptions, no narrative |
| Explanation | "Why", "because", history, trade-offs, alternatives, conceptual discussion |
Classification rules:
For each section, check for issues based on its detected type:
Tutorial issues:
How-To issues:
Reference issues:
Explanation issues:
Cross-type issues (any section):
Display analysis summary to user:
## Document Analysis
**File:** `docs/guides/getting-started.md`
**Sections found:** 8
**Estimated time:** ~15 minutes to refine
### Type Breakdown
| Type | Sections | Health |
|------|----------|--------|
| Tutorial | 2 | 1 issue |
| How-To | 3 | 4 issues |
| Reference | 1 | Clean |
| Explanation | 1 | 2 issues |
| Mixed | 1 | Needs split |
### Top Issues
1. **Section "Setting Up"** (How-To): Contains explanatory tangent about architecture
2. **Section "Configuration Options"** (Mixed): Blends reference table with tutorial steps
3. **Section "Authentication"** (How-To): Missing prerequisites, steps not atomic
4. **Section "Why We Built This"** (Explanation): Includes procedural steps
### Ready to Refine?
I'll go through each section with issues. For each one, you can:
- **yes** - Accept the proposed improvement
- **skip** - Keep original, move to next section
- **modify** - Tell me what to change about the proposal
Type "start" to begin refinement, or "abort" to exit without changes.
As you encounter each section type, load the relevant skill if not already loaded:
For each section with issues, in document order:
---
## Section 3 of 5: "Setting Up" (How-To)
### Current Content
> ## Setting Up
>
> Before we begin, it's important to understand why the architecture
> works this way. The system uses a microservices pattern because...
> [explanatory content]
>
> To set up the project:
> 1. Clone the repo and install dependencies
> 2. Configure the environment variables
> 3. Start the server
### Issues Found
1. **Explanatory tangent** (lines 1-3): How-To should assume reader knows why; move explanation to dedicated Explanation section
2. **Non-atomic steps** (step 1): "Clone and install" is two actions; split into separate steps
3. **Missing verification**: No way to confirm setup succeeded
If the type classification is uncertain:
### Quick Question
This section has characteristics of both How-To (task steps) and Explanation (why content). How would you like to handle it?
1. **Split** - Create separate How-To and Explanation sections
2. **How-To** - Remove explanation, keep as pure How-To
3. **Explanation** - Remove steps, keep as pure Explanation
### Proposed Improvement
> ## Setting Up
>
> **Prerequisites:** Familiarity with microservices architecture
>
> ### Steps
>
> 1. Clone the repository
> ```bash
> git clone https://github.com/example/project.git
> ```
>
> 2. Install dependencies
> ```bash
> cd project && npm install
> ```
>
> 3. Configure environment variables
> ```bash
> cp .env.example .env
> ```
>
> 4. Start the server
> ```bash
> npm start
> ```
>
> ### Verify
>
> Open http://localhost:3000 - you should see the welcome page.
**Changes made:**
- Removed explanatory content (suggest creating "Architecture Overview" section)
- Split "clone and install" into separate steps
- Added verification step
- Added prerequisites reference
---
**Your choice:** [yes / skip / modify]
yes - Apply the proposed changes to the section, continue to next
skip - Keep original content unchanged, continue to next
modify - User provides feedback:
> modify: Keep the explanation but move it to a collapsible "Why?" block
### Revised Proposal
> ## Setting Up
>
> <details>
> <summary>Why this architecture?</summary>
>
> The system uses a microservices pattern because...
>
> </details>
>
> ### Steps
> [same as before]
**Your choice:** [yes / skip / modify]
For sections classified as "Mixed":
---
## Section 5 of 5: "Configuration Options" (Mixed)
### Current Content
> ## Configuration Options
>
> Let's walk through configuring your application. First, you'll need
> to understand the available options:
>
> | Option | Type | Default | Description |
> |--------|------|---------|-------------|
> | port | number | 3000 | Server port |
> | debug | boolean | false | Enable debug mode |
>
> Now let's configure each one step by step...
### Issues Found
1. **Mixed types**: Tutorial framing ("Let's walk through") with Reference content (options table)
### Recommendation
Split into two sections:
1. **Reference section** - "Configuration Reference" with the options table
2. **Tutorial section** - "Configuring Your First App" with learning-oriented walkthrough
Would you like me to:
1. **Split** - Create both sections
2. **Reference only** - Keep just the table, remove tutorial framing
3. **Tutorial only** - Expand into full tutorial, move table to appendix
After all sections processed:
## Refinement Complete
**File:** `docs/guides/getting-started.md`
### Changes Summary
| Section | Action | Type |
|---------|--------|------|
| Setting Up | Improved | How-To |
| Configuration Options | Split | Reference + Tutorial |
| Authentication | Improved | How-To |
| Why We Built This | Skipped | Explanation |
### Sections Modified
- **Setting Up**: Removed tangent, split steps, added verification
- **Configuration Options**: Split into "Configuration Reference" and "Configuring Your App"
- **Authentication**: Added prerequisites, made steps atomic
### New Sections Created
- **Configuration Reference** (Reference): Options table from split
- **Configuring Your App** (Tutorial): Learning walkthrough from split
### Recommendations
Consider creating these additional documents:
- `docs/explanation/architecture-overview.md` - For content removed from "Setting Up"
The original file has been updated.
docs-style skill before analysis