agentleFS
seznamseznam/jailoc/.agents/skills/svg-diagrams/SKILL.md

svg-diagrams

Skill44 starsChanged 6 days agoMITView on GitHub

Draw or update hand-written SVG diagrams for the docs and blog in the style of docs/explanation/img/architecture.svg (white card, tinted lanes, accent-barred boxes, mono component names, legend, dashed boundary with a pill). Use when a page needs a new architecture, data-flow or sequence picture, or when an existing SVG diagram must change because the system it shows changed.

  • Installs packages

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. Akindu23/my-agent-skills★ 4same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository5 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the diagram replaces a Mermaid block, delete the block.

    line 53

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

SVG diagrams

Diagrams are plain SVG files written from a throwaway generator script, so positions come from arithmetic instead of hand-placed numbers, and every diagram shares one visual language: style.md holds the tokens and element recipes, architecture.svg is the reference rendering.

Steps

  1. Decide the story in one sentence (the SVG <desc>), the lanes (where things run: host, VM, network, …) and the 4–10 components with a name, a one-line role and at most two body lines each. Every component and arrow must match the code: read the packages behind them. Done when each component and arrow can be traced to a file or function.
  2. Generate with a scratch Python script outside the repo that defines helpers for card, legend, lane, box, chip, arrow, pill and boundary from style.md, lays out a grid (lane gaps 20–40 px, box gaps ≥ 38 px so arrows fit), and writes docs/<section>/img/<name>.svg. Estimate text width as ~7 px per character at 12.5 px sans and ~8.6 px at 14 px mono; size boxes from the longest line plus 28 px. Done when the file parses (python3 -c 'import xml.dom.minidom,sys; xml.dom.minidom.parse(sys.argv[1])' <file>).
  3. Render and look with render.mjs (resvg, fonts bundled, so it works without system fonts or a browser):

    W=/var/tmp/svg-render && mkdir -p $W && cd $W
    npm i --no-audit --no-fund @resvg/resvg-js@2 dejavu-fonts-ttf@2
    cp <repo>/.agents/skills/svg-diagrams/render.mjs .
    node render.mjs <repo>/docs/<section>/img/<name>.svg $W/<name>.png

    View the PNG. Fix and regenerate until no text overlaps a box edge, another label or an arrow; arrows start and end on box edges; the legend lists exactly the colours used. DejaVu runs wider than Inter, so text that fits here fits in the browser. Done when the PNG shows none of these defects.

  4. Embed as ![<alt text that states what the diagram shows>](img/<name>.svg) and keep the <title>, <desc> and alt text describing the same thing. If the diagram replaces a Mermaid block, delete the block. Done when zensical build (or mkdocs build) shows the image and docs/llms.txt needs no change (images are not pages).
  5. Clean up: rm -r $W and the generator script; commit only the .svg and the Markdown that embeds it. Done when git status lists only those files.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.