agentsclimarketplace

Prettier svg docs

Skill apatheticus/skills/skills/prettier-svg-docs

Create and maintain a repository's standard documentation — README, ARCHITECTURE, DEVELOPMENT, DEPLOYMENT, CONTRIBUTING, CODE_OF_CONDUCT, SECURITY, SUPPORT, plus on-demand LICENSE, NOTICE, issue/PR templates, and CODEOWNERS — and beautify it with a per-repo design system, a 27-type diagram grammar, and seamless-loop animated SVG authored directly, with zero external dependencies — no renderer, nothing to install. Every diagram is checked for orthogonal connectors, label geometry, contrast and a seam-exact loop before it may be embedded.From its SKILL.md

Install
npx -y skills add apatheticus/skills --skill prettier-svg-docs

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

One thing to look at

  • 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

25.5 KB, as published. Nobody here has run it

prettier-svg-docs

Create and maintain a repository's standard documentation so it reflects the actual current truth of the project — then make it genuinely beautiful: a frozen per-repo design system, a chosen visual style, an animated hero, and seamless-loop animated SVG diagrams where they earn their place, hand-authored and embedded so they render on GitHub.

Nothing is rendered. The .svg you write is the committed asset. Everything the skill needs is python3 and its own bundled scripts, so a run never dies on a missing toolchain.

Three principles govern everything:

  • Honesty over polish. A short, accurate doc beats a long plausible one. Never describe tests, CI, tooling, or architecture the repo doesn't contain. A visual asserts facts with more authority than prose, so every diagram — animated or static — depicts only verifiable structure, and records which facts it depicts in its manifest.
  • Visuals enhance, never decorate. Each doc is written for its audience (see the matrix below), and a visual exists only where it communicates something to that audience faster than text would.
  • Style is a decision, not a mood. The look is one named idiom, resolved once, written into the design system, and applied to every visual in the repo.

Preflight (probe and warn — never a STOP)

command -v python3          # required by both bundled scripts
  • python3 missing → warn loudly and run content-only. Every visual becomes DEFERRED; report why. Don't attempt a visual you can't gate.
  • Note whether a browser tool is available (Playwright, claude-in-chrome). Without one, the pixel-read step is skipped and reported, never silently passed.
  • Nothing else to check. There is no renderer, no ffmpeg, no img2webp, no CLI, and no network dependency.

Documents in scope

Tier 1 — managed on every default run: README · ARCHITECTURE · DEVELOPMENT · DEPLOYMENT · CONTRIBUTING · CODE_OF_CONDUCT · SECURITY · SUPPORT

DEPLOYMENT is signal-gated: written only when the evidence pass finds a real deploy target (platform config, container/IaC artefacts, a deploying CI workflow, migrations plus a service). No signal → report it N/A — no deploy target and write nothing; publish/release mechanics stay in DEVELOPMENT and CONTRIBUTING. The signal list and the DEVELOPMENT boundary are in reference/deployment.md.

