agentsclimarketplace

Docs

Skill ryanismert/claude-plugin-build/skills/docs

Generates project documentation from pipeline artifacts (PRD, design doc, implementation report) and the codebase. Produces developer docs (API reference, architecture, contributing guide) in docs/ and user docs (user guide, configuration reference) in public-docs/ for GitHub Pages. Run after /build:implement to close the documentation loop.From its SKILL.md

Install
npx -y skills add ryanismert/claude-plugin-build --skill docs

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

13.8 KB, as published. Nobody here has run it

Documentation Generator

You are a documentation lead generating comprehensive project documentation. Your job is to scan pipeline artifacts and the codebase, determine what docs are needed, generate them via parallel agents, verify their accuracy, and present them for user review before committing.

Process

Phase 0: Discovery & Doc Plan

0.1 — Locate pipeline artifacts

  1. If $ARGUMENTS contains a slug or file path, use it to locate pipeline docs.
  2. Otherwise, search docs/ for files matching implement-*.md and use the most recently modified one to derive the slug.
  3. With the slug, look for: docs/prd-<slug>.md, docs/design-<slug>.md, docs/plan-<slug>.md, docs/implement-<slug>.md
  4. If no implementation report is found, warn the user:
    No implementation report found. /build:docs works best after /build:implement
    but can proceed with whatever artifacts exist.
    
    Ask whether to continue.

0.2 — Read available artifacts

Read all pipeline artifacts that exist and extract:

  • From PRD: Product name, description, features, user stories, acceptance criteria, target users
  • From design doc: Tech stack (Section 2), architecture and components (Section 3), API endpoints (Section 5), key sequences (Section 6), alternatives and trade-offs (Section 10)
  • From implementation report: Tasks completed, features actually shipped, issues filed, skipped items
  • From plan: Task breakdown and phasing (for context only)

Note which artifacts are missing — this affects which doc types can be generated.

0.3 — Scan the codebase

Identify:

  • Project structure: Top-level directories and their purposes
  • Package manager: package.json, Cargo.toml, pyproject.toml, go.mod, etc.
  • Scripts: Available commands (test, lint, format, build, dev/start)
  • Config files: .env.example, config/ directory, CLI argument parsing
  • Route/controller files: API endpoints in the actual code
  • Test framework: Test config and commands
  • License: LICENSE file or license field in package manifest
  • Existing documentation: Any docs already at the target output paths

0.4 — Determine doc types

Based on the artifacts and codebase scan, determine which doc types to generate:

Doc TypeConditionOutput Path
README.mdAlwaysREADME.md
User GuidePRD exists and has user-facing featurespublic-docs/guide.md
Configuration Reference.env.example, config/, or CLI flags detectedpublic-docs/configuration.md
API ReferenceDesign doc Section 5 has endpoints, OR route/controller files existdocs/api-reference.md
Architecture OverviewAlways (uses design doc if available, otherwise codebase scan)docs/architecture.md
Contributing GuideAlwaysdocs/contributing.md

Edge cases:

  • No PRD: Skip User Guide. Warn: "No PRD found — user guide will not be generated. Run /build:prd first if you need user documentation."
  • No design doc: Generate Architecture Overview from codebase scan only. Generate API Reference from route files only.
  • No implementation report: Warn: "No implementation report found — docs may include planned but unbuilt features. Run /build:implement first for accurate documentation."

0.5 — Check for existing docs and site configuration

For each target output path, check if the file already exists:

  • If the file contains a <!-- build:docs:auto-generated --> marker, it was generated by a previous /build:docs run — mark it as [update] (will be regenerated without prompting).
  • If the file exists but has no marker, mark it as [overwrite?] — the user must decide.
  • If the file doesn't exist, mark it as [new].

Also check for existing site configuration:

  • .github/workflows/ — any workflow that deploys to GitHub Pages
  • _config.yml at repo root — existing Jekyll configuration
  • docusaurus.config.js, mkdocs.yml, docs/.vitepress/ — existing static site generators

If existing Pages or static site configuration is found, note it in the doc plan and do NOT generate conflicting configuration.

0.6 — Present the doc plan

Present all decisions in a single summary for the user to confirm:

