agentleFS
gyugyu90gyugyu90/DiaStream/.agents/skills/create-diagram/SKILL.md

create-diagram

Skill1 starsChanged 3 months agoMITView on GitHub

Create new DiaStream .diagram.json files from natural-language architecture or scenario descriptions. Use when the user asks to create, generate, draft, or model a new interactive architecture diagram with nodes, edges, groups, animations, or scenes.

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. Mertcikla/tld★ 294same name
    2. enomoso-pm/drawio-diagram-skills★ 40same name
    3. linhvu0711/skills★ 2same 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 repository2 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

20 rules. About 0 are common, 5 are distinctive, and 15 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 15

    Very specific

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

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

    Create a schema-valid Diagram JSON document that remains editable in DiaStream.

    line 8
  2. Very specific:

    Read schemas/diagram.schema.json.

    line 17
  3. Very specific:

    Use the requested output path.

    line 19
  4. Very specific:

    Write one complete JSON document, normalize it, and validate it from the DiaStream repository root:

    line 20
  5. Very specific:

    Use only schema-supported values.

    line 31
  6. Distinctive:

    Use stable semantic IDs beginning with a letter.

    line 32
  7. Very specific:

    Before finalizing, inspect every edge and label against node rectangles.

    line 35
  8. Very specific:

    Use namespaced Material Symbols IDs for new node icons.

    line 37
  9. Very specific:

    Use arrow, triangle, circle, or none for endpoint markers.

    line 41
  10. Very specific:

    Create at least one scene.

    line 42
  11. Very specific:

    Keep node and edge topology shared across scenes.

    line 43
  12. Very specific:

    Keep Scene.animationIds unique and add at most one node or edge override for each target in a scene.

    line 46
  13. Distinctive:

    Use ISO 8601 UTC timestamps when timestamps are included.

    line 48
  14. Very specific:

    After successful normalization and validation, check whether the local DiaStream development server is reachable at its expected local …

    line 53
  15. Very specific:

    If the server is running, report its URL and tell the user to open the generated .diagram.json through the editor.

    line 55
  16. Very specific:

    If the server is not running and the task is interactive, ask whether the user wants to start it.

    line 56
  17. Distinctive:

    If the user already requested a local preview or server startup, treat that as confirmation and do not ask again.

    line 57
  18. Distinctive:

    Do not treat preview availability or server startup failure as diagram-generation failure.

    line 59
  19. Distinctive:

    Do not copy the diagram into application or public directories solely for preview.

    line 60
  20. Very specific:

    Create or modify only the requested .diagram.json artifact.

    line 64

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

Create DiaStream Diagram

Create a schema-valid Diagram JSON document that remains editable in DiaStream. Generate JSON as the source of truth, never SVG, HTML, Canvas code, or a rendered image.

Compatibility

Target DiaStream schemaVersion: "0.2". Treat the repository's packages/schema/src/index.ts as the source of truth and schemas/diagram.schema.json as the public validation contract. Read the current schema before authoring instead of relying on memory.

Workflow

  1. Locate the DiaStream repository root containing schemas/diagram.schema.json and package.json.
  2. Read schemas/diagram.schema.json. Consult docs/diagram-json-schema-draft.md and the closest file in examples/ when layout, animation, or scene behavior is needed.
  3. Extract the requested components, relationships, flows, and scenario steps. Ask a question only when a missing detail prevents a coherent diagram; otherwise choose conservative architecture defaults.
  4. Use the requested output path. When none is given, derive a lowercase hyphenated filename ending in .diagram.json under outputs/ at the DiaStream repository root. Never overwrite an existing file unless the user explicitly requests it.
  5. Write one complete JSON document, normalize it, and validate it from the DiaStream repository root:

    npm run diagrams:normalize -- path/to/file.diagram.json
    npm run diagrams:validate -- path/to/file.diagram.json
  6. Fix every structural and reference-integrity error before finishing. Report the file path and validation result.

Authoring Rules

  • Use only schema-supported values. Version 0.2 supports node types user, browser, mobile, load_balancer, api, app, server, worker, database, cache, queue, storage, cdn, external_service, network, group, and unknown.
  • Use stable semantic IDs beginning with a letter. Keep IDs unique within each entity collection.
  • Lay out the primary flow from left to right with non-overlapping node rectangles. Treat whitespace as part of the diagram: leave generous horizontal and vertical gaps, plus a clear corridor for each edge label and group boundary.
  • When a flow branches across three or more nodes, distribute the branches around their hub in a polygonal layout such as a hexagon instead of one crowded rail. Use distinct upper, lower, and diagonal paths for branches and returns so edges and labels do not pass behind or through nodes.
  • Before finalizing, inspect every edge and label against node rectangles. Widen spacing, move nodes, or change labelPlacement whenever a label would overlap, be clipped by, or appear visually attached to a node.
  • Make every edge endpoint reference an existing node and existing port when portId is present.
  • Use namespaced Material Symbols IDs for new node icons. Recommended values include material-symbols:person, material-symbols:web, material-symbols:smartphone, material-symbols:dns, material-symbols:api, material-symbols:deployed_code, material-symbols:database, material-symbols:storage, material-symbols:cached, material-symbols:hub, material-symbols:lan, material-symbols:key, material-symbols:lock, and material-symbols:shield. Omit icon to use the node type default; do not invent unsupported IDs.
  • Use only supported color values. For theme accent and edge colors, prefer semantic presets accent, primary, muted, neutral, success, warning, danger, info or palette presets blue, green, amber, red, violet, slate; edge colors may also use default. Use custom colors only as six-digit #rrggbb hex values. Do not use CSS named colors, rgb(), hsl(), or short hex.
  • Store group membership only in Group.nodeIds. Do not add Node.groupId, repeat a node ID, or place one node in multiple groups.
  • Store animation membership only in Animation.edgeIds. Do not add Edge.animationId or repeat an edge ID within one animation.
  • Use arrow, triangle, circle, or none for endpoint markers. Use animation and scenes to communicate behavior, not decoration.
  • Create at least one scene. Use a Default Scene when the request has no scenario progression.
  • Keep node and edge topology shared across scenes. Express step-specific node label, type, icon, position, tone, or status changes through nodeOverrides; express edge label, style, tone, or disabled-state changes through edgeOverrides; select active animations with animationIds.
  • Keep Scene.animationIds unique and add at most one node or edge override for each target in a scene.
  • Preserve arbitrary domain extensions only inside Node.data, Edge.data, or Animation.payload; structural objects reject unknown fields.
  • Use ISO 8601 UTC timestamps when timestamps are included.
  • Format the result as readable JSON with a trailing newline.

Optional Local Preview

After successful normalization and validation, check whether the local DiaStream development server is reachable at its expected local address without starting it.

  • If the server is running, report its URL and tell the user to open the generated .diagram.json through the editor.
  • If the server is not running and the task is interactive, ask whether the user wants to start it. Start it from the DiaStream repository root only after confirmation, then report the actual URL printed by the development server.
  • If the user already requested a local preview or server startup, treat that as confirmation and do not ask again.
  • Skip the preview offer for batch, CI, or explicitly file-only requests.
  • Do not treat preview availability or server startup failure as diagram-generation failure.
  • Do not copy the diagram into application or public directories solely for preview.

Output Boundary

Create or modify only the requested .diagram.json artifact. Do not implement renderer or editor code as part of diagram generation. Do not paste the entire document in the final response unless the user asks to see it.

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.