Tier 2 — only when explicitly named or a clear signal demands it: LICENSE · NOTICE · .github/ISSUE_TEMPLATE/* · PULL_REQUEST_TEMPLATE.md · CODEOWNERS

Out of scope: CHANGELOG (release tooling owns it) and product/spec docs.

Each doc has a spec in reference/ (Tier 2 under reference/tier2/). Shared conventions live in reference/house-style.md — read it first on every run, then the spec for each doc you touch. Before any embed or audit read reference/embedding.md; before authoring any visual read reference/viz-production.md and reference/svg-animation.md.

Filenames: outputs use conventional uppercase names (README.md, SECURITY.md, …). Match existing files case-insensitively; keep a repo's existing convention rather than creating duplicates.

Invocation modes

InvocationEffect
/prettier-svg-docsFull pass over Tier 1: content + visuals
/prettier-svg-docs <target> [<target>…]Only the named docs (readme, deployment, security, …; Tier 2 by explicit name)
/prettier-svg-docs checkRead-only audit — content verdicts (CREATE/UPDATE/OK) and visual verdicts (OK/MISSING/STALE/DRIFT/CONTRADICTS/BUDGET/FOREIGN). Writes nothing.
--style <slug|free-form>Set the visual style for this repo (see below). Persisted; re-runs reuse it.
--style autoForce re-derivation of the style from product identity, ignoring the stored slug
--refresh-vizForce re-authoring of every in-scope visual regardless of hashes
--no-vizContent-only run; leave every existing visual and marker untouched
--budget <doc>=<n>Override a doc's animated-visual budget for this run (e.g. --budget readme=1)
--brief / --fullProse-depth override (see house-style → Sizing). Independent of the visual budget.

Styles

Thirty-two named idioms, one chosen per repo, listed alphabetically:

bento-grid · blueprint · brushed-metal · claymorphism · codex-leonardo · console-elbow · digital-rain · draughtsman-notebook · editorial · flat-material · glassmorphism · holographic-projection · hud · ide-dark · isometric-3d · lofi-wireframe · maximalist · neo-brutalist · neumorphism · oil-impasto · patent-drawing · pencil-lined-paper · rough-sketch · schematic · skeuomorphic · soft-vinyl · swiss-minimal · terminal-minimalist · watercolor · whiteboard-marker · wood-grain · y2k-retrofuturist

Common aliases resolve without asking (brutalist, glass, soft-ui, swiss, material, clay, y2k, tui, cli, bento, technical-drawing, excalidraw, hologram, lcars, patent, wireframe, whiteboard, impasto, …). A free-form name that names a genuinely recognisable idiom is synthesized into a full spec; anything unresolvable prompts one question. Nothing specified → derived from the product, exactly as before this option existed.

Every style ships a full-width specimen at docs/samples/<slug>.svg, embedded at the top of its spec file, showing the same Source → Transform → Store diagram so the idioms are directly comparable. docs/assets/styles.svg is the contact sheet of all thirty-two, composed from those specimens rather than redrawn.

Each style also declares a fidelity floor — the primitives its material is built from, a minimum filter-chain depth, and a minimum drawn density. svg_check.py enforces it and reports what each visual achieved, so a style cannot be rendered as a flat imitation of itself and still gate clean. See styles.md.

Two dials cut across the catalog and are usually the right answer when a request lands between two styles: roughness (the hand-drawn family is one displacement scale, 0.7 ruled → 4.5 improvised) and grain ratio (the material family is one feTurbulence x:y ratio, equal → isotropic, extreme → directional). Move the dial rather than inventing a style.

Three cautions the catalog cannot design away, all detailed in reference/styles.md: display fonts are never fetched and degrade to system handwriting faces; watercolor, oil-impasto and lofi-wireframe are decorative — their contrast floor is not relaxed, so each names the move that earns its labels back; and console-elbow, holographic-projection and digital-rain reproduce a visual language only — decline to add logos, insignia, wordmarks or fictional alphabets on request rather than treating them as a customisation option.

Style owns form; the product's brand tokens still own the palette. Full rules and the resolution ladder: reference/styles.md.

Audience matrix

DocAudienceVisual treatment
READMEEveryone; first visitAnimated hero + up to 3 animated diagrams; rich alt text, no Mermaid fallback. Purpose/solution/getting-started/usage only — repo-process detail links out to DEVELOPMENT/DEPLOYMENT/CONTRIBUTING.
ARCHITECTUREEngineers1–2 flagship animated diagrams, each + collapsed <details> Mermaid source; rest static SVG or plain Mermaid
DEVELOPMENTEngineersSame treatment as ARCHITECTURE
DEPLOYMENTOperators/engineers deploying itSame treatment as ARCHITECTURE; created only when a deploy target exists
CONTRIBUTINGEngineers/contributorsSame treatment as ARCHITECTURE
SECURITYEveryone; prescriptiveOne attention banner: "report privately, never a public issue"
CODE_OF_CONDUCTEveryone; prescriptiveOne attention banner: the core conduct expectation; covenant body untouched
SUPPORTUsers seeking helpStatic designed header at most
LICENSE / NOTICELegalNone. Ever. Verbatim legal text; no markers, badges, or formatting.

Visual budget (defaults; --budget overrides per run)

DocAnimatedStatic SVG
READMEhero + ≤3 diagramsas needed
ARCHITECTURE / DEVELOPMENT / DEPLOYMENT / CONTRIBUTING1–2 flagship eachremaining diagrams
SECURITY / CODE_OF_CONDUCT≤1 (the banner; static also fine)—
SUPPORT0≤1 header
LICENSE / NOTICE / templates / CODEOWNERS0 — hard gate0 — hard gate

The budget is about the reader's attention, not about cost. Authoring an SVG is cheap now — which is exactly why the budget matters more, not less. A doc where everything moves has nothing to draw the eye. A diagram that wouldn't earn a place in a printed engineering doc doesn't get animated.

Per asset: warn at 60 KB, hard fail over 150 KB. Loops run 8–14s and are seam-exact. Under-spending the budget is always allowed.

Target layout (the skill maintains this)

One block per project. A repo documenting several projects repeats it per project root — see design-system.md → What counts as a project.

<project>/docs/assets/<viz-name>.svg   # committed — the asset AND its own source
<project>/.prettydocs/
├── .gitignore                     # committed — byproduct rules, self-contained
├── prettydocs.md                  # committed — frozen design system + resolved style
└── src/<viz-name>/
    ├── viz.json                   # committed — facts, hashes, svg params (embedding.md)
    └── _qa/                       # gitignored — filmstrip.html, phase_*.png

Rendered assets stay under docs/assets/ so a deployment can exclude the whole .prettydocs/ machinery and still serve every embedded visual. Because the committed .svg is the source here, .prettydocs/src/<viz-name>/ holds only the manifest and the gitignored QA harness.

Ignore rules go in <project>/.prettydocs/.gitignore, not the project's root one. A pattern containing a slash anchors to its own .gitignore's directory, so this resolves correctly and the folder stays self-contained:

src/**/_qa/

