diagram-styler
Skill1 starsChanged 56 days agoApache-2.0View on GitHub
Render an existing Mermaid `.mmd` semantic source into a themed, responsive, accessible SVG while preserving the source and recording renderer provenance in a manifest. Use for light or dark Mermaid styling, document-width SVG output, presentation output, and pre-rendering diagrams for HTML or PDF documents. Do not use to change diagram meaning or to download renderers at runtime.
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Read references/rendering-contract.md.
- Very specific: line 14
Run the renderer preflight.
- Very specific: line 18
Keep the generated manifest beside the SVG.
- Very specific: line 46
If rendering cannot run, return the preserved .mmd, the preflight result, and the missing dependency.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Diagram Styler
Apply a visual layer to Mermaid source without changing its semantic model.
Workflow
- Confirm that the input
.mmdis the preserved source of truth. If meaning must change, return to themermaid-diagramsskill. - Read references/rendering-contract.md. Select
lightordarkand adocument,presentation, ordark-uitarget. - Run the renderer preflight. Never invoke
npx, install packages, or use a network renderer. - Render with scripts/render-mermaid.js, providing a meaningful title and one-sentence description.
- Inspect the SVG at its target width for clipped labels, overlapping edges, unreadable contrast, broken glyphs, and excessive density.
- Fix semantic layout problems in the
.mmd; fix palette or sizing problems in the theme/target layer. Re-render and inspect again. - Keep the generated manifest beside the SVG. When the destination is PDF, compose the SVG first and run the
pdf-qaskill on every final PDF page.
Commands
node scripts/render-mermaid.js --preflight
node scripts/render-mermaid.js \
--input path/to/diagram.mmd \
--output path/to/diagram.svg \
--theme light \
--target document \
--title "Order processing" \
--description "Sequence showing checkout, payment authorization, and fulfillment."The preflight returns JSON even when unavailable. A render fails closed when mmdc is absent. MMDC_BIN may point to a preinstalled executable; it must never point to a download wrapper.
Completion Gate
Complete only when:
- the
.mmd,.svg, and.svg.manifest.jsonall exist and the manifest hashes match; - the SVG has
role="img", a file-scopedaria-labelledby,<title>, and<desc>; - source meaning is unchanged and theme instructions are absent from the
.mmd; - the SVG is responsive within the selected target width;
- visual inspection finds no clipping, overlap, broken glyph, contrast, or readability defect;
- a PDF destination has also passed the
pdf-qaskill after document composition.
If rendering cannot run, return the preserved .mmd, the preflight result, and the missing dependency. Do not claim a rendered artifact or visual inspection.
In this repository65 other files it gives its agents.
- agent-evalSkill
- architecture-review-workflowSkill
- backend-code-review-workflowSkill
- code-authoring-routerSkill
- code-diagram-extractSkill
- codex-agent-runtimeSkill
- design-pattern-applySkill
- document-designerSkill
- e2e-evidence-reportSkill
- e2e-report-rendererSkill
- e2e-runnerSkill
- e2e-scenario-authorSkill
- e2e-test-workflowSkill
- entitySkill
- enumSkill
- explore-dead-codeSkill
- flywaySkill
- git-flowSkill
- harness-proposeSkill
- harness-refineSkill
- java-spring-review-workflowSkill
- knowledge-auditSkill
- korean-dev-writerSkill
- kotlin-code-authoringSkill
- kotlin-spring-reviewSkill
- kotlin-spring-review-workflowSkill
- learnSkill
- mapperSkill
- markdown-publisherSkill
- mermaid-diagramsSkill
- mssql-code-authoringSkill
- nl-sql-querySkill
- notion-domain-contextSkill
- oop-design-reviewSkill
- opensearch-code-authoringSkill
- opensearch-optimizationSkill
- opensearch-query-reviewSkill
- opensearch-review-workflowSkill
- opensearch-schema-reviewSkill
- pdf-qaSkill
- playwright-e2eSkill
- postgres-code-authoringSkill
- postgres-query-reviewSkill
- postgres-review-workflowSkill
- postgres-risk-checkSkill
- postgres-schema-designSkill
- product-requirementsSkill
- product-ui-designSkill
- refactoring-catalogSkill
- repositorySkill
- requestSkill
- responseSkill
- retroSkill
- schema-doc-extractSkill
- security-scan-workflowSkill
- serviceSkill
- skill-updaterSkill
- start-taskSkill
- test-authoringSkill
- test-quality-refactoring-workflowSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

