home / skills / athola / claude-night-market / doc-generator

doc-generator skill

/plugins/scribe/skills/doc-generator

This skill generates and refines documentation with a grounded, style-aligned voice, delivering human-quality content tailored to audience and purpose.

npx playbooks add skill athola/claude-night-market --skill doc-generator

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
5.1 KB
---
name: doc-generator
description: Generate or remediate documentation with human-quality writing and style
  adherence. Use when creating new documentation, rewriting AI-generated content,
  or applying style profiles. Do not use for slop detection only (use slop-detector)
  or learning styles (use style-learner).
category: artifact-generation
tags:
- documentation
- writing
- generation
- remediation
- polish
tools:
- Read
- Write
- Edit
- TodoWrite
complexity: medium
estimated_tokens: 1600
progressive_loading: true
modules:
- generation-guidelines
- remediation-workflow
- quality-gates
dependencies:
- scribe:shared
- scribe:slop-detector
---

# Documentation Generator

Documentation must be grounded in specific claims rather than abstract adjectives. We avoid filler phrases like "In today's fast-paced world" and focus on delivering useful information directly. Each claim should be supported by evidence, such as specific version numbers or request rates, rather than vague descriptors like "comprehensive."

## Core Writing Principles

We prioritize authorial perspective and active voice to maintain a consistent team tone. This involves explaining the reasoning behind technical choices, such as selecting one database over another, rather than providing neutral boilerplate. Bullets should be used sparingly for actionable summaries; multi-line bullet waterfalls should be converted to short paragraphs to preserve nuance.

### Vocabulary and Style

Avoid business jargon and linguistic tics like mirrored sentence structures or excessive em dashes. We use the imperative mood for docstrings (e.g., "Validate input") and strictly avoid humanizing non-living constructs like code.

| Instead of | Use |
|------------|-----|
| fallback | default, secondary |
| leverage | use |
| utilize | use |
| facilitate | help, enable |
| comprehensive | thorough, complete |

### 9. Limit Humanizing Constructs

"Lives under," "speaks to," and similar phrases only make sense for living things.

### 10. Imperative Mood for Docstrings

"Validate" not "Validates" (per PEP 257, pydocstyle, ruff).

## Required TodoWrite Items

1. `doc-generator:scope-defined` - Target files and type identified
2. `doc-generator:style-loaded` - Style profile applied (if available)
3. `doc-generator:content-drafted` - Initial content created
4. `doc-generator:slop-scanned` - AI markers checked
5. `doc-generator:quality-verified` - Principles checklist passed
6. `doc-generator:user-approved` - Final approval received

## Mode: Generation

For new documentation:

### Step 1: Define Scope

```markdown
## Generation Request

**Type**: [README/Guide/API docs/Tutorial]
**Audience**: [developers/users/admins]
**Length target**: [~X words or sections]
**Style profile**: [profile name or "default"]
```

### Step 2: Load Style (if available)

If a style profile exists:
```bash
cat .scribe/style-profile.yaml
```

Apply voice, vocabulary, and structural guidelines.

### Step 3: Draft Content

Follow the 10 core principles above. For each section:

1. Start with the essential information
2. Add context only if it adds value
3. Use specific examples
4. Prefer prose over bullets
5. End when information is complete (no summary padding)

### Step 4: Run Slop Detector

```
Skill(scribe:slop-detector)
```

Fix any findings before proceeding.

### Step 5: Quality Gate

Verify against checklist:
- [ ] No tier-1 slop words
- [ ] Em dash count < 3 per 1000 words
- [ ] Bullet ratio < 40%
- [ ] All claims grounded with specifics
- [ ] No formulaic openers or closers
- [ ] Authorial perspective present
- [ ] No emojis (unless explicitly requested)

## Mode: Remediation

For cleaning up existing content:

Load: `@modules/remediation-workflow.md`

### Step 1: Analyze Current State

```bash
# Get slop score
Skill(scribe:slop-detector) --target file.md
```

### Step 2: Section-by-Section Approach

For large files (>200 lines), edit incrementally:

```markdown
## Section: [Name] (Lines X-Y)

**Current slop score**: X.X
**Issues found**: [list]

**Proposed changes**:
1. [Change 1]
2. [Change 2]

**Before**:
> [current text]

**After**:
> [proposed text]

Proceed? [Y/n/edit]
```

### Step 3: Preserve Intent

Never change WHAT is said, only HOW. If meaning is unclear, ask.

### Step 4: Re-verify

After edits, re-run slop-detector to confirm improvement.

## Docstring-Specific Rules

When editing code comments:

1. **ONLY modify docstring/comment text**
2. **Never change surrounding code**
3. **Use imperative mood** ("Validate input" not "Validates input")
4. **Brief is better** - remove filler
5. **Keep Args/Returns structure** if present

## Module Reference

- See `modules/generation-guidelines.md` for content creation patterns
- See `modules/quality-gates.md` for validation criteria

## Integration with Other Skills

| Skill | When to Use |
|-------|-------------|
| slop-detector | After drafting, before approval |
| style-learner | Before generation to load profile |
| sanctum:doc-updates | For broader doc maintenance |

## Exit Criteria

- Content created or remediated
- Slop score < 1.5 (clean rating)
- Quality gate checklist passed
- User approval received
- No emojis present (unless specified)

Overview

This skill generates and remediates technical documentation with human-quality writing and strict style adherence. It produces new READMEs, guides, API docs, tutorials, and targeted docstring edits while enforcing vocabulary, voice, and quality gates. Use it to convert rough drafts or AI output into precise, evidence-backed documentation.

How this skill works

The skill identifies scope and loads a style profile when available, then drafts content following core writing principles: active voice, authorial perspective, imperative docstrings, and claims grounded in specifics. It runs an AI slop detector, applies remediation rules section-by-section, and verifies a checklist of required todo items before requesting user approval.

When to use it

  • Create a new README, guide, API reference, or tutorial from scratch
  • Rewrite AI-generated documentation to match team voice and standards
  • Apply a style profile to existing docs to ensure consistency
  • Clean up and shorten docstrings without touching code
  • Remediate large files incrementally to reduce slop score

Best practices

  • Define scope up front: type, audience, length target, and style profile
  • Prefer short, specific claims with evidence (versions, request rates, examples)
  • Use prose over multi-line bullet waterfalls; reserve bullets for concise summaries
  • Run the slop detector and fix findings before finalizing content
  • Preserve author intent when editing; never change code while editing docstrings

Example use cases

  • Generate a developer-focused README with installation, usage, and troubleshooting sections using a team style profile
  • Remediate an AI-drafted API reference: replace vague adjectives with concrete examples and version numbers
  • Edit docstrings across a module: keep Args/Returns, switch to imperative mood, and remove filler without altering code
  • Process a long guide in sections: scan, propose edits, get approval, then apply changes and re-run slop detector

FAQ

What outputs does the skill produce?

Structured drafts for READMEs, guides, API docs, tutorials, and targeted docstring edits, plus a verification report showing slop score and checklist status.

How does it handle existing style profiles?

If a style profile is present, the skill loads and applies vocabulary, voice, and structural rules before drafting or remediating content.