BS

baoyu-diagram Skill Review

bestskills rank team
May 6, 2026

A practical review of baoyu-diagram skill, covering architecture, flow, and sequence output, its design logic, tradeoffs, and whether it is worth installing.


Overall Score

DimensionScoreStatus
Standards (20%)18/20PASS
Effectiveness (40%)38/40PASS
Safety (30%)28/30PASS
Conciseness (10%)7/10WARN
Total91/100Excellent

Level guide:

  • 90-100: Excellent - ready to use or publish
  • 70-89: Good - small but meaningful room to improve
  • 50-69: Fair - needs important revisions
  • <50: Not qualified - requires substantial rewrite

Skill Highlights

  1. [Effectiveness] The visual system is unusually complete - Evidence: the main file defines colors, typography, component styles, layering order, masking rectangles, marker usage, edge padding, and viewBox rules. For an SVG-generation skill, that level of detail matters.
  2. [Effectiveness] Diagram coverage is broad, and some types have dedicated references - Evidence: it supports architecture, flowchart, sequence, structural, mind map, timeline, state machine, and data flow diagrams, while architecture, flowchart, sequence, and structural each have their own references/*.md.
  3. [Safety] The output and delivery path are clearly defined - Evidence: the skill requires a single self-contained SVG and then runs a script to export an @2x PNG. That creates a more complete delivery loop than a prompt that only emits code.
  4. [Standards] The workflow is more engineered than most diagram prompts - Evidence: Identify type -> Read reference -> Plan layout -> Write SVG -> Verify spacing -> Export PNG is a clear and reviewable sequence.

At the bottom of SKILL.md, the skill gives the model a very explicit drawing process:

1. Identify the diagram type from the user's request
2. Read the relevant reference file if one exists for that type
3. Plan the layout: list all components, determine grouping and flow direction, calculate positions
4. Write the SVG following the layering order above
5. Verify spacing rules — no overlaps, legends outside boundaries, viewBox large enough
6. Save the SVG file
7. Run ${BUN_X} {baseDir}/scripts/main.ts <svg-path> to generate @2x PNG
8. Present both files to the user

The same file also puts strict limits on the output itself, including specific handling for Chinese text rendering:

- Output a single .svg file — no external dependencies except the Google Fonts import
- Set viewBox to fit all content with 30px padding; do NOT set fixed width/height attributes (let the SVG scale responsively)
- Include xmlns="http://www.w3.org/2000/svg" on the root <svg> element
- Put all <style>, <defs>, markers, and patterns at the top of the SVG
- Use text-anchor="middle" for centered labels; ensure text doesn't overflow boxes
- Chinese text support: When labels contain Chinese characters, use font-family: 'JetBrains Mono', 'Noto Sans SC', 'PingFang SC', sans-serif' and increase box widths — CJK characters are wider
- Save location: If the input is a file, save to {inputFileDir}/diagram/. Otherwise save to {projectDir}/diagram/{topic-slug}/. Create the directory if it doesn't exist

Where This Skill Can Improve

  1. [Conciseness] The main file is dense and expensive to scan - Evidence: the palette, typography, shape patterns, layering rules, output rules, script calls, and process all live in one file. The upside is completeness, but the first-read cost is high.
  2. [Effectiveness] Type support and reference depth are not fully aligned - Evidence: the skill claims support for mind maps, timelines, state machines, and data flow diagrams, but references/ currently focuses on architecture, flowchart, sequence, and structural. The remaining types rely more on general guidance.
  3. [Safety] The runtime environment still has hidden assumptions - Evidence: PNG export depends on bun or npx -y bun, and the default approach assumes access to remote fonts. In stricter local or offline environments, that raises failure risk.

What This Skill Teaches

  1. If the output target is a visual deliverable, the visual system, layout rules, and component conventions should be defined together instead of just saying “draw a diagram”.
  2. In this kind of skill, the main document should hold shared rules while references handle diagram-specific differences. That structure is easier to maintain than stuffing every layout strategy into one file.
  3. SVG quality usually depends less on syntax and more on whether spacing, layering, and text-density constraints are defined ahead of time.

Issue List

[Medium] Conciseness - The main file is too long

  • Location: SKILL.md
  • Description: visual rules, component templates, output requirements, and script instructions are all stacked into one large document.
  • Suggestion: move the most stable visual primitives into references/ or a separate spec file.

[Medium] Effectiveness - Some diagram types still need equally deep layout guidance

  • Location: supported types versus references/
  • Description: mind maps, timelines, state machines, and data flow diagrams currently rely more on the main overview than on dedicated layout instructions.
  • Suggestion: add reference files for the remaining diagram families to reduce variability across outputs.

[Low] Safety - The export path is sensitive to external dependencies

  • Location: script execution stage
  • Description: PNG conversion depends on the bun runtime and network font access, which may fail in stricter environments.
  • Suggestion: add offline font support or a clearer fallback path when bun is unavailable.

Prioritized Recommendations

  1. [Must] Add deeper reference guides for the remaining diagram types so that support coverage matches layout guidance.
  2. [Should] Add a shorter runtime summary at the top of the main file to reduce scanning cost in repeated use.
  3. [Could] Improve offline compatibility for PNG export to reduce environment friction.