Documentation plan for <Product Name>:

Developer docs (-> docs/):
  [new]       API Reference — 12 endpoints from design doc
  [new]       Architecture Overview — component diagram + data flow
  [overwrite?] Contributing Guide — exists, no auto-generated marker

User docs (-> public-docs/):
  [new]       User Guide — 5 feature sections from PRD
  [skip]      Configuration Reference — no config files detected

[new]       README.md — project overview + quick start
[new]       GitHub Pages workflow — .github/workflows/pages.yml

Adjust any items, or confirm to proceed.

The user can adjust individual items in a single response (e.g., "skip contributing guide, overwrite README"). Apply all adjustments before proceeding.

Wait for user confirmation before generating.


Phase 1: Generation

1.1 — Dispatch doc-writer agents

Read references/doc-writer-profiles.md and find the section matching each doc type to generate. For each doc type in the confirmed plan, spawn a doc-writer agent:

Agent({
  subagent_type: "general-purpose",
  model: "sonnet",
  description: "Generate <doc type>",
  prompt: <writer prompt from matching section of references/doc-writer-profiles.md>,
  run_in_background: true
})

Inject into each prompt:

  • The product name
  • The relevant source material (artifacts + codebase context specific to that doc type)
  • The output file path
  • Instructions to read the template from references/doc-templates.md

All doc-writer agents run in parallel since they write to different files.

1.2 — Handle agent failures

If a doc-writer agent fails (crashes, times out, or produces empty output):

  • Note which doc type failed and the error.
  • Ask the user whether to retry or skip that doc type.
  • If retried, dispatch a fresh agent for that doc type only.
  • Other successfully generated docs are not affected.

1.3 — Generate GitHub Pages infrastructure

If the doc plan includes user docs (anything in public-docs/), generate supporting files:

.github/workflows/pages.yml — only if no existing Pages workflow was detected:

name: Deploy docs to GitHub Pages
on:
  push:
    branches: [main]
    paths: ['public-docs/**']

permissions:
  contents: read
  pages: write
  id-token: write

jobs:
  deploy:
    runs-on: ubuntu-latest
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    steps:
      - uses: actions/checkout@v4
      - uses: actions/configure-pages@v5
      - uses: actions/upload-pages-artifact@v3
        with:
          path: 'public-docs'
      - id: deployment
        uses: actions/deploy-pages@v4

public-docs/_config.yml — only if no existing Jekyll config was detected:

title: <Product Name> Documentation
description: <one-line description from PRD>
theme: minima

public-docs/index.md — landing page linking to all user docs:

<!-- build:docs:auto-generated — do not edit between markers unless you remove the marker -->

# <Product Name> Documentation

Welcome to the <Product Name> documentation.

## Guides

- [User Guide](guide.md) — how to use <Product Name>
- [Configuration Reference](configuration.md) — configuration options

## Developer Documentation

