cua-driver

cua-driver is a skill for Claude Code, Codex from melandlabs/openloomi. It costs 96 tokens per session (11,818 once invoked), scanned A, original, Apache-2.0.

A guide for controlling real macOS applications through their accessibility controls, such as buttons, text fields, and menus. It describes taking a screen-structure snapshot before each action and checking the result afterward.

In plain words
What is it for?
Use it to open, navigate, click, type, scroll, and verify actions in native macOS applications such as TextEdit.
Why use it?
It helps automate desktop apps without unexpectedly bringing them to the front or disturbing the app the user is working in.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code; mentions OpenCode.

Good fit Use it to open, navigate, click, type, scroll, and verify actions in native macOS applications such as TextEdit.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/melandlabs/openloomi/cua-driver
About the project

OpenLoomi is an open-source desktop AI coworker that connects work tools, gathers context, and highlights decisions or actions needing attention. It is for people managing work across multiple apps, and its catalogue add-ons extend the resident desktop for agent frameworks such as Claude Code, Codex, OpenCode, Hermes, and OpenClaw.

melandlabs/openloomi · 1,040 stars · on GitHub · openloomi.ai

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add melandlabs/openloomi --skill cua-driver
Clone the repo
git clone --depth 1 https://github.com/melandlabs/openloomi

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cua-driver

README.md
[![agentmods](https://agentmods.dev/badge/skills/melandlabs/openloomi/cua-driver/github.svg)](https://agentmods.dev/skills/melandlabs/openloomi/cua-driver)
Your own site
<a href="https://agentmods.dev/skills/melandlabs/openloomi/cua-driver"><img src="https://agentmods.dev/badge/skills/melandlabs/openloomi/cua-driver/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cua-driver

Your own site · 80×15
<a href="https://agentmods.dev/skills/melandlabs/openloomi/cua-driver"><img src="https://agentmods.dev/badge/skills/melandlabs/openloomi/cua-driver.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 11,818 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 39
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 409
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00096 $0.11818
Opus 5.5 $0.00038 $0.04727
Sonnet 5.5 $0.00019 $0.02364
Haiku 4.5 $0.00010 $0.01182

Measured 2mo ago against content hash 5c0e46c628d0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cua-driver scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/cua-driver/SKILL.md · 888 lines

How it starts

The opening of the file, as written. The whole thing — 888 lines — stays where its author put it; the contents beside it link to each section on GitHub.

cua-driver

Orchestrates macOS app automation via cua-driver. Whenever a user asks to drive a native macOS app, follow the loop in this skill rather than calling tools ad-hoc — the snapshot-before-action invariant is not optional and silently breaks if you skip it.

The no-foreground contract — read this first

The user's frontmost app MUST NOT change. This is the whole reason cua-driver exists. Users pay for the right to keep typing in their editor while an agent drives another app in the background. Violate this rule and every other nice property the driver gives you (no cursor warp, no Space switch, no window raise) stops mattering — you just shipped the Accessibility Inspector with extra steps.

Before running any shell command, ask: "does this raise, activate, foreground, or make-key any app?" If yes, don't run it. Every one of the commands below activates the target on macOS and is therefore forbidden unless the user explicitly asked for frontmost state:

  • Every form of the open CLI — open -a <App>, open -b <bundle-id>, open <file>, open <path-to-App.app>, open <url> — always activates. macOS routes all forms through LaunchServices, which unhides and foregrounds the target regardless of whether you passed an app name, a bundle id, a document, a URL, or the bundle path itself. The activation happens even when the only intent was "start the process." Never use open for any app launch. This includes launching a just-built .app from a local build dir (e.g. open build/Build/Products/Debug/MyApp.app) — resolve the CFBundleIdentifier from Info.plist and use launch_app with that id. See "The narrow carve-out" below for why launch_app is safe even when the app internally calls NSApp.activate.
  • osascript -e 'tell application "X" to activate' — activates by design. Same for ... to open <file>, ... to launch, and anything with activate in the tell block.
  • osascript -e 'tell application "System Events" to ... frontmost' in a mutating form (setting frontmost rather than reading it).
  • AppleScript files that invoke activate, launch, or open against the target app.
  • cliclick (moves the user's real cursor to the target coords before clicking — a focus-steal-equivalent even if the app's window state is unchanged).
  • CGEventPost with cghidEventTap targeting a coordinate over a different app's window (warps the cursor, possibly activates on hit).
  • AppleScriptTask, NSAppleScript, Process wrapping osascript that contains any of the above.
  • NSRunningApplication.activate(options:) called from your own helper binary — same class.
  • Dock clicks and any open invocation (see the first bullet — every form of open goes through LaunchServices which activates, full stop).
  • Keyboard shortcuts that semantically mean "focus here" — most notably Chrome / Safari / Arc's ⌘L (focus omnibox) and Finder's ⌘⇧G (Go to Folder). These aren't pure key events — the receiving app interprets "user wants to type here" as activation intent and raises its window to be key. Even when delivered to a backgrounded pid via hotkey, the downstream app pulls focus. For omnibox navigation specifically, the correct path is launch_app({bundle_id: "com.google.Chrome", urls: ["https://…"]}) — no omnibox dance, no ⌘L, no focus-steal. Do NOT try set_value on the omnibox: Chrome's commit logic requires a "user-typed" signal that neither an AX value write nor CGEvent.postToPid keystrokes supply from a backgrounded pid — the URL lands in the field but Return fires as a no-op. See WEB_APPS.md → "Navigate to a URL" for the full pattern. The general principle: a shortcut that says "put my cursor inside this app" is a focus-steal; a shortcut that says "do this thing" (copy, save, quit) is fine.
  • Tab-switching shortcuts in browsers (⌘1..⌘9, ⌘], ⌘[, ⌘⇧[, ⌘⇧]) are visibly disruptive even when delivered to a backgrounded pid. The app's key handler processes the shortcut, the window re-renders the new tab's content, the user sees their tabs flipping. There is no AX-only workaround: page content (HTML, form state, AXWebArea) populates only for the focused tab; inspecting a background tab requires activating it, which is the visible flip. Observed with Dia; the same mechanic applies to every Chromium-family browser (Chrome, Arc, Brave, Edge).

Read the full file on GitHub · 888 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 888 lines · 96 tokens per session scan A 5c0e46c628d0

Subscribe to this mod's changes

cua-driver is a skill published in the GitHub repository melandlabs/openloomi (1,040 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 96 tokens to every session and 11,818 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

cua-driver compared with skills from other repositories

cua-driver next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cua-drivermelandlabs/openloomiSkill1.0k1mo agoApache-2.0A96Claude Code, Codex
web-exfiltration-detectionTencent/AI-Infra-GuardSkill7.4kyesterdayApache-2.0A61Claude Code
browserwing-executorMemTensor/MemOSSkill12k2d agoApache-2.0A42Claude Code, Codex
harness-creatorwalkinglabs/learn-harness-engineeringSkill23k15d agoMITA142Codex
dev-browserMemTensor/MemOSSkill12k2d agoApache-2.0A84Claude Code, Codex
web-searchopensquilla/opensquillaSkill7.1k6d agoApache-2.0A76Claude Code, Codex
langbot-testinglangbot-app/LangBotSkill19kyesterdayApache-2.0A58Claude Code, Codex