agentleFS
strands-agentsstrands-agents/harness-sdk/.agents/skills/docs-diagrams/SKILL.md

docs-diagrams

Skill8.9k starsChanged 18 days agoApache-2.0View on GitHub

Design and draw diagrams for the Strands docs site as theme-aware SVGs rendered by the <Diagram> component. Use when a docs page needs a diagram, or when reviewing a diagram's clarity and style. Also triggers on "draw a diagram", "add a diagram", "make this diagram clearer", "diagram for X".

  • Installs packages

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 8 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

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

    Create clear, editorial diagrams for the docs in the Strands brand.

    line 8
  2. Very specific:

    Read the prose around where the diagram goes.

    line 20
  3. Distinctive:

    Before you write any SVG, tell the user:

    line 25
  4. Distinctive:

    If a table or paragraph would do the job better, say so and don't draw.

    line 33
  5. Very specific:

    Create site/src/assets/diagrams/<concept-name>.svg.

    line 37
  6. Distinctive:

    Write the file in paint order: zones → edges → labels → nodes.

    line 41
  7. Distinctive:

    Add the component to the page:

    line 43
  8. Distinctive:

    Put the import after the frontmatter, with the page's other imports.

    line 51
  9. Distinctive:

    Don't run several edits on the same file in parallel.

    line 91
  10. Very specific:

    Don't hard-code hex colors, fonts, or style= attributes.

    line 93
  11. Distinctive:

    Don't add nodes or components the page doesn't describe.

    line 95
  12. Distinctive:

    Don't shrink text to fit. Cut content, or split the diagram into two.

    line 96

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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

Docs Diagrams

Create clear, editorial diagrams for the docs in the Strands brand. The rules are in ../../references/diagrams.md. Read it fully before drawing.

Inputs

  • Page: the .mdx file the diagram belongs to (required)
  • Source: the concept to illustrate

Workflow

1. Read the page

Read the prose around where the diagram goes. The diagram must match the text: the same terms, phase names, and order. Check terms against ../../references/terminology.md.

2. Decide, then state the plan

Before you write any SVG, tell the user:

  • The story: one sentence saying what the reader should take away.
  • The type: loop, fan-out, sequence, flowchart, state machine, and so on. Say why it fits the story.
  • Cuts: what you're removing from the source and why. Deletion is usually the best edit.
  • Focal: which one or two elements get the accent.

If a table or paragraph would do the job better, say so and don't draw.

3. Draw

  1. Create site/src/assets/diagrams/<concept-name>.svg. Start from the template in the reference.
  2. Lay it out on paper first. Compute box widths from the text-width estimate and keep every coordinate on the 4px grid.
  3. Write the file in paint order: zones → edges → labels → nodes. Use classes only, with no colors or styles in the SVG.
  4. Add the component to the page:

    import Diagram from '@components/Diagram.astro'
    
    <Diagram name="concept-name" alt="Full prose description of the diagram." />

    Put the import after the frontmatter, with the page's other imports.

4. Look at it

You haven't finished until you've looked at the rendered diagram in both themes.

npm install && (cd site && npm ci)                    # once, from the repo root
(cd site && npm run dev > /tmp/site-dev.log 2>&1 &)   # once; leave it running (~35s cold start)
node .agents/skills/docs-diagrams/screenshot.mjs /docs/<page-path>/   # from the repo root

The script waits up to 90s for the dev server. It captures diagrams in inactive language tabs too, and waits for Mermaid to finish rendering. If Chromium isn't installed, run npx playwright install chromium. Set PLAYWRIGHT_CHROMIUM_EXECUTABLE to use a specific browser binary.

Open every PNG it prints. Check that the labels are actually there. With missing fonts, boxes render empty but the diagram still looks structurally correct. Fix overlaps, clipped text, labels touching lines, crossings, and anything that reads worse in dark mode. Iterate until the review checklist in the reference passes.

Also check the markdown twin, which should show > **Diagram:** <alt> where the figure was:

curl -s http://localhost:4321/docs/<page-path>/index.md | grep -A1 'Diagram:'

5. Report

Tell the user:

  • which diagram you added or replaced, and its type;
  • what you cut from the source and why;
  • the screenshot paths, so they can see it;
  • any rule in diagrams.md that didn't work for this case. Propose an edit to the reference rather than silently breaking the rule.

Don'ts

  • Don't run several edits on the same file in parallel. They race, and one silently overwrites the other. Edit a file sequentially, then re-read it.
  • Don't hard-code hex colors, fonts, or style= attributes. Add a class to site/src/styles/diagrams.css if a role is missing.
  • Don't add nodes or components the page doesn't describe.
  • Don't shrink text to fit. Cut content, or split the diagram into two.

Download now (ZIP)

Trending

Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Aug 30: 0 new projectsWeek of Sep 6: 0 new projectsWeek of Sep 13: 0 new projectsWeek of Sep 20: 0 new projectsWeek of Sep 27: 0 new projectsWeek of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projects
Aug 2026Sep 2026Oct 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 0 in all, so this is a hint, not a trend.

Who's talking about strands-agents/harness-sdk

The biggest 5 of 69 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 69

Talked about on GitHub, YouTube and Bluesky (69 times).

On GitHub · 50

45 more on GitHub

On YouTube · 16

11 more on YouTube

Does it work?

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

Reviews can't be read right now.

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.