diagram-generator
Skill0 starsChanged 6 months agoMITView on GitHub
Generate diagrams from Mermaid code using the free Kroki API. No authentication required. Flowcharts, sequence diagrams, class diagrams, ERDs, and more. Returns local PNG/SVG files.
16 other projects use a version of this.
Adopted by
Most recently taken up by
- TerryFYL/ai-research-armytheir own version, first seen Nov 8, 2026
- luongnv89/skillstheir own version, first seen Nov 6, 2026
- lza6/claw-code-tingfengtheir own version, first seen Nov 1, 2026
- qa-aman/claude-skillstheir own version, first seen Nov 1, 2026
- lushun2014/lushibo-skillstheir own version, first seen Oct 15, 2026
- mahik504/orchestra-workflowtheir own version, first seen Oct 15, 2026
Used with
Projects with it also use attack-chain, binary-diff and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
DorianGalloSkillattack-chain
Also in 6 projects that use this
DorianGalloSkillbinary-diff
跨版本符号迁移与二进制差分。当你有旧版本的符号/逆向结果,需要快速迁移到新版本时使用。 适用场景:内核缺 PDB 用旧版符号推导、程序更新后批量迁移函数名、应用更新后快速定位新偏移。 核心方法:用 LLM 做结构化差异比对,程序化输入输出,成本极低(200 函数 ~1 元)。 触发关键词:符号迁移、bindiff、跨版本、PDB 缺失、函数偏移迁移、symbol migration、binary diff、版本对比。
Also in 6 projects that use this
Roshu18Skillpentest-tools
Tool selection policy for BearStrike based on target type, scan risk, and signal strength.
Also in 7 projects that use this
hardw00tSkillllm-security
LLM and AI application security testing skill for prompt injection (direct, indirect, multimodal), system-prompt extraction, RAG poisoning, memory poisoning, MCP server injection, skill-file injection, agentic tool misuse, computer-use UI injection, and excessive agency. Authorization required — this skill tests AI systems you are explicitly permitted to assess. Triggers on requests to test LLM / AI-agent / RAG / MCP / computer-use security, perform prompt injection, extract system prompts, poison RAG or memory, audit agent tool use, or evaluate AI guardrails.
Also in 6 projects that use this
- +8 more from DorianGallo
Other versions16 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 16
- zhaoxuya520/reverse-skill-private★ 40ksame name
- zhaoxuya520/reverse-skill★ 38ksame name
- luongnv89/skills★ 145same name
- z91772524-ai/pojia-next-mac★ 39same name
- 2233admin/reverse-skill-evolver★ 26same name
- qa-aman/claude-skills★ 24same name
- sergeeey/Claude-cod-top-2026★ 9same name
- TerryFYL/ai-research-army★ 9same name
- dbx0/skills★ 7same name
- lza6/claw-code-tingfeng★ 5same name
6 more not listed
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 repository17 other files it gives its agents.
- blog-banner-creationSkill
- daily-blog-draftSkill
- image-generationSkill
- script-to-speechSkill
- company-deep-diveSkill
- email-verificationSkill
- funnel-playbookSkill
- google-ads-auditSkill
- landing-page-funnelSkill
- linkedin-content-image-typesSkill
- viral-comment-strategySkill
- autonomous-task-reliabilitySkill
- build-your-brainSkill
- expert-councilSkill
- liaclSkill
- parallel-researchSkill
- rate-limit-safeguardsSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Create professional diagrams programmatically from Mermaid syntax, saving PNG files locally for use in documentation, blogs, and …
“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Diagram Generator Skill
Generate diagrams from Mermaid code using free Kroki API -- no authentication required.
Purpose
Create professional diagrams programmatically from Mermaid syntax, saving PNG files locally for use in documentation, blogs, and architectural records.
Quick Start
import base64
import zlib
from pathlib import Path
import urllib.request
def generate_diagram(
diagram_code: str,
output_path: str,
diagram_type: str = "mermaid",
output_format: str = "png"
) -> str:
"""Generate a diagram using Kroki API (free, no auth required)."""
compressed = zlib.compress(diagram_code.encode('utf-8'), 9)
encoded = base64.urlsafe_b64encode(compressed).decode('ascii')
url = f"https://kroki.io/{diagram_type}/{output_format}/{encoded}"
with urllib.request.urlopen(url, timeout=30) as response:
content = response.read()
output = Path(output_path)
output.parent.mkdir(parents=True, exist_ok=True)
output.write_bytes(content)
return str(output.absolute())
# Example: Generate a flowchart
mermaid_code = """
flowchart TD
A[Start] --> B{Decision}
B -->|Yes| C[Action 1]
B -->|No| D[Action 2]
C --> E[End]
D --> E
"""
output_path = generate_diagram(mermaid_code, "flowchart.png")
print(f"Diagram saved to: {output_path}")Kroki API Details
Endpoint: https://kroki.io/{diagram_type}/{output_format}/{encoded_payload}
Cost: FREE -- No API key required!
Supported Diagram Types:
| Type | Keyword | Best For | Formats |
| Mermaid | mermaid | Flowcharts, sequences, class diagrams | png, svg |
| PlantUML | plantuml | UML diagrams, complex sequences | png, svg, pdf |
| GraphViz | graphviz | Network graphs, dependencies | png, svg, pdf |
| D2 | d2 | Modern diagrams with icons | svg only |
| Structurizr | structurizr | C4 architecture diagrams | svg only |
| Ditaa | ditaa | ASCII art to diagrams | png, svg |
| ERD | erd | Entity-relationship diagrams | png, svg |
| Nomnoml | nomnoml | UML class diagrams | svg only |
Encoding Method:
- Compress with zlib (level 9)
- Base64 URL-safe encode
- Append to URL
Mermaid Syntax Reference
Flowchart
flowchart TD
A[Rectangle] --> B(Rounded)
B --> C{Diamond}
C -->|One| D[Result 1]
C -->|Two| E[Result 2]Sequence Diagram
sequenceDiagram
participant A as Client
participant B as Server
A->>B: Request
B-->>A: Response
A->>A: Process
A-->>B: ConfirmClass Diagram
classDiagram
class Agent {
+String id
+String role
+execute()
}
Agent <|-- Coder
Agent <|-- TesterEntity-Relationship
erDiagram
USER ||--o{ ORDER : places
ORDER }|--|| PRODUCT : contains
USER ||--|{ SESSION : hasUsage Examples
Architecture Diagram
arch_diagram = """
flowchart TB
subgraph Frontend
W[Web App]
end
subgraph Backend
A[API Server]
D[(Database)]
end
subgraph Workers
Q[Queue]
P[Processor]
end
W --> A
A --> D
A --> Q
Q --> P
P --> D
"""
generate_diagram(arch_diagram, "architecture.png")Process Flow
process_flow = """
sequenceDiagram
actor User
participant App
participant API
participant DB
User->>App: Submit form
App->>API: POST /data
API->>DB: INSERT
DB-->>API: Success
API-->>App: 201 Created
App-->>User: Confirmation
"""
generate_diagram(process_flow, "process-flow.png")Error Handling
try:
path = generate_diagram(code, output)
print(f"Success: {path}")
except Exception as e:
if "syntax" in str(e).lower():
print("Invalid diagram syntax -- check Mermaid code")
else:
print(f"Kroki API error: {e}")Anti-Patterns
| Anti-Pattern | Correct Approach |
| Using raw API without compression | Always compress + base64 encode |
| Hardcoding output paths | Use organized output directories |
| Not handling API errors | Wrap in try/except with specific handling |
| Generating without verification | Verify the output file exists and has reasonable size (>1KB) |
Related Resources
- Mermaid Live Editor -- Test diagrams before generating
- Kroki Documentation -- Full API reference
- Mermaid Documentation -- Complete syntax guide
Built by PureBrain -- AI-powered marketing operations.
Want the full suite of 183+ production-tested skills? Start your trial ->
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
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.

