agentleFS
JinLee794JinLee794/agent-framework-skills/.cursor/skills/mermaid-diagrams/SKILL.md

mermaid-diagrams

Skill2 starsChanged 4 months agoMITView on GitHub

Create, edit, validate, and preview Mermaid diagrams using the Mermaid Chart VS Code extension. Covers the validate-then-preview workflow, the LM tools (mermaid-diagram-validator, mermaid-diagram-preview, get-syntax-docs-mermaid), the mermaidChart.* commands, @mermaid-chart slash commands, and the Mermaid Chart cloud sync flow. Load whenever a task involves producing a flowchart, sequence, ER, class, state, C4, architecture, or any other diagram.

41 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use backend-to-frontend-handoff-docs, lesson-learned and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • softaworksSkill

    backend-to-frontend-handoff-docs

    Create API handoff documentation for frontend developers. Use when backend work is complete and needs to be documented for frontend integration, or user says 'create handoff', 'document API', 'frontend handoff', or 'API documentation'.

    Also in 3 projects that use this

  • softaworksSkill

    lesson-learned

    Analyze recent code changes via git history and extract software engineering lessons. Use when the user asks 'what is the lesson here?', 'what can I learn from this?', 'engineering takeaway', 'what did I just learn?', 'reflect on this code', or wants to extract principles from recent work.

    Also in 3 projects that use this

  • SupabaseSkill

    copywriting

    Write or audit UI copy (buttons, labels, empty states, error messages, tooltips, form text) anywhere in the monorepo. Load it before shipping or reviewing any user-facing text — including when copy is incidental to the task, like a new feature that adds buttons, toasts, dialogs, or validation messages.

    Also in 5 projects that use this

  • MicrosoftSkill

    skill-creator

    Guide for creating effective GitHub Copilot skills (.github/skills/) in this repository. Use when creating a new skill, updating an existing skill, or when asked about skill structure, format, or best practices for the vscode-documentdb project.

    Also in 7 projects that use this

  • VercelSkill

    agent-browser

    Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.

    Also in 3 projects that use this

  • VercelSkill

    vercel-react-best-practices

    React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

    Also in 3 projects that use this

  • +2 more from softaworks
  • +1 more from vercel-labs

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 39 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Write the diagram to a .mmd file in the project.

    line 21
  2. Distinctive:

    Prefer these for complex generation over hand-authoring.

    line 58

“Common” is measured: kept by at least 6 in 10 of the 39 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Mermaid Diagrams

Unrelated to MAF — this is editor tooling. It is a skill rather than an always-on instruction file precisely so it costs nothing on the many tasks that involve no diagram.

Workflow

  1. Pick the diagram type and check its syntax with get-syntax-docs-mermaid if you have not authored that type recently.
  2. Write the diagram to a .mmd file in the project.
  3. Validate with mermaid-diagram-validator before showing the diagram to the user. Never return unvalidated Mermaid syntax.
  4. Preview with mermaid-diagram-preview after generating. For a diagram that already exists as a file, pass documentUri, not code.

LM tools

ToolUse
get-syntax-docs-mermaidFetch syntax docs for a diagram type — do this before authoring an unfamiliar one
mermaid-diagram-validatorValidate syntax. Required before presenting any diagram
mermaid-diagram-previewRender a live preview in VS Code. Required after generating

VS Code commands

Invoke via the Command Palette or the command API. Do not invent command IDs — prefer writing or editing a .mmd file when no command is needed.

CommandIDNotes
PreviewmermaidChart.previewRequires an open .mmd / .mermaid editor
Create DiagrammermaidChart.createMermaidFileDemo flowchart + side-by-side preview
Repair DiagrammermaidChart.repairDiagramConsumes Mermaid AI credits — tell the user first
Improve DiagrammermaidChart.improveDiagramLayout and styling variants via the LM API
Install AI SkillsmermaidChart.installAiSkillsReinstalls this pack — see the caveat below

Generation commands (need GitHub Copilot): mermaidChart.generateDiagramFromCode, generateCloudDiagram, generateERDiagram, generateDockerDiagram, mermaidChart.openCopilotChat.

Cloud commands: mermaidChart.login / logout, mermaidChart.connectDiagramToMermaidChart, mermaidChart.syncDiagramWithMermaid (only for diagrams whose frontmatter already carries an id:).

@mermaid-chart slash commands

Prefer these for complex generation over hand-authoring.

CommandProduces
/generate_diagram_from_codeGeneral diagram from any source file
/generate_execution_sequenceSequence diagram from code flow
/generate_er_diagramER diagram from schema or models
/generate_cloud_architecture_diagramCloud / CI-CD architecture
/generate_docker_diagramArchitecture from Dockerfiles
/generate_c4_topdown_architectureC4 top-down architecture
/analyze_code_ownershipCode ownership diagram
/generate_dependency_diagramDependency / security visualisation

Sync-managed diagrams

Diagrams updated by the Mermaid Chart GitHub Sync app (or a pre-commit regenerate) are managed by the extension. Do not hand-rewrite them. Use mermaidChart.reviewAppCommits to open the review flow and mermaidChart.regenerateDiagramWithMermaidAI to regenerate from source. Accept / reject / diff stay in the extension UI.

Caveat

The Mermaid extension may reinstall .cursor/instructions/mermaid.instructions.md with applyTo: "**", which loads this content into every request in the repo. If that file reappears, delete it — this skill replaces it, and the skill is loaded on demand instead.

Full command list: https://marketplace.visualstudio.com/items?itemName=MermaidChart.vscode-mermaid-chart

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.