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.

feat: add cross-platform update checker script

Agents365-aib42d898f1b99
diff --git a/README.md b/README.md
index ad38cc1..51d9289 100644
--- a/README.md
+++ b/README.md
@@ -185,6 +185,34 @@ skills install drawio-skill
| OpenAI Codex | `~/.agents/skills/drawio-skill/` | `.agents/skills/drawio-skill/` |
| SkillsMP | N/A (installed via CLI) | N/A |
+## Updates
+
+Check for updates:
+
+```bash
+# Run from anywhere — pass your install path
+bash ~/.claude/skills/drawio-skill/scripts/check-update.sh
+
+# Or from the skill directory
+cd ~/.claude/skills/drawio-skill && bash scripts/check-update.sh
+```
+
+Update to latest version:
+
+```bash
+cd <your-install-path>/drawio-skill && git pull
+```
+
+Platform-specific package managers:
+
+```bash
+# OpenClaw
+clawhub update drawio-skill
+
+# SkillsMP
+skills update drawio-skill
+```
+
## Usage
Just describe what you want:
@@ -233,6 +261,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)
+- `scripts/check-update.sh` — lightweight update checker (compares local vs remote HEAD)
- `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 d210f1c..97b055c 100644
--- a/README_CN.md
+++ b/README_CN.md
@@ -185,6 +185,34 @@ skills install drawio-skill
| OpenAI Codex | `~/.agents/skills/drawio-skill/` | `.agents/skills/drawio-skill/` |
| SkillsMP | N/A(通过 CLI 安装) | N/A |
+## 更新
+
+检查是否有新版本:
+
+```bash
+# 从任意位置运行 — 传入安装路径
+bash ~/.claude/skills/drawio-skill/scripts/check-update.sh
+
+# 或在 skill 目录下运行
+cd ~/.claude/skills/drawio-skill && bash scripts/check-update.sh
+```
+
+更新到最新版本:
+
+```bash
+cd <你的安装路径>/drawio-skill && git pull
+```
+
+平台包管理器:
+
+```bash
+# OpenClaw
+clawhub update drawio-skill
+
+# SkillsMP
+skills update drawio-skill
+```
+
## 使用方式
直接描述你想要的图表:
@@ -234,6 +262,7 @@ CI/CD 流水线,包含闭合回路和 2 个分支。线条沿矩形外围流
- `SKILL.md` — **唯一必需的文件**,所有平台加载的 skill 指令
- `agents/openai.yaml` — OpenAI Codex 专用配置(界面、策略)
+- `scripts/check-update.sh` — 轻量级更新检查器(比较本地与远程 HEAD)
- `README.md` — 英文说明(GitHub 首页显示)
- `README_CN.md` — 本文件(中文)
- `assets/` — 示例图表和工作流图片
diff --git a/scripts/check-update.sh b/scripts/check-update.sh
new file mode 100755
index 0000000..5bd950d
--- /dev/null
+++ b/scripts/check-update.sh
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+# Check if drawio-skill has updates available on the remote.
+# Usage: bash scripts/check-update.sh [skill-dir]
+# skill-dir defaults to the script's parent directory.
+# Exit codes: 0 = update available, 1 = up to date, 2 = error
+
+set -euo pipefail
+
+SKILL_DIR="${1:-$(cd "$(dirname "$0")/.." && pwd)}"
+
+if ! git -C "$SKILL_DIR" rev-parse --git-dir &>/dev/null; then
+ echo "Not a git repository: $SKILL_DIR" >&2
+ exit 2
+fi
+
+REMOTE_HASH=$(git -C "$SKILL_DIR" ls-remote origin HEAD 2>/dev/null | cut -f1)
+LOCAL_HASH=$(git -C "$SKILL_DIR" rev-parse HEAD 2>/dev/null)
+
+if [ -z "$REMOTE_HASH" ]; then
+ echo "Cannot reach remote (offline?)" >&2
+ exit 2
+fi
+
+if [ "$REMOTE_HASH" != "$LOCAL_HASH" ]; then
+ echo "Update available for drawio-skill."
+ echo " Local: ${LOCAL_HASH:0:8}"
+ echo " Remote: ${REMOTE_HASH:0:8}"
+ echo " Run: cd $SKILL_DIR && git pull"
+ exit 0
+else
+ echo "drawio-skill is up to date."
+ exit 1
+fi