hikerpig/pintora/add-new-diagram
- community
Checking that the SKILL.md file is still in the repository.
Use when adding a new diagram type to Pintora. Covers parser, artist, config, registration, snapshot tests, and user docs.
Install
npx vskill@latest install hikerpig/pintora/add-new-diagramSKILL.md
Add a New Diagram Type
Preconditions
pnpm installsucceeds locally and the workspace builds.- You have read:
packages/pintora-diagrams/AGENTS.md.ai/docs/patterns/diagram-three-piece.md
Steps
1. Create the directory
2. Write the grammar
Create packages/pintora-diagrams/src/<type>/parser.ne. Use packages/pintora-diagrams/src/sequence/parser.ne as a reference.
3. Compile the grammar
This produces parser.ts alongside parser.ne. Commit both.
4. Write the artist
Create packages/pintora-diagrams/src/<type>/artist.ts. Use packages/pintora-diagrams/src/mindmap/artist.ts as a minimal reference or packages/pintora-diagrams/src/sequence/artist.ts as a full-featured one.
Rules:
- Read colors from
getConfig().themeConfig. Never hard-code hex values. - Emit relative coordinates. Avoid baked-in pixel offsets.
5. Write the config
Create packages/pintora-diagrams/src/<type>/config.ts exporting DEFAULT_CONFIG, configKey, and the config type. If new theme tokens are introduced, also update packages/pintora-core/src/themes/default.ts and any other theme variants.
6. Register the diagram
Create packages/pintora-diagrams/src/<type>/index.ts:
Re-export from packages/pintora-diagrams/src/index.ts (and from packages/pintora-standalone/src/index.ts if standalone needs to ship it).
7. Add a snapshot test
Create packages/pintora-diagrams/src/__tests__/<type>.spec.ts modelled on the existing per-diagram spec files in that directory.
Run the suite:
Review the generated snapshot manually before committing it.
8. Add user documentation
Create website/docs/diagrams/<type>.mdx following the structure of website/docs/diagrams/sequence-diagram.mdx. Add a note at the top linking back to this skill for contributors.
9. Verify in the live editor
Open the demo, pick the new diagram type, and confirm it renders.
Done criteria
pnpm --filter @pintora/diagrams testpasses and snapshots are committed after manual review.pnpm compilesucceeds for all packages.pnpm ai:lintreports no new warnings.- Live editor renders the new diagram.
Common pitfalls
- Forgetting to rebuild grammar after editing
parser.ne— symptoms are stale parser errors. - Hard-coding theme colors — breaks dark mode.
- Skipping the standalone re-export — the diagram works in tests but not in the standalone bundle.
- Adding a config field without updating other themes — the field is
undefinedoutside the default theme.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.ai/skills/add-new-diagram/SKILL.md
Popularity
- Repository stars
- 1,284
- Repository forks
- 37
- 7-day trend score
- 36
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/hikerpig/pintora/add-new-diagram)