Skills Prompts Hues

Popular categories

Agent skill · Baoyu Skills

/baoyu-diagram Draw clean SVG diagrams that work in dark and light themes

Unlike the image skills in this pack, this one has the agent write SVG by hand. Every colour is a CSS variable, so one source file switches between dark, light and custom themes. The skill sets fonts, spacing, layering and component patterns, then uses bundled scripts to produce a light variant and 2x PNG exports.

Works with

  • Any agent
  • Claude Code
  • ClawHub / OpenClaw

When to use it

  • You need an architecture, sequence or flow diagram for documentation or a blog post.
  • Your site has dark and light modes and the diagram must look right in both.
  • You want diagrams in your brand colours without editing every shape by hand.

How it works

  1. 1
    Choose the diagram type

    The agent identifies whether the job is architecture, flowchart, sequence, structural, mind map, timeline, state machine or similar, and reads that type's reference.

  2. 2
    Plan the layout

    It lists components, groups and flow direction and works out positions before drawing.

  3. 3
    Write layered SVG

    It paints background, regions, arrows, masks, boxes, labels, legend and title in a fixed order, with all colours as theme variables.

  4. 4
    Check spacing

    It verifies minimum gaps, label clearance and viewBox padding so nothing overlaps.

  5. 5
    Export variants

    It runs the theme-switch script for a light SVG and the PNG script for 2x images of both themes.

What it steers the agent away from

  • Hard-coded colours that break theme switching.
  • Remote fonts or assets that make the SVG render differently offline.
  • Arrows showing through semi-transparent boxes, by drawing an opaque mask under each one.

Install this skill

It installs with the Baoyu Skills pack.

Any agent (npx skills)The README's recommended quick route; pick only the skills you need to keep agent context small.
npx skills add jimliu/baoyu-skills
Claude CodeInstalls the single plugin that bundles every skill; update it from the Marketplaces tab in /plugin.
/plugin marketplace add JimLiu/baoyu-skills
/plugin install baoyu-skills@baoyu-skills
ClawHub / OpenClawClawHub installs skills one at a time, so swap in the names you want; copies published there are MIT-0.
clawhub install baoyu-image-gen
clawhub install baoyu-markdown-to-html

Commands come from the author’s README; check it for changes before you run them.

Questions

Does it call an image model?

No. The README says no image model is involved; the agent writes the SVG markup and computes the layout itself.

Can I add my own theme?

Yes. Drop a JSON file of CSS variable values into the themes folder and pass its name with --theme.

More guides from Baoyu Skills

Also in this pack

All 18 skills →

Summary by trendhub. The skill itself lives in JimLiu/baoyu-skills/skills/baoyu-diagram by Jim Liu 宝玉 (MIT); read the full, current text there.