BuhDuy256/deck-agent / .agents/skills/mermaid-diagram
mermaid-diagram
VerifiedCreate standalone Mermaid source and rendered diagram artifacts when the visual itself is the deliverable. Use for `.mmd`, SVG, PNG, PDF, publication, or presentation outputs; use `mermaid-markdown` when a repository Markdown document is the primary artifact.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.6 KB |
SKILL.md
View on GitHub---
name: mermaid-diagram
description: Create standalone Mermaid source and rendered diagram artifacts when the visual itself is the deliverable. Use for `.mmd`, SVG, PNG, PDF, publication, or presentation outputs; use `mermaid-markdown` when a repository Markdown document is the primary artifact.
---
# Standalone Mermaid Diagrams
Create Mermaid diagrams as independent visual artifacts. Optimize for the requested render target and viewing context, including advanced styling when the target renderer supports it.
## Output boundary
- Follow user-specified paths, formats, dimensions, and style requirements.
- Otherwise follow repository conventions; if none exist, use `figures/<descriptive-name>.mmd` as the source artifact.
- Produce rendered outputs such as SVG, PNG, or PDF when requested or when they are part of the repository workflow.
- Create an accompanying Markdown wrapper only when requested. Do not assume that repository documentation is the deliverable.
- Use descriptive kebab-case filenames unless the repository requires another convention.
## Workflow
1. Read applicable repository instructions and the authoritative content inputs.
2. Choose the diagram type that best expresses the relationships:
- flowchart for processes and decision paths;
- sequence diagram for ordered interactions;
- state diagram for lifecycle transitions;
- class or ER diagram for structural relationships;
- timeline, Gantt, journey, mindmap, or another supported type when its semantics fit better.
3. Inventory the required nodes, labels, groups, and connections. Select one dominant reading direction and plan the layout before writing syntax.
4. Generate clean Mermaid source with semantic identifiers, concise labels, and accurate edges. Use styling, directives, alternate layouts, or math notation only when they improve the requested artifact and the target Mermaid version supports them.
5. Verify syntax with `mmdc` when available. A suitable `npx @mermaid-js/mermaid-cli` invocation is an acceptable fallback when dependency use is allowed. Fix render errors before review.
6. Inspect the rendered output, not only the source. Verify every node label and arrow direction against the authoritative input, then assess grouping, crossings, spacing, text size, contrast, and readability at the intended output size.
7. Refine and re-render until the diagram is clear. Three rounds is a reasonable default; report any remaining renderer limitation rather than changing semantics to force a layout.
## Visual quality
- Preserve semantic correctness before optimizing appearance.
- Keep related nodes visually consistent and use whitespace to communicate grouping.
- Avoid unnecessary nodes, edges, decoration, and color variation.
- For publication or presentation output, check readability at final scale and in grayscale when print use is likely.
- Use layout helpers only when they do not imply false domain relationships.
- When formulas are necessary, use Mermaid-supported math syntax and verify it with the actual target renderer; otherwise prefer plain labels.
## Verification checklist
- The selected diagram type matches the meaning of the source material.
- Every required component is present and correctly labeled.
- Every arrow points from the correct source to the correct target.
- The main structure is understandable within a few seconds.
- The source renders with the intended Mermaid toolchain.
- Permanent files match the requested deliverables; temporary review files are removed.
In the final response, list the generated artifacts, validation method, refinement performed, and any remaining visual or renderer limitation.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |