Awesome Docs Command
Generate, convert, and maintain animated Markdown documents with GitHub-safe SVG animations.
Mode: generate
Create a new animated Markdown document from scratch. Adapts structure and SVGs to the document type — not limited to demo docs.
Steps:
- Ask one at a time:
- Document type — what kind of document? Choose from:
readme,architecture-guide,runbook,tutorial,api-reference,how-it-works,rfc,post-mortem, orcustom(user defines sections) - Topic / subject — what is the document about? (e.g. "KEDA autoscaling", "orders-service API", "Kubernetes upgrade runbook")
- Output path — where should the file be written? (e.g.
README.md,docs/architecture.md,runbooks/keda.md) - Key components — the main moving parts, concepts, or resources covered (3–6 items)
- Document type — what kind of document? Choose from:
- Show the user an outline of the proposed document structure and which SVG patterns will apply:
- List the sections from the doc-type section map (see below) in order
- Next to each section that will get an SVG, note the pattern name: e.g.
Architecture → arch-flow - Ask: "Does this structure look right? Confirm to continue or describe what to change."
- Only proceed after explicit confirmation; adjust sections or pattern choices on request
- Classify which SVG patterns are relevant to this doc type and topic:
arch-flow— any doc that describes a system with multiple components or a data flowlifecycle-loop— docs covering a repeating control loop, approval cycle, or state machinesequence-diagram— docs covering request/response chains, API call sequences, or auth flowsstate-machine— docs covering distinct states and transitions (deployment lifecycle, approval workflow, error/retry paths)field-carousel— docs covering a configurable resource (YAML, HCL, JSON, or TOML); ask the user to paste their config at this point and identify the format before generatingtimeline-phases— docs covering distinct phases, stages, or a lifecycle with durations- For
rfc,post-mortem,runbook: SVGs are optional — ask "Would diagrams help here?" before generating
- For each applicable SVG pattern (incremental):
- Generate the SVG using the blueprint in
references/awesome-docs.md - Write to
assets/<topic-slug>-<pattern>.svg - Show to the user and ask: "Does this look right? Confirm to continue or describe what to adjust."
- Only proceed to the next SVG after explicit confirmation
- Generate the SVG using the blueprint in
- Build the document structure from the doc type section map below
- Write the file to the output path with all confirmed SVGs embedded using
<img>tags, each followed by a>blockquote caption - Commit:
git add <output-path> assets/ && git commit -m "docs(<scope>): add <doc-type> for <topic>"
Doc type section map — use these as the default structure, adapt to user needs:
| Doc type | Default sections |
|---|---|
readme | Header (title + badges), Overview, Architecture diagram (arch-flow), How it works, Getting started, Configuration (field-carousel if applicable), Examples, Troubleshooting |
architecture-guide | Overview, System diagram (arch-flow), Component responsibilities, Data flow, Scaling/state behavior (lifecycle-loop or state-machine), Configuration reference (field-carousel), Deployment phases (timeline-phases), Decisions & trade-offs |
runbook | Prerequisites, Health check commands, Architecture diagram, State/failure paths (state-machine if applicable), Step-by-step procedure, Validation, Rollback |
tutorial | Introduction, Prerequisites, Architecture overview (arch-flow), Request flow (sequence-diagram if API-heavy), Step-by-step walkthrough, What you built, Next steps |
api-reference | Overview, Authentication, Request flow (sequence-diagram), Endpoints, Request/response fields (field-carousel), Error codes, Examples |
how-it-works | Overview, Architecture diagram (arch-flow), Lifecycle/control loop (lifecycle-loop or state-machine), Request flow (sequence-diagram if applicable), Configuration fields (field-carousel), Load phases (timeline-phases if applicable) |
rfc | Context and problem, Proposal, Architecture diagram, Alternatives considered, Decision criteria, Open questions |
post-mortem | Incident summary, Timeline, Root cause analysis, Impact (state-machine of failure path if helpful), Action items, Lessons learned |
custom | Ask the user to list the sections they want, then generate them in order |
Theme parameter: append --theme github-dark (default), --theme docs-light, or --theme custom:#bg,#primary,#accent to override colors. See references/awesome-docs.md → Theme System.
If you need deeper context on SVG patterns, theme configuration, or the quality checklist, load references/awesome-docs.md.
Mode: convert
Animate an existing plain Markdown document by injecting SVGs in-place.
Steps:
- Ask: path to the existing Markdown file, or a directory path for batch mode (e.g.
docs/keda-guide.mdordocs/)- If a directory is given, discover all
.mdfiles recursively (find <dir> -name "*.md") and process each in turn; report a summary table when all files are done
- If a directory is given, discover all
- For each file: read it, extract all
##headings, and classify the doc type:readme→ arch-flow + field-carousel (if config block present)architecture-guide→ arch-flow + lifecycle-loop or state-machinerunbook→ arch-flow + state-machine (failure/recovery paths)tutorial→ arch-flow + sequence-diagram (if API calls shown) + field-carousel (if config present)api-reference→ sequence-diagram + field-carouselhow-it-works→ arch-flow + lifecycle-loop + field-carouselrfc→ arch-flow (optional — ask user)post-mortem→ state-machine (failure path, optional — ask user)unknown→ ask: "What type of doc is this?" and map to the closest type above
- Map each major section to the most appropriate SVG pattern based on the classified type
- For each SVG to inject (incremental — skip in batch mode, process all automatically):
- Check if
assets/<filename>.svgalready exists → if yes, ask: "An SVG with this name exists. Skip / Replace / Update?" - Generate SVG per blueprint in
references/awesome-docs.md - Show to user — confirm before inserting (skip confirmation in batch mode)
- Insert
<img src="assets/<filename>.svg" />+>blockquote caption immediately after the matching section heading
- Check if
- Commit:
git add <doc-path> assets/ && git commit -m "feat(awesome-docs): animate <doc-filename>"- In batch mode: single commit after all files:
git commit -m "feat(awesome-docs): animate docs in <dir>"
- In batch mode: single commit after all files:
Mode: update
Revise a single diagram in an existing animated doc.
Steps:
- Ask: doc path and which diagram to update (SVG filename or section name, e.g.
assets/keda-arch-flow.svgor "Architecture section") - Read the existing SVG to understand current layout
- Ask what needs to change: new component, corrected flow, different theme, timing adjustment
- Regenerate the SVG using the same blueprint, incorporating the changes
- Show the new SVG — confirm before writing
- Overwrite
assets/<filename>.svg - Commit:
git add assets/<filename>.svg && git commit -m "fix(awesome-docs): update <diagram-name> — <what changed>"
Mode: diff
Detect stale diagrams by comparing the current doc against a base ref.
Syntax: /platform-skills:awesome-docs diff [--base <branch|tag|SHA>] <doc-path>
If --base is omitted, defaults to HEAD.
Steps:
- Ask: path to the doc (e.g.
docs/architecture.md,README.md); optionally accept--base <ref>inline - Determine the base ref:
--baseprovided → use that ref directly- Not provided → use
HEAD
- Run:
git diff <base-ref> -- <doc-path>to see what changed since the base ref - Scan for staleness signals:
- Field count in YAML/config changed → field-carousel may be out of date
- New component mentioned in prose but not in arch-flow SVG
- Broken
<img>reference (file in doc but not inassets/) - Section added/removed that would change which SVG patterns apply
- New states or transitions described but not reflected in state-machine SVG
- New actors or message steps described but not reflected in sequence-diagram SVG
- Report a punch list:
[ ] <issue> — <file or section>— do not auto-fix - Include the base ref used:
(diffed against <ref>)at the top of the report - Suggest: "Run
/platform-skills:awesome-docs updatefor each flagged diagram."
Mode: audit
Quality-check an existing animated doc without making changes.
Steps:
- Ask: path to the doc
- Check each applicable item in the Quality Checklist from
references/awesome-docs.md:- Every SVG
<img>tag has a>blockquote caption immediately after it - No environment-specific IDs, account numbers, or hostnames in the doc or SVG files
- No SVG references a file outside
assets/(no externalhref, noxlink:href) - All SVG files under 50KB (larger files may not render inline on GitHub)
- Every SVG
- Report findings as a numbered list:
[PASS]or[FAIL] — <what to fix> - Print total:
X passed, Y failed
Mode: preview
Open the doc locally in a browser before committing.
Steps:
- Ask: path to the doc
- Start a minimal local HTTP server:
python3 -m http.server 8080 --directory .
- Tell the user the preview URL and how to open it:
- macOS:
open http://localhost:8080/<doc-path> - Linux:
xdg-open http://localhost:8080/<doc-path> - Windows:
start http://localhost:8080/<doc-path> - Or paste
http://localhost:8080/<doc-path>directly into your browser
- macOS:
- Tell the user: "Preview running at http://localhost:8080/
. Press Ctrl+C to stop the server."
Mode: export
Generate multi-format output from an existing animated doc.
Steps:
- Ask: path to the doc and target format:
html(Confluence/Notion) orpng(email/PDF) - For
html:- Read the doc
- Replace all
<img src="assets/...">references with inline SVG content (read each SVG file and embed it directly) - Wrap in a minimal
<!DOCTYPE html>page with<meta charset="utf-8">and no external dependencies - Write to
<doc-basename>-embed.html - Tell user: "Paste the contents of
<file>into a Confluence HTML macro or Notion embed block."
- For
png:- Do not run the export — document the manual step instead:
# Requires svgexport (npm install -g svgexport)for f in assets/*.svg; do svgexport "$f" "${f%.svg}.png" 2x; done
- Explain: "PNG export requires
svgexportor Puppeteer. Install withnpm install -g svgexportthen run the command above."
- Do not run the export — document the manual step instead: