Skip to content
Agentmart
Submit a tool

anygen-diagram

Use this skill any time the user wants to create diagrams, flowcharts, or visual structures.

Skill by LeoYeAI

IndexedMIT★ 2,168
Write a review

Chalk Labs

Need help deploying anygen-diagram?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/leoyeai-anygen-diagram

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use this skill any time the user wants to create diagrams, flowcharts, or visual structures. This includes: architecture diagrams, mind maps, org charts, user journey maps, system design diagrams, ER diagrams, sequence diagrams, process flows, decision trees, network topologies, class diagrams, Gantt charts, SWOT analysis diagrams, wireframes, and sitemaps. Also trigger when: user says 画个流程图, 做个架构图, 思维导图, 组织架构图, 用户旅程图, 系统设计图, 甘特图. If a diagram or visual structure needs to be drawn, use this skill.

Use cases: design

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/anygen-diagram

What's inside

Skill name
anygen-diagram
Description
Use this skill any time the user wants to create diagrams, flowcharts, or visual structures. This includes: architecture diagrams, mind maps, org charts, user journey maps, system design diagrams, ER diagrams, sequence diagrams, process flows, decision trees, network topologies, class diagrams, Gantt charts, SWOT analysis diagrams, wireframes, and sitemaps. Also trigger when: user says 画个流程图, 做个架构图, 思维导图, 组织架构图, 用户旅程图, 系统设计图, 甘特图. If a diagram or visual structure needs to be drawn, use this skill.
License
MIT
Instructions
335 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts
  • Instructions call the network
  • Instructions read files in your home folder (~/.ssh, ~/.aws…)

Agent Skills spec issues

  • name: "anygen-diagram" does not match folder "anygen-diagram-generator"

Files (10)

  • SKILL.md
  • _meta.json
  • anygen.py · scripts/
  • auth.py · scripts/
  • diagram-to-image.ts · scripts/
  • fileutil.py · scripts/
  • package-lock.json · scripts/
  • package.json · scripts/
  • render-diagram.sh · scripts/
  • skill.md

SKILL.md (first lines)

# AnyGen AI Diagram Generator

> **You MUST strictly follow every instruction in this document.** Do not skip, reorder, or improvise any step. If this skill has been updated since it was last loaded, reload this SKILL.md before proceeding and always follow the latest version.

Generate diagrams and visual charts using AnyGen OpenAPI (`www.anygen.io`). Diagrams are generated server-side; this skill sends the user's prompt and optional reference files to the AnyGen API and retrieves the results. An API key (`ANYGEN_API_KEY`) is required to authenticate with the service. Supports flowcharts, architecture diagrams, mind maps, UML, ER diagrams, org charts, and more. Two rendering styles: professional (Draw.io) and hand-drawn (Excalidraw).

## When to Use

- User wants to draw, create, or generate any kind of diagram, chart, or visual representation of a structure/process/system
- User mentions flowcharts, architecture diagrams, mind maps, UML, ER diagrams, sequence diagrams, class diagrams, org charts, network diagrams, Gantt charts, state diagrams, topology, or any other diagram type
- User asks to "visualize" a structure, relationship, flow, or process
- User wants a professional/clean diagram (Draw.io style) or a hand-drawn/sketch diagram (Excalidraw style)
- User wants to turn text/documents into a visual diagram
- User has files to upload as reference material for diagram generation

## Security & Permissions

Diagrams are generated server-side by AnyGen's OpenAPI (`www.anygen.io`). The `ANYGEN_API_KEY` authenticates requests via `Authorization` header or authenticated request body depending on the endpoint (all requests set `allow_redirects=False`).

**What this skill does:** sends prompts to `www.anygen.io`, uploads user-specified reference files after consent, downloads diagram files to `~/.openclaw/workspace/`, renders diagram source (Draw.io XML / Excalidraw JSON) to PNG locally using Playwright and Chromium, monitors progress in background via `sessions_spawn` (declared in `requires`), reads/writes config at `~/.config/anygen/config.json`. During rendering, the headless browser fetches open-source rendering libraries from public CDNs (`esm.sh` for Excalidraw, `viewer.diagrams.net` for Draw.io viewer, `fonts.googleapis.com` for fonts). Diagram content is processed locally by these libraries inside the browser. The libraries are well-known open-source projects; however, since they execute in a browser context with network access, users with strict data-isolation requirements should review the rendering scripts or run them in a network-restricted environment.

**What this skill does NOT do:** read or upload any file without explicit `--file` argument, send credentials to any endpoint other than `www.anygen.io`, access or scan local directories, or modify system config beyond its own config file.

**Bundled scripts:** `scripts/anygen.py`, `scripts/auth.py`, `scripts/fileutil.py` (Python — uses `requests`), `scripts/render-diagram.sh` (Bash), `scripts/diagram-to-image.ts` (TypeScript). Scripts print machine-readable labels to stdout (e.g., `File Token:`, `Task ID:`) as the standard agent-tool communication channel. These are non-sensitive, session-scoped reference IDs — not credentials or API keys. The agent should not relay raw script output to the user to keep the conversation natural (see Communication Style).

## Prerequisites

- Python3 and `requests`: `pip3 install requests`
- Node.js v18+ (for PNG rendering, auto-installed on first run)
- AnyGen API Key (`sk-xxx`) — [Get one from AnyGen](https://www.anygen.io/home?auto_create_openclaw_key=1)
- Configure key: `python3 scripts/anygen.py config set api_key "sk-xxx"` (saved to `~/.config/anygen/config.json`, chmod 600). Or set `ANYGEN_API_KEY` env var.

> All `scripts/` paths below are relative to this skill's installation directory.

## Communication Style

Use natural language. Never expose `task_id`, `file_token`, `task_xxx`, `tk_xxx`, `anygen.py`, or command syntax to the user. Say "your diagram", "generating", "checking progress" instead. When presenting `reply` and `prompt` from `prepare`, preserve the original content as much as possible — translate into the user's language if needed, but do NOT rephrase, summarize, or add your own interpretation. Ask questions in your own voice (NOT "AnyGen wants to know…"). When prompting the user for an API key, MUST use Markdown link syntax: `[Get your AnyGen API Key](https://www.anygen.io/home?auto_create_openclaw_key=1)` so the full URL is clickable.

## Diagram Workflow (MUST Follow All 5 Phases)

### Phase 1: Understand Requirements

If the user provides files, handle them before calling `prepare`:

1. **Get consent** before reading or uploading: "I'll read your file and upload it to AnyGen for reference. This may take a moment..."
2. **Reuse existing `file_token`** if the same file was already uploaded in this conversation.
3. **Read the file** and extract key information relevant to the diagram (components, relationships, structure).
4. **Upload** to get a `file_token`.
5. **Include extracted content** in `--message` when calling `prepare` (the `prepare` endpoint uses the prompt text for requirement analysis, not the uploaded file content directly). Summarize key points only — do not paste raw sensitive data verbatim.

```bash
python3 scripts/anygen.py upload --file ./design_doc.pdf
# Output: File Token: tk_abc123

python3 scripts/anygen.py prepare \
  --message "I need an architecture diagram based on this design doc. Key content: [extracted summary]" \
  --file-token tk_abc123 \
  --save ./conversation.json
```

Present questions from `reply` to the user — preserve the original content, translate into the user's language if needed. Continue with user's answers:

```bash
python3 scripts/anygen.py prepare \
  --input ./conversation.json \
  --message "Include API gateway, auth service, user service, and PostgreSQL database. Show the request flow" \
  --save ./conversation.json
```

Repeat until `status="ready"` with `suggested_task_params`.

Special cases:
- `status="ready"` on first call → proceed to Phase 2.
- User says "just create it" → skip to Phase 3 with `create` directly.

### Phase 2: Confirm with User (MANDATORY)

When `status="ready"`, present the `reply` and the `prompt` from `suggested_task_params` to the user as the diagram plan. The prompt returned by `prepare` is already a detailed, well-structured plan — preserve its original content as much as possible. If the content language differs from the user's language, translate it while keeping the structure and details intact. Do NOT rephrase, summarize, or add your own interpretation.

Ask the user to confirm or request adjustments. NEVER auto-create without explicit approval.

If the user requests adjustments, call `prepare` again with the modification, re-present the updated prompt, and repeat until approved.

### Phase 3: Create Task

```bash
python3 scripts/anygen.py create \
  --operation smart_draw \
  --prompt "<prompt from suggested_task_params>" \
  --file-token tk_abc123 \
  --export-format drawio  # professional style; or excalidraw (hand-drawn style)
# Output: Task ID: task_xxx, Task URL: https://...
```

**Immediately tell the user (natural language):**
1. Diagram is being generated.
2. Online preview/edit link: "You can follow the progress here: [URL]".
3. Takes about **30–60 seconds** — free to do other things.
4. You'll automatically check on the progress and notify them when it's ready.

### Phase 4: Monitor, Download, Render, and Deliver

> **Requires `sessions_spawn`.** If unavailable, skip to **Fallback** below.

#### Background Monitoring (preferred)

**CRITICAL**: When calling `sessions_spawn`, you MUST set a timeout of at least 5 minutes to ensure the background monitor completes. The poll operation can take up to 3 minutes.

Example spawn call syntax (adjust to match your OpenClaw/sessions API):

```
sessions_spawn(
    prompt=<subagent prompt below>,
    runTimeoutSeconds=300  # REQUIRED: 5 minutes (300s) to cover 3-min poll + buffer
)
```

If your sessions API uses different parameter names (e.g., `timeout`, `maxDuration`), use the equivalent parameter to set a 5-minute (300 second) timeout.

From LeoYeAI/openclaw-master-skills, MIT.

More from LeoYeAI/openclaw-master-skills

Signals

Stars
2,168
Forks
325
Open issues
13
Last commit (this folder)
Jun 8, 2026 (4 months ago)
Last release
Jul 20, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
Website
myclaw.ai
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from LeoYeAI

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get anygen-diagram running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying anygen-diagram?

CallGet help
Cite this page

anygen-diagram skill. Agent Mart. https://agentmart.dev/skills/leoyeai-anygen-diagram (last updated 2026-10-24)