Pre-existing repos may carry the older layout — docs/assets/src/DESIGN.md with the per-visual state beside it. Offer the migration (design-system.md → Migrating a project off the old layout); never write a second system alongside the first. Every hash is taken over file bytes, so the move re-renders nothing.

Workflow

Run the phases in order. Don't skip the evidence pass.

1. Evidence pass

Gather facts in priority order (later never overrides earlier): existing docs → manifests/lockfiles → repo signals (LICENSE, CI workflows, CLAUDE.md/AGENTS.md are first-class) → code structure → git (remote/forge, default branch). Detect project type and forge (house-style → Host awareness / Project-type adaptation). Derive a copyright-holder candidate via the ladder in house-style → identity guardrail: authoritative repo sources first, then the forge-owner lookup (an organisation account's display name is auto-used; a user-account name or git config user.name only becomes the pre-filled default for phase 4; the OS username is never a candidate). Additionally detect the product's visual identity: logos/icons, brand tokens (CSS custom properties, Tailwind config, theme files), an existing style guide or DESIGN.md. These feed phase 2. Also resolve the project roots — a repo may document more than one, and each carries its own design system.

Also detect foreign visuals — viz.json files whose producer is neither prettier-svg-docs nor the legacy more-pretty-docs, or embeds pointing at .webp. Those are adoption candidates (embedding.md → Adopting visuals from another producer). A legacy mpd.json filename or mpd: marker is not foreign — it is this skill's own older output, and it is rewritten in place on the next touch.

2. Design system and style

Read reference/styles.md and resolve the style first — explicit --style, then an alias, then a recognisable free-form idiom, then one question, then derivation from the product. Read exactly one reference/styles/<slug>.md for the resolved style; never the whole directory.

Then read reference/design-system.md, walk its discovery ladder per project, and derive or load <project>/.prettydocs/prettydocs.md:

  • Own contract exists and identity + style unchanged → load it; frozen for this run.
  • An ancestor's exists → inherit it as the base. A project overrides by carrying its own.
  • A design source was found instead (a DESIGN.md, a README stating a palette, brand tokens) → derive prettydocs.md from it and record design_source_path / design_source_hash. A source is never the contract.
  • Nothing found → derive it (mapping from product identity when one exists; otherwise from product semantics), write the resolved style into its ## Style section, and — in a single-project repo only — save the slug to .github/docsmeta.json as viz.style.
  • Old layout found (docs/assets/src/DESIGN.md, no .prettydocs/) → offer the migration rather than deriving a second system.
  • Re-derive an existing contract only when the product's identity clearly changed, the style changed, or the user asked. Changing it invalidates every visual (design-hash drift), so say so in the plan.

3. Plan

Classify every in-scope doc: CREATE / UPDATE / OK. Prose-style differences are not drift. Classify every in-scope visual per the lazy rules in embedding.md: RENDER (new) / RE-RENDER (facts, source, or design hash changed; asset missing; marker mismatch; --refresh-viz) / REUSE / OK. Respect the budget table; a pure prose change must plan zero re-authoring.

If the style changed, say so explicitly with a count — "style editorial → neo-brutalist: design_hash moves, all 5 visuals will be re-authored" — before any work starts. A style switch is the one edit that touches everything.

Every structural visual gets a diagram_type in the same table, chosen from reference/diagrams.md — which starts with the test for whether to draw at all. Type is the one decision no later edit repairs: a style change is a re-render, a type change is a re-author, because the node count, the page axis, the connector grammar and the viewBox height all move with it. Where behaviour rather than structure carries the meaning, pick a semantic pattern first (reference/diagram-patterns.md) and take its nearest type.

A hero, a banner or a decorative board has no type; leave the column empty and it carries no data-diagram, so the diagram gate never fires on it. A visual that already records diagram_type in viz.json and carries data-diagram on its root has been through this step — do not ask again.

Name the cuts here too. Anything the type's budget forces out is written to budget_cuts[] in that visual's viz.json and repeated in the phase-8 report, the same way relaxed[] records a softened gate. An unrecorded cut and an unnoticed omission are indistinguishable to the next run.

4. Questions (batched, once, up front)

Ask only what can't be derived or safely defaulted: ownership/copyright holder, license, support channels — plus, when phase 2 could neither resolve nor derive a style, one visual question naming 2–3 candidate styles. Fold it into the same batch; never a second round. Persist answers to .github/docsmeta.json (schema in house-style), so each is asked once per repo and later runs are unattended.

Holder question mechanics (ladder detail in house-style → identity guardrail): skip it entirely when phase 1 auto-resolved the holder (authoritative source or org display name). When phase 1 produced only a confirm-tier candidate (a user-account display name, a bare owner slug, or git config user.name), offer it as the pre-filled recommended answer — one keystroke to accept, but never written to LICENSE, footers, or docsmeta without that confirmation. No candidate at all → ask with no pre-fill.

5. Apply — docs

On a repo with existing docs, write after planning; on a brand-new repo, present the plan and get a go-ahead first. Edit section by section, never whole-file regeneration. Preserve human prose; update facts in place. Insert embeds and pd:viz markers per reference/embedding.md; add the <details> Mermaid fallback in technical docs. Humanize the prose you wrote (house-style → Humanize).

6. Apply — visuals

For each RENDER/RE-RENDER visual, follow reference/viz-production.md exactly: author docs/assets/<name>.svg → gate loop (scripts/svg_check.py until 0 errors) → scripts/svg_filmstrip.py → serve over HTTP and read the pixels → write viz.json + marker hashes together. Statics are the same file format minus the animation block. Write .prettydocs/.gitignore if the project has none yet; its one rule is project-relative, so it needs no upkeep after.

Record every SOFTENED line the checker emitted into that visual's relaxed array.

7. Verify

Run the ten quality gates in house-style over what you changed this run: five textual (Mermaid validity, link/anchor integrity, boilerplate consistency, cross-doc truth, leak/guardrail + volatile-facts grep) and five visual (svg_check.py clean, asset presence + ≤150 KB, marker/manifest integrity via scripts/audit_visuals.py, works-without-images, budget + centered embeds + LICENSE/NOTICE placement). Fix and re-check what you can; surface the rest.

In check mode: run the same gates read-only over the existing docs, plus scripts/audit_visuals.py, and judge CONTRADICTS for each visual's stored facts against the fresh evidence pass. Write nothing.

8. Report

In-chat summary only (the git diff is the audit trail):

  • Per-doc table: CREATED/UPDATED/OK/DEFERRED + a terse note.
  • Per-visual table: RENDERED/RE-RENDERED/REUSED/OK + byte sizes; in check mode the audit verdicts instead.
  • The resolved style, how it was resolved (flag / alias / ad-hoc / derived), and every softened gate with the count of visuals affected. Never let a relaxation pass silently.
  • Metadata saved to .github/docsmeta.json; design-system status (loaded / derived / re-derived).
  • Any adoption performed: embeds rewritten, plus the full ORPHANED list. Nothing was deleted.
  • Degradation paths taken (humanizer skill vs inline checklist; Mermaid validator present or not; pixel review skipped for want of a browser tool).
  • Every <!-- TODO --> left; any doc or visual deferred.
  • If the repo has CI, a one-line offer (only) to add a docs-drift check step.

What is enforced, and by what

Most of the rules that used to live here are owned by a script, and a rule a script fails loudly on does not need saying twice. This table says who owns what, so that a rule's absence from the prose is never mistaken for a rule's absence.

RuleOwnerWhat failure looks like
No <script> or <foreignObject>; no remote reference, @import or off-host url(); no DOCTYPEsvg_check.py structuralERROR, blocks the embed
Seam arithmetic — every duration divides data-loop-s, every animation infinite, no entrancesvg_check.py seamERROR
A prefers-reduced-motion block on every animated visual, including display: none for SMILsvg_check.py motion-a11yERROR
Type floors per data-role, contrast against the declared data-bg groundsvg_check.py legibility + systemERROR; a data-bg that names no palette role is a WARN and the contrast floor then goes unapplied — treat that WARN as a failure
Palette discipline — every colour through a declared token, no raw hexsvg_check.py systemERROR
Style invariants and fidelity floorssvg_check.py style + fidelityERROR, with a positive NOTE reporting what it counted
Byte budgetsvg_check.py sizeERROR over the cap, WARN when dense
Diagram budgets, orthogonal connectors, label clip and gap, the 4-unit grid, legend placement, geometry-is-not-animatedsvg_check.py diagramERROR, on any visual whose root carries data-diagram
Embeds centered, one pd:viz pair per visual, per-doc visual budget, LICENSE/NOTICE never visualized, foreign producers never overwrittenaudit_visuals.pynon-zero exit
Alt text and <desc> still describe what the visual draws — a number on the board is named in the description, an ordinal in the description is on the boardaudit_visuals.pyMISDESCRIBED, non-zero exit
Every diagram type in diagrams.json is named in the frontmattervalidate.mjsCI fails the build

A SOFTENED line is a pass that must be reported into relaxed[], a WARN is advisory, an ERROR blocks. Zero errors before a visual may be embedded.

What no script can check

These are the judgments. Each is a question with an answer, because a prohibition only tells you that you have failed, and a question tells you what to produce.

  • For each box on this diagram, which file, config or entry point proves the thing exists? Name it, or cut the box. Same question for a prose claim, a plotted value (which additionally must be recomputable — reference/charts.md), and a fact in viz.json.
  • Which sentence here would be wrong after the next release? A minor or patch version, a release date, a per-release feature note — cut it. Docs record what the project is, not what it shipped last week.
  • Read this doc with images off. Is anything now missing? Alt text, the collapsed Mermaid source, the text beside a banner. This is what makes a softened contrast gate survivable rather than a quiet regression.
  • Is this doc describing what the project does, or what someone hopes it will do? In prose and in pixels alike.
  • Is any of this legal text something you composed? LICENSE and NOTICE are reproduced verbatim, never authored and never formatted (reference/tier2/license.md).
  • Did anything here get drawn as ASCII art? Every diagram is a produced visual or a Mermaid block.
  • Whose artefact is this? A visual another producer made is adopted or left alone — the embed is rewritten and the orphan reported, and nothing is deleted.

References

FileRead when
reference/house-style.mdFirst, every run
reference/styles.mdPhase 2, to resolve the style
reference/styles/<slug>.mdPhase 2, exactly one — the resolved style
reference/design-system.mdPhase 2
reference/diagrams.mdPhase 3, before the plan names a diagram_type
reference/types/<slug>.mdPhase 6, exactly one per diagram — the chosen type
reference/diagram-grammar.mdPhase 6, before the first diagram of a run
reference/diagram-patterns.mdPhase 3, when behaviour rather than structure carries the meaning
reference/charts.mdBefore plotting any number
reference/annotation.mdOnly when a diagram earns an editorial callout
reference/icons.mdOnly when a diagram earns an icon
reference/<doc>.md / reference/tier2/<doc>.mdBefore touching that doc
reference/embedding.mdBefore any embed, marker edit, adoption, or check
reference/viz-production.mdPhase 6, before authoring any SVG
reference/svg-animation.mdPhase 6, before the first animated visual of a run
scripts/svg_check.pyThe phase-6 gate loop (never skip it)
scripts/svg_filmstrip.pyPhase 6, to build the scrub harness
scripts/styles.jsonRead by the checker; keep in step with reference/styles/
scripts/diagrams.jsonRead by the checker and by validate.mjs; keep in step with reference/types/
scripts/test_diagram_check.pyAfter any change to the diagram check class
scripts/test_alt_parity.pyAfter any change to describe_parity in audit_visuals.py
scripts/audit_visuals.pyPhase 7 and check mode

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.