Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

docs-diagrams

Skill by mastra-ai

Converts existing docs diagram images to Mermaid and authors new Mermaid diagrams for Mastra docs. It is aimed at contributors who maintain the Mastra documentation and its diagram style guide.

  • Score 80
  • 30k stars
  • NOASSERTION
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install docs-diagrams

Built from the published package, never by AI.

git clone --depth 1 https://github.com/mastra-ai/mastra /tmp/mastra && mkdir -p ~/.claude/skills && cp -r /tmp/mastra/.claude/skills/docs-diagrams ~/.claude/skills/docs-diagrams

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install docs-diagrams in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

docs-diagrams is an agent skill for the Mastra documentation repository. It converts existing diagram images, such as Excalidraw files or PNG, JPG and SVG images, into Mermaid, and it helps authors write new Mermaid diagrams for docs pages. The skill applies the shape, color and layout rules in docs/styleguides/DIAGRAM.md.

The skill sets a decision order for each image. Screenshots and diagrams where node position carries meaning stay as images. Boxes joined by arrows get converted. Before an image is deleted, the skill searches the docs for remaining references. Authors are asked to check diagrams in a local docs server in both light and dark mode, then run lint and build checks. It is written for contributors who maintain Mastra docs.

Written from the project's SKILL.md and checked against it.

What it can do

  • Convert or keep decisionWalks through an ordered test to decide whether an image should become Mermaid or stay an image.
  • Reference searchGreps the docs source for an image filename to find every page that uses it before conversion.
  • Mermaid authoringGuides writing flowcharts that follow the shape and semantic class rules in DIAGRAM.md.
  • Light and dark checkLists browser checks for line straightness, node width, edge labels and readability in both modes.
  • Asset cleanupDeletes an image file only after a repeat search finds no remaining references.
  • Color class extensionDescribes how to add a fourth semantic color class through the Mermaid theme file.
  • Lint and build checksRuns pnpm lint:remark and pnpm build in docs/ to catch Mermaid parse errors.

What you need

  • Access to the Mastra docs repository
  • pnpm to run the docs dev server, lint and build commands

Try asking

  • Convert docs/src/images/suspend-resume.png to a Mermaid diagram for this page
  • Check whether this docs screenshot should stay an image or become Mermaid
  • Find every docs page that uses the agents overview image before I delete it

Good to know

  • ELK automatic layout can move nodes, so layout-dependent diagrams should stay images.
  • Adding a color class requires palette values in mastra-mermaid-theme.ts.
  • A Mermaid parse error fails the docs build instead of degrading.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .claude/skills/docs-diagrams/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md4 KB

Alternatives to docs-diagrams

All alternatives →
paperbananadwzhu-pku
94

PaperBanana generates publication-quality academic diagrams from a paper's methodology text and figure caption. It is aimed at researchers preparing figures for venues such as NeurIPS, ICML, and ACL.

AAA Skill 7.7k
technical-wireframe-info-layoutMengTo
94

Creates a monochrome technical wireframe design system for dark diagnostic interfaces. It covers layout, typography, info labels, widgets and an exploded wireframe centerpiece. It is for designers and developers building teardown, systems dashboard or specification-style screens.

AAA Skill 8.5k
spline-3d-integrationsickn33
94

Guides an AI assistant through embedding interactive Spline.design 3D scenes in web projects. It covers vanilla, React, Next.js, Vue and iframe setups, for developers adding 3D to websites.

AAA Skill 50k
code-slice-heroheygen-com
94

Code Slice Hero is a HyperFrames headline block. A tiled surface flips cell by cell to reveal a second headline behind the first, at 1920×1080 and 8 seconds.

AAA Skill 92k
patentfigdavila7
94

Generates patent-office-compliant figures and converts drawings through the PatentFig AI API. Built for patent filers who need USPTO or EPO line art, CAD-ready vectors, or filing-ready TIFF, PDF, or PNG files.

AAA Skill 34k
framed-tech-dark-border-gradientMengTo
94

Creates a framed dark technical design system for AI assistants, using border-gradient shells, asymmetrical grid panels, and mono labels. Suited to premium, instrument-like interfaces that need visible boundaries. Published by MengTo.

AAA Skill 8.5k

Compare with paperbanana, technical-wireframe-info-layout or spline-3d-integration

docs-diagrams: common questions

When should a docs diagram stay an image instead of Mermaid?

The skill says screenshots of a UI stay as images, since Mermaid draws graphs and not product surfaces. Diagrams where meaning depends on where nodes sit also stay as images, because ELK layout will move them.

How does the skill handle an image used on several docs pages?

It tells the author to grep for the image filename across docs/src first. The image is deleted only when no references remain, otherwise the author is told which pages still use it.

Can I add a new color to Mermaid diagrams in the docs?

Not by writing hex values in a diagram. The skill says new classes need light and dark palette values in the theme file, plus registrations through semanticClassCSS and semanticEdgeCSS.

How do I install docs-diagrams?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is docs-diagrams free?

The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.

Is docs-diagrams safe to use?

It scores 80 of 100. Grades: maintenance A, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to docs-diagrams?

Similar skills: paperbanana, technical-wireframe-info-layout, spline-3d-integration, code-slice-hero.

docs-diagrams Install

Add to stack

Loading.