Skip to content

Agent skill that turns natural language, code, Terraform/K8s, SQL, OpenAPI, AsyncAPI, Protobuf and GraphQL sources into editable, tested draw.io architecture diagrams: incremental sync, multi-view projection, drift diff, CI architecture tests, whiteboard derasterize, interactive HTML/PPTX/Mermaid exports.

docs: add Opencode support, rename update script, bump to v1.2.0

Agents365-ai0e9b79b0e7f7
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..8672bb1
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+# macOS
+.DS_Store
+
+# Tooling artifacts
+.playwright-mcp/
+logs/
diff --git a/README.md b/README.md
index d5026de..a6c5cd7 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,8 @@ Works with all major AI coding agents that support the [Agent Skills](https://ag
| Platform | Status | Details |
|----------|--------|---------|
| **Claude Code** | ✅ Full support | Native SKILL.md format |
-| **OpenClaw** | ✅ Full support | `metadata.openclaw` namespace, dependency gating, installer |
+| **Opencode** | ✅ Full support | Native SKILL.md via `skill` tool; also reads `.claude/skills/` paths |
+| **OpenClaw / ClawHub** | ✅ Full support | `metadata.openclaw` namespace, dependency gating, ClawHub installer |
| **Hermes Agent** | ✅ Full support | `metadata.hermes` namespace, tags, tool gating |
| **OpenAI Codex** | ✅ Full support | `agents/openai.yaml` sidecar file |
| **SkillsMP** | ✅ Indexed | GitHub topics configured |
@@ -55,7 +56,7 @@ Works with all major AI coding agents that support the [Agent Skills](https://ag
|---------|-----------|---------------|-------------------|--------------|
| **Approach** | Pure SKILL.md | SKILL.md / MCP / Project | YAML DSL + MCP | Plugin + browser |
| **Dependencies** | draw.io desktop only | draw.io desktop | MCP server (`npx`) | Browser + local server |
-| **Multi-agent** | ✅ 5 platforms | ❌ Claude Code only | ❌ Claude Code only | ❌ |
+| **Multi-agent** | ✅ 6 platforms | ❌ Claude Code only | ❌ Claude Code only | ❌ |
| **Self-check** | ✅ 2-round auto-fix | ❌ | ❌ | ❌ screenshot |
| **Iterative review** | ✅ 5-round loop | ❌ generate once | ✅ 3 workflows | ❌ |
| **Layout guidance** | ✅ complexity-scaled + grid snap | ✅ basic spacing | ❌ relies on MCP | ❌ |
@@ -76,7 +77,7 @@ Works with all major AI coding agents that support the [Agent Skills](https://ag
1. **Self-check + iterative loop** — the only pure-SKILL.md solution that reads its own output and auto-fixes before showing the user, then supports multi-round refinement
2. **6 diagram type presets** — ERD, UML Class, Sequence, Architecture, ML/Deep Learning, Flowchart — each with preset shapes, styles, and layout conventions
3. **ML/DL model diagrams** — tensor shape annotations, layer-type color coding, encoder/decoder swimlanes — built for academic papers
-4. **Multi-agent, zero-config** — works across 5 platforms with just one `SKILL.md` file + draw.io desktop. No MCP server, no Python, no Node.js, no browser
+4. **Multi-agent, zero-config** — works across 6 platforms with just one `SKILL.md` file + draw.io desktop. No MCP server, no Python, no Node.js, no browser
5. **Production-grade layout** — grid-aligned coordinates, complexity-scaled spacing, routing corridors, hub-center strategy, animated connectors
6. **Browser fallback** — generates diagrams.net URLs when the desktop CLI is unavailable, plus auto-launch for desktop editing
@@ -146,6 +147,18 @@ git clone https://github.com/Agents365-ai/drawio-skill.git ~/.claude/skills/draw
git clone https://github.com/Agents365-ai/drawio-skill.git .claude/skills/drawio-skill
```
+### Opencode
+
+```bash
+# Global install (Opencode-native path)
+git clone https://github.com/Agents365-ai/drawio-skill.git ~/.config/opencode/skills/drawio-skill
+
+# Project-level install
+git clone https://github.com/Agents365-ai/drawio-skill.git .opencode/skills/drawio-skill
+```
+
+Opencode also reads `~/.claude/skills/` and `.claude/skills/`, so an existing Claude Code install is automatically picked up — no second clone needed.
+
### OpenClaw
```bash
@@ -205,7 +218,8 @@ clawhub install drawio-pro-skill
| Platform | Global path | Project path |
|----------|-------------|--------------|
| Claude Code | `~/.claude/skills/drawio-skill/` | `.claude/skills/drawio-skill/` |
-| OpenClaw | `~/.openclaw/skills/drawio-skill/` | `skills/drawio-skill/` |
+| Opencode | `~/.config/opencode/skills/drawio-skill/` (also reads `~/.claude/skills/`) | `.opencode/skills/drawio-skill/` (also reads `.claude/skills/`) |
+| OpenClaw / ClawHub | `~/.openclaw/skills/drawio-skill/` | `skills/drawio-skill/` |
| Hermes Agent | `~/.hermes/skills/design/drawio-skill/` | Via `external_dirs` config |
| OpenAI Codex | `~/.agents/skills/drawio-skill/` | `.agents/skills/drawio-skill/` |
| SkillsMP | N/A (installed via CLI) | N/A |
@@ -278,7 +292,7 @@ CI/CD pipeline with a closed loop and 2 spur branches. Edges flow along the peri
- `SKILL.md` — **the only required file**. Loaded by all platforms as the skill instructions.
- `agents/openai.yaml` — OpenAI Codex-specific configuration (UI, policy)
-- `check-update.sh` — auto-runs on first skill use per conversation; self-throttled to once per 12h, silent when up to date
+- `update.sh` — auto-runs on first skill use per conversation; self-throttled to once per 12h, silent when up to date
- `README.md` — this file (English, displayed on GitHub homepage)
- `README_CN.md` — Chinese documentation
- `assets/` — example diagrams and workflow images
diff --git a/README_CN.md b/README_CN.md
index 3c726b7..0c8d5bd 100644
--- a/README_CN.md
+++ b/README_CN.md
@@ -22,7 +22,8 @@
| 平台 | 支持状态 | 说明 |
|------|----------|------|
| **Claude Code** | ✅ 完全支持 | 原生 SKILL.md 格式 |
-| **OpenClaw** | ✅ 完全支持 | `metadata.openclaw` 命名空间,依赖检测,安装器 |
+| **Opencode** | ✅ 完全支持 | 通过原生 `skill` 工具加载 SKILL.md,同时兼容 `.claude/skills/` 路径 |
+| **OpenClaw / ClawHub** | ✅ 完全支持 | `metadata.openclaw` 命名空间,依赖检测,ClawHub 安装器 |
| **Hermes Agent** | ✅ 完全支持 | `metadata.hermes` 命名空间,标签分类,工具门控 |
| **OpenAI Codex** | ✅ 完全支持 | `agents/openai.yaml` 侧车文件 |
| **SkillsMP** | ✅ 可索引 | GitHub topics 已配置 |
@@ -55,7 +56,7 @@
|---------|-----------|---------------|-------------------|--------------|
| **方式** | 纯 SKILL.md | SKILL.md / MCP / Project | YAML DSL + MCP | 插件 + 浏览器 |
| **依赖** | 仅 draw.io 桌面版 | draw.io 桌面版 | MCP 服务(`npx`) | 浏览器 + 本地服务 |
-| **多智能体** | ✅ 5 个平台 | ❌ 仅 Claude Code | ❌ 仅 Claude Code | ❌ |
+| **多智能体** | ✅ 6 个平台 | ❌ 仅 Claude Code | ❌ 仅 Claude Code | ❌ |
| **自检** | ✅ 2 轮自动修复 | ❌ | ❌ | ❌ 截图 |
| **迭代审查** | ✅ 5 轮循环 | ❌ 一次生成 | ✅ 3 种工作流 | ❌ |
| **布局指南** | ✅ 按复杂度分级 + 网格对齐 | ✅ 基础间距 | ❌ 依赖 MCP | ❌ |
@@ -76,7 +77,7 @@
1. **自检 + 迭代循环** — 唯一纯 SKILL.md 方案中能自动读取输出、修复问题、支持多轮优化的
2. **6 种图表类型预设** — ERD、UML 类图、序列图、架构图、ML/深度学习、流程图 — 每种都有预设形状、样式和布局规范
3. **ML/DL 模型图** — 张量形状标注、层类型配色、编码器/解码器泳道 — 专为学术论文打造
-4. **多智能体、零配置** — 跨 5 个平台运行,仅需一个 `SKILL.md` 文件 + draw.io 桌面版,无需 MCP、Python、Node.js、浏览器
+4. **多智能体、零配置** — 跨 6 个平台运行,仅需一个 `SKILL.md` 文件 + draw.io 桌面版,无需 MCP、Python、Node.js、浏览器
5. **专业级布局** — 网格对齐坐标、按复杂度分级间距、路由走廊、hub 居中策略、动画连接线
6. **浏览器降级** — 桌面 CLI 不可用时生成 diagrams.net URL,导出后自动启动桌面版编辑
@@ -146,6 +147,18 @@ git clone https://github.com/Agents365-ai/drawio-skill.git ~/.claude/skills/draw
git clone https://github.com/Agents365-ai/drawio-skill.git .claude/skills/drawio-skill
```
+### Opencode
+
+```bash
+# 全局安装(Opencode 原生路径)
+git clone https://github.com/Agents365-ai/drawio-skill.git ~/.config/opencode/skills/drawio-skill
+
+# 项目级安装
+git clone https://github.com/Agents365-ai/drawio-skill.git .opencode/skills/drawio-skill
+```
+
+Opencode 同时会读取 `~/.claude/skills/` 和 `.claude/skills/`,所以已有的 Claude Code 安装会被自动识别,无需重复 clone。
+
### OpenClaw
```bash
@@ -205,7 +218,8 @@ clawhub install drawio-pro-skill
| 平台 | 全局路径 | 项目路径 |
|------|----------|----------|
| Claude Code | `~/.claude/skills/drawio-skill/` | `.claude/skills/drawio-skill/` |
-| OpenClaw | `~/.openclaw/skills/drawio-skill/` | `skills/drawio-skill/` |
+| Opencode | `~/.config/opencode/skills/drawio-skill/`(同时读取 `~/.claude/skills/`) | `.opencode/skills/drawio-skill/`(同时读取 `.claude/skills/`) |
+| OpenClaw / ClawHub | `~/.openclaw/skills/drawio-skill/` | `skills/drawio-skill/` |
| Hermes Agent | `~/.hermes/skills/design/drawio-skill/` | 通过 `external_dirs` 配置 |
| OpenAI Codex | `~/.agents/skills/drawio-skill/` | `.agents/skills/drawio-skill/` |
| SkillsMP | N/A(通过 CLI 安装) | N/A |
@@ -279,7 +293,7 @@ CI/CD 流水线,包含闭合回路和 2 个分支。线条沿矩形外围流
- `SKILL.md` — **唯一必需的文件**,所有平台加载的 skill 指令
- `agents/openai.yaml` — OpenAI Codex 专用配置(界面、策略)
-- `check-update.sh` — Skill 首次使用时自动运行;12 小时节流、已是最新版时静默
+- `update.sh` — Skill 首次使用时自动运行;12 小时节流、已是最新版时静默
- `README.md` — 英文说明(GitHub 首页显示)
- `README_CN.md` — 本文件(中文)
- `assets/` — 示例图表和工作流图片
diff --git a/SKILL.md b/SKILL.md
index cb753a5..0d20a90 100644
--- a/SKILL.md
+++ b/SKILL.md
@@ -5,7 +5,7 @@ license: MIT
homepage: https://github.com/Agents365-ai/drawio-skill
compatibility: Requires draw.io desktop app CLI on PATH (macOS/Linux/Windows). Self-check step requires a vision-enabled model (e.g., Claude Sonnet/Opus); gracefully skipped if unavailable.
platforms: [macos, linux, windows]
-metadata: {"openclaw":{"requires":{"anyBins":["draw.io","drawio"]},"emoji":"📐","os":["darwin","linux","win32"],"install":[{"id":"brew-drawio","kind":"brew","formula":"drawio","bins":["draw.io"],"label":"Install draw.io via Homebrew","os":["darwin"]}]},"hermes":{"tags":["drawio","diagram","flowchart","architecture","visualization","uml"],"category":"design","requires_tools":["draw.io"],"related_skills":["mermaid","excalidraw","plantuml"]},"author":"Agents365-ai","version":"1.1.0"}
+metadata: {"openclaw":{"requires":{"anyBins":["draw.io","drawio"]},"emoji":"📐","os":["darwin","linux","win32"],"install":[{"id":"brew-drawio","kind":"brew","formula":"drawio","bins":["draw.io"],"label":"Install draw.io via Homebrew","os":["darwin"]}]},"hermes":{"tags":["drawio","diagram","flowchart","architecture","visualization","uml"],"category":"design","requires_tools":["draw.io"],"related_skills":["mermaid","excalidraw","plantuml"]},"author":"Agents365-ai","version":"1.2.0"}
---
# Draw.io Diagrams
@@ -62,7 +62,7 @@ Before starting the workflow, assess whether the user's request is specific enou
Skip clarification if the request already specifies these details or is clearly simple (e.g., "draw a flowchart of X").
-0. **Check for updates (first use per conversation)** — run `bash <this-skill-dir>/check-update.sh` once before the first diagram. The script self-throttles to once per 12 hours and is silent when up to date, offline, or not a git install. If it prints an update notice, include that notice verbatim in your reply to the user, then continue normally — do not block or delay on it.
+0. **Check for updates (first use per conversation)** — run `bash <this-skill-dir>/update.sh` once before the first diagram. The script self-throttles to once per 12 hours and is silent when up to date, offline, or not a git install. If it prints an update notice, include that notice verbatim in your reply to the user, then continue normally — do not block or delay on it.
1. **Check deps** — verify `draw.io --version` succeeds; note platform for correct CLI path
2. **Plan** — identify shapes, relationships, layout (LR or TB), group by tier/layer
3. **Generate** — write `.drawio` XML file to disk (output dir same as user's working dir)
diff --git a/check-update.sh b/update.sh
similarity index 100%
rename from check-update.sh
rename to update.sh