Who it is forAn engineer or agent reviewing a diagram in a pull request who needs to know exactly what breaks the house style.
The problemA diagram that looks fine can still break viewBox margins, font stacks, arrow markers or escaping, and reviewing those by eye is slow.
The outcomeA list of findings with check ids and repair lines in JSON, plus a clear pass or fail based on 0 errors and 0 warnings.
What you need first
- Node.js, since svg-lint is plain Node with no packages
- A coding agent that loads skills, such as Claude Code, Codex, Cursor or Gemini CLI
- npx, to run the skills install command
Steps
- Clone the SVG Diagram repository, or install the skill with
npx skills add bybit-exchange/svg-diagram -g. - Run
node tools/svg-lint/bin/svg-lint.mjs diagram.svgto see findings in plain text. - Run
node tools/svg-lint/bin/svg-lint.mjs diagram.svg --jsonto get the same findings as JSON. - Work through each finding by its check id and repair line, then lint again.
Prompt for your agent
In the svg-diagram repo, run node tools/svg-lint/bin/svg-lint.mjs <path/to/file.svg> --json and list each finding's check id and repair line. Confirm the file reports 0 errors and 0 warnings before calling it clean.
Caveat. The linter reports only what the house style forbids, so a clean run does not prove a diagram is accurate or easy to read.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for bybit-exchange/svg-diagram and "Lint an existing SVG and read findings as JSON"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer