From zenflow
Create or update project documentation. Use when adding new features, changing architecture, or when docs are missing or outdated. Generates README, ARCHITECTURE, API docs, and guides.
How this skill is triggered — by the user, by Claude, or both
Slash command
/zenflow:docsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create or update project documentation to match the current state of the codebase. Uses `.claude/zen.local.md` to discover where docs live in each project.
Create or update project documentation to match the current state of the codebase. Uses .claude/zen.local.md to discover where docs live in each project.
Announce at start: "I'm using the zenflow:docs skill to update documentation."
Documentation paths are configured in .claude/zen.local.md (project-level) or ~/.claude/zen.local.md (user defaults). Project-level overrides user defaults.
Read this file first. If it doesn't exist, ask the user where their docs live and create it.
# .claude/zen.local.md
---
docs:
readme: README.md
architecture: docs/ARCHITECTURE.md
claude: CLAUDE.md
changelog: CHANGELOG.md
paths:
- name: Guides
dir: docs/guides/
glob: "*.md"
- name: API Reference
path: docs/api-reference.md
- name: Deployment Runbooks
dir: docs/runbooks/
glob: "**/*.md"
---
Optional markdown body with project-specific documentation conventions,
audience notes, or style guidelines that the agent should follow.
Well-known files (top-level strings):
| Field | Type | Description |
|---|---|---|
docs.readme | string | Path to README |
docs.architecture | string | Path to architecture doc |
docs.claude | string | Path to CLAUDE.md (agent instructions) |
docs.changelog | string | Path to changelog |
Additional doc locations (docs.paths array):
Each entry is either a single file or a directory with a glob pattern.
| Field | Type | Description |
|---|---|---|
name | string | Human-readable label for this doc group |
path | string | Path to a single file (mutually exclusive with dir) |
dir | string | Path to a directory to scan (mutually exclusive with path) |
glob | string | Glob pattern to match files within dir (default: "*.md") |
All paths are relative to project root. Omit any field that doesn't apply.
How paths are resolved at runtime:
path entries → read directly via Read tooldir + glob entries → use Glob tool to discover all matching files, then read eachIf .claude/zen.local.md does not exist:
README.md, docs/, ARCHITECTURE.md, CLAUDE.md, CHANGELOG.md.claude/zen.local.md with the confirmed config.claude/zen.local.md — parse YAML frontmatter for doc paths, read body for conventionsgit diff --stat against the base branch or recent commitsPresent findings to the user via AskUserQuestion:
Question: "Which documentation should I create or update?"
Options based on what was found — only show options relevant to the project's config:
docs.custom that need updatesFor each document, follow these principles:
Accuracy over completeness:
Structure for scanning:
Audience awareness:
Keep it DRY:
Follow project conventions: If the markdown body of zen.local.md contains style guidelines or audience notes, follow them.
## [Feature Name]
[One sentence: what it does and why you'd use it.]
### Quick Start
\`\`\`bash
[exact command to try it]
\`\`\`
### Configuration
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `key` | string | `"value"` | What it controls |
### Examples
[2-3 real examples showing common use cases]
## [Component Name]
**Purpose:** [One sentence]
**Key files:**
- `path/to/main.ts` — [responsibility]
- `path/to/types.ts` — [responsibility]
**Data flow:**
[Source] → [Transform] → [Destination]
**Key decisions:**
- [Decision]: [Why] (not [Alternative])
getUser gets a user)npx claudepluginhub brewpirate/zen-flow --plugin zenflowAudits existing docs and generates full project documentation in docs/ including architecture.md, getting-started.md, development.md, API refs, and ADRs. For onboarding and context sharing.