Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
feat(cua-driver): auto-wire SKILL.md for OpenClaw and OpenCode too
Francesco Bonacci26c71d18c493
diff --git a/docs/content/docs/cua-driver/guide/getting-started/installation.mdx b/docs/content/docs/cua-driver/guide/getting-started/installation.mdxindex 4a897d7b67..e9cc524a88 100644--- a/docs/content/docs/cua-driver/guide/getting-started/installation.mdx+++ b/docs/content/docs/cua-driver/guide/getting-started/installation.mdx@@ -151,18 +151,29 @@ The bundle ships an Anthropic-format SKILL.md pack at `/Applications/CuaDriver.a| Agent | Skills directory | Auto-wired by installer ||---|---|---|| Claude Code | `~/.claude/skills/cua-driver` | when `~/.claude/skills/` exists |-| Codex | `~/.agents/skills/cua-driver` | when `~/.codex/` exists (creates the agents dir if missing) |+| Codex | `~/.agents/skills/cua-driver` | when `~/.codex/` exists |+| OpenClaw | `~/.openclaw/skills/cua-driver` | when `~/.openclaw/` exists |+| OpenCode | `~/.config/opencode/skills/cua-driver` | when `~/.config/opencode/` exists |-The symlink survives auto-updates because `/Applications/CuaDriver.app` is replaced atomically — the link target stays valid across releases.+The installer creates the `skills/` subdirectory if missing, then drops the symlink. Symlinks survive auto-updates because `/Applications/CuaDriver.app` is replaced atomically — the link target stays valid across releases.-For agents without a SKILL.md auto-loader (Cursor, OpenClaw, OpenCode, Hermes, Pi), point them at the bundled skill manually if you want the same instructions:+<Callout type="info">+OpenCode also reads `~/.claude/skills/` natively, so users who have both Claude Code and OpenCode get the skill via the Claude path automatically.+</Callout>++### Agents without a SKILL.md auto-loader++Cursor, Hermes, and Pi each use a single-file system prompt (different format) instead of a skills directory. We don't auto-wire these because:++- **Cursor** (`~/.cursor/rules/*.mdc`): rules expect a different frontmatter shape (`description`/`globs`/`alwaysApply`), not Anthropic's `name`/`description`. Symlinking the SKILL.md as `.mdc` works but the frontmatter renders as a noisy comment block.+- **Hermes** (`~/.hermes/SOUL.md`) and **Pi** (`~/.pi/agent/SYSTEM.md`): replace the entire system prompt — symlinking would clobber any custom prompt you've set.++For these, paste the skill content manually into whatever instructions file the agent uses:```bash-cat /Applications/CuaDriver.app/Contents/Resources/Skills/cua-driver/SKILL.md+cat /Applications/CuaDriver.app/Contents/Resources/Skills/cua-driver/SKILL.md | pbcopy```-You can paste it into the agent's system prompt, instructions file, or whatever per-project context mechanism the agent uses (e.g. Cursor's `.cursorrules`, project-level `AGENTS.md`).-## Uninstall```bashdiff --git a/libs/cua-driver/scripts/install.sh b/libs/cua-driver/scripts/install.shindex 5fd3c4feaa..5ce9f22cca 100755--- a/libs/cua-driver/scripts/install.sh+++ b/libs/cua-driver/scripts/install.sh@@ -132,15 +132,26 @@ log "symlinked $BIN_LINK -> $APP_BINARY"# --- Install agent skill pack -------------------------------------------#-# Drop a symlink for each detected agent that auto-loads SKILL.md skills:+# Drop a symlink for each detected agent that auto-loads Anthropic-format+# SKILL.md skills from a folder. Auto-updates atomically replace+# /Applications/CuaDriver.app so the symlinks stay valid across releases.+# We never overwrite an existing link or directory — dev users with a+# symlink pointing at a working copy of the repo keep theirs.+#+# Supported (folder-of-skills, frontmatter compatible):# - Claude Code: scans ~/.claude/skills/ on startup-# - Codex : scans ~/.agents/skills/ on startup (Codex adopted Anthropic's-# SKILL.md format; the "agents" path is shared, not Codex-specific)+# - Codex : scans ~/.agents/skills/ on startup+# - OpenClaw : scans ~/.openclaw/skills/+# - OpenCode : scans ~/.config/opencode/skills/ (also reads ~/.claude/skills/+# natively, so the Claude Code symlink covers OpenCode for users+# who have both)#-# Auto-updates atomically replace /Applications/CuaDriver.app so the symlinks-# stay valid across every release. We never overwrite an existing link or-# directory — dev users with a symlink pointing at a working copy of the repo-# keep theirs.+# Not auto-wired (different file format / would clobber user state):+# - Cursor: rules use a different frontmatter shape (description/globs/+# alwaysApply) — paste manually into ~/.cursor/rules/.+# - Hermes: SOUL.md replaces the system prompt — overwriting would destroy+# user customisations.+# - Pi : SYSTEM.md / AGENTS.md are single-file replacements; same risk.SKILL_TARGET="$APP_DEST/Contents/Resources/Skills/cua-driver"@@ -174,6 +185,20 @@ if [[ -d "$HOME/.codex" ]] && [[ ! -d "$HOME/.agents/skills" ]]; thenfilink_skill_into "$HOME/.agents/skills" "Codex"+# OpenClaw — create ~/.openclaw/skills if OpenClaw is installed but the+# skills dir hasn't been initialized yet, then link.+if [[ -d "$HOME/.openclaw" ]] && [[ ! -d "$HOME/.openclaw/skills" ]]; then+ mkdir -p "$HOME/.openclaw/skills"+fi+link_skill_into "$HOME/.openclaw/skills" "OpenClaw"++# OpenCode (sst/opencode) — create ~/.config/opencode/skills if OpenCode is+# installed but the skills dir hasn't been initialized yet, then link.+if [[ -d "$HOME/.config/opencode" ]] && [[ ! -d "$HOME/.config/opencode/skills" ]]; then+ mkdir -p "$HOME/.config/opencode/skills"+fi+link_skill_into "$HOME/.config/opencode/skills" "OpenCode"+# --- Done ---------------------------------------------------------------log "cua-driver $VERSION installed"diff --git a/libs/cua-driver/scripts/uninstall.sh b/libs/cua-driver/scripts/uninstall.shindex ee1e3f2bb2..536ee2b33e 100755--- a/libs/cua-driver/scripts/uninstall.sh+++ b/libs/cua-driver/scripts/uninstall.sh@@ -80,7 +80,9 @@ fiSKILL_TARGET_EXPECTED="$APP_BUNDLE/Contents/Resources/Skills/cua-driver"for SKILL_LINK in \"$HOME/.claude/skills/cua-driver" \- "$HOME/.agents/skills/cua-driver"; do+ "$HOME/.agents/skills/cua-driver" \+ "$HOME/.openclaw/skills/cua-driver" \+ "$HOME/.config/opencode/skills/cua-driver"; doif [[ -L "$SKILL_LINK" ]] && [[ "$(readlink "$SKILL_LINK")" == "$SKILL_TARGET_EXPECTED" ]]; thenrm -f "$SKILL_LINK"log "removed $SKILL_LINK"