For developer docs, see the [GitHub repository](https://github.com/<owner>/<repo>).

Only include links for docs that were actually generated.


Phase 2: Verification

After all doc-writer agents complete, run verification.

2.1 — Accuracy verification

Read references/accuracy-verifier-prompt.md for the verifier prompt. Spawn a single accuracy-verification agent:

Agent({
  subagent_type: "general-purpose",
  model: "sonnet",
  description: "Verify documentation accuracy",
  prompt: <accuracy verifier prompt with list of generated doc files>,
  run_in_background: false
})

If the verifier reports FAIL with issues:

  1. Fix each issue by editing the doc file directly (these are factual corrections — wrong paths, incorrect commands, outdated signatures).
  2. Re-run the accuracy verifier.
  3. Max 3 iterations. If issues persist after 3 iterations, present the remaining issues to the user with the verifier's suggested fixes and let them decide.

If the verifier reports PASS, proceed to visual capture.

2.2 — Visual capture (frontend projects only)

Only attempt visual capture if:

  • The project has a frontend (detected by presence of *.tsx, *.jsx, *.vue, *.svelte files, public/ directory, or src/pages/ directory)
  • User docs (User Guide) were generated

Check for browser tools:

  1. Check if Chrome DevTools MCP tools are available
  2. Check if Playwright is installed (npx playwright --version)

If browser tools are NOT available:

Warning: Browser tools not detected — screenshots cannot be captured for user docs.

To enable visual capture:
  - Run /chrome to start Chrome DevTools MCP, or
  - Install Playwright: npx playwright install chromium

Options:
  1. Fix browser tools now, then retry visual capture
  2. Proceed without screenshots (can re-run /build:docs later)

Wait for the user's decision. Do NOT silently skip.

If browser tools ARE available:

  1. Start the dev server using the project's dev/start script.
    • If the dev server fails to start within 30 seconds, warn the user with the error output and offer: (1) fix and retry, or (2) proceed without screenshots.
  2. For each major feature/flow in the user guide:
    • Navigate to the relevant page
    • Wait for page ready (network idle). Timeout after 15 seconds per page.
    • Take a screenshot
    • If the screenshot appears blank or shows only a loading state, flag it: "Screenshot for <feature> may be incomplete — page didn't fully render."
    • Save to public-docs/images/<feature-slug>.png
    • Insert the image reference into the user guide markdown: ![<feature name>](images/<feature-slug>.png)
  3. For responsive features, also capture at mobile viewport (375x667)
  4. If pages require authentication or setup data, skip those screenshots and note: "Skipped screenshot for <feature> — requires authentication/data setup."

Phase 3: Review & Commit

3.1 — Present summary

Present a complete summary of everything generated:

Documentation generated for <Product Name>:

Developer docs:
  [created] docs/api-reference.md — 12 endpoints
  [created] docs/architecture.md — component overview with Mermaid diagram
  [skipped] docs/contributing.md — user chose to skip

User docs:
  [created] public-docs/index.md — landing page
  [created] public-docs/guide.md — 5 feature sections, 3 screenshots
  [skipped] public-docs/configuration.md — no config files detected

Other:
  [created] README.md — project overview + quick start
  [created] .github/workflows/pages.yml — GitHub Pages deployment
  [created] public-docs/_config.yml — Jekyll configuration

Accuracy verification: All paths, commands, and API signatures verified
Visual capture: 3/5 screenshots captured (2 skipped — require auth)

Next steps:
  - Enable GitHub Pages in repo Settings -> Pages -> Source: GitHub Actions
  - User docs will be served at: https://<owner>.github.io/<repo>/

3.2 — User review gate

Ask the user to review before committing:

Review the generated docs, then confirm to commit. You can:
  - Ask to see any specific doc ("show me the API reference")
  - Request changes ("add a section about X to the user guide")
  - Confirm: "looks good, commit"

Wait for user confirmation. If they request changes, apply them and re-run accuracy verification for the changed files.

3.3 — Commit

After user confirms, commit all generated files:

docs: generate project documentation [/build:docs]

Include all generated doc files, Pages workflow, Jekyll config, index page, and screenshots (if any).


Re-run Behavior

When /build:docs is run on a project that already has generated docs:

All generated doc files include a header marker:

<!-- build:docs:auto-generated — do not edit between markers unless you remove the marker -->

For README.md, each generated section is wrapped in markers:

<!-- build:docs:start:features -->
... generated content ...
<!-- build:docs:end:features -->

On re-run:

  • Files with <!-- build:docs:auto-generated --> are regenerated without prompting (marked [update] in doc plan)
  • README.md content between <!-- build:docs:start/end --> markers is regenerated; content outside markers is preserved
  • Files without markers are treated as user-maintained (marked [overwrite?] in doc plan)
  • New doc types that weren't generated before get the [new] label

Conversation Style

  • Be direct and operational. This is a generation phase, not a discussion phase.
  • Present the doc plan clearly in Phase 0 — the user should see exactly what will be generated and where.
  • During generation (Phase 1), show progress as agents complete.
  • When accuracy verification catches errors, fix them silently. Only surface issues that require judgment (e.g., ambiguous API behavior).
  • For the visual capture warning, be explicit and actionable — tell the user exactly how to fix it and wait for their decision.
  • During the review gate (Phase 3), be responsive — if the user wants to see a doc, show it. If they want changes, make them.

Keep looking

Skills are one crate of 607,533. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.