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.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Disclaimer
Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page