agentleFS
KhucHieuNghiKhucHieuNghi/agents-skills/.agents/skills/eraser-diagrams/SKILL.md

eraser-diagrams

Skill2 starsChanged 15 days agoMITView on GitHub

Create architecture, flowchart, sequence, ERD, or BPMN diagrams from a request or project files using Eraser DSL; render through the Eraser API when a token is available.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are 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.

  • 3

    Very specific

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

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

    Write valid Eraser DSL to a UTF-8 .eraser file.

    line 30
  2. Very specific:

    If ERASER_API_TOKEN is available, render with the bundled script.

    line 31
  3. Very specific:

    Read the JSON response. imageUrl is the rendered PNG and normally expires.

    line 38

≈ “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

Eraser diagrams

Use this skill when the user asks for an Eraser diagram or a diagram that benefits from editable Eraser DSL. It works in Codex and Claude Code. For a diagram based on a codebase or infrastructure, inspect the relevant source files first and label inferred relationships as inferences.

Choose the diagram type

Need--diagram-typeRead when needed
Infrastructure and system componentscloud-architecture-diagramArchitecture syntax and examples
Process and decisionsflowchart-diagramFlowchart syntax and examples
Messages over timesequence-diagramSequence syntax and examples
Data entities and relationsentity-relationship-diagramERD syntax and examples
Roles and swimlanesbpmn-diagramBPMN syntax and examples

For icons and visual rules, consult common icons, the complete icon list, or styling only when the request needs them. For Terraform and AWS input, the IaC example may help.

Workflow

  1. Identify the components, relationships, and diagram type. Keep names and edges grounded in the user's description or inspected files.
  2. Write valid Eraser DSL to a UTF-8 .eraser file. Check unique node names, matching braces, references to defined nodes, and appropriate icons.
  3. If ERASER_API_TOKEN is available, render with the bundled script. The path below assumes this repository's layout; use the installed skill path elsewhere. Use --team-id when using an organization token:

    python3 .agents/skills/eraser-diagrams/scripts/render.py diagram.eraser \
      --diagram-type cloud-architecture-diagram
  4. Read the JSON response. imageUrl is the rendered PNG and normally expires; createEraserFileUrl lets the user create an editable Eraser file. Share the DSL file and the returned links. If the user needs a durable local image, download the PNG while the link is valid.

The script sends POST https://app.eraser.io/api/render/elements with the DSL in elements[0].code and an authorization bearer token. It reads the token from the environment and does not print it. The API requires an Eraser token; if one is unavailable, deliver the DSL and explain that rendering needs ERASER_API_TOKEN. Do not claim an image was generated without a successful API response.

For current request fields and response behavior, use the official Eraser DSL render API and token guide.

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.