rusty-robot
/rusty-robot
Integrate Rusty Robot desktop automation in Rust applications or migrate RobotJS input and image workflows. Use for native mouse/keyboard input, screen capture, bitmap search, and consumer verification with this library.
- Author
- priyankark ↗
- Repository
- rusty-robot ↗
- Licence
- MIT
- Last repository change
- 04.11.2026
Assessment and security
- Files in this package
- 4
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 1
No signals detected. Repository changed on 04.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Integrate Rusty Robot desktop automation in Rust applications or migrate RobotJS input and image workflows. Use for native mouse/keyboard input, screen capture, bitmap search, and consumer verification with this library.
Original author description
Integrate Rusty Robot desktop automation in Rust applications or migrate RobotJS input and image workflows. Use for native mouse/keyboard input, screen capture, bitmap search, and consumer verification with this library.
How it works
- Working sequence
- Non-obvious contracts
- Native media for Node hosts
SKILL.md preview
--- name: rusty-robot description: Integrate Rusty Robot desktop automation in Rust applications or migrate RobotJS input and image workflows. Use for native mouse/keyboard input, screen capture, bitmap search, and consumer verification with this library. --- # Rusty Robot Use the `rusty-robot-desktop` Cargo package (`rusty_robot` import) from https://github.com/priyankark/rusty-robot. The Node package is `@priyankark/rusty-robot`. This is a library, not a CLI or MCP server. Inspect the consumer before selecting an integration boundary; keep its authentication, focus policy, and input ownership. ## Working sequence 1. Identify OS, interactive session, crate revision, and the consumer's current input/capture path. Start with permission queries, display enumeration, and cursor position. Confirm the session is unlocked and the owned target has focus before input; an available display alone does not establish either. `Option<bool>::None` means the platform has no corresponding permission API, not that access is granted. 2. For Rust, read [Rust API recipes](references/rust-api.md). For Node/TypeScript, also read [consumer integration](references/node-integration.md). Pin the published package version; use a release commit for source builds. 3. Compile the smallest real consumer path. Use an owned test window for live input. Assert what the target app received, not merely a successful API return. Reuse existing task authorization; this skill adds no permission to message, publish, or operate unrelated applications. 4. Add regressions at the boundary that failed: Rust contracts, adapter forwarding, input ownership, event ordering, or native delivery. Record executed tests, platform, display scale, skipped cases, and meaningful limitations separately. ## Non-obvious contracts - `Robot` is a stateless unit struct. Delays and held-input state are process-wide. Serialize an automation sequence in the consumer; individual API locks do not make a multi-call sequence atomic. Release held keys/buttons during cancellation. - Desktop positions are signed logical coordinates. Bitmap positions are unsigned physical pixels. Preserve `screen_x`, `screen_y`, `scale_x`, `scale_y`; use bitmap conversion methods for image-based clicks. A capture rectangle must fit inside one display. `capture(None)` selects the main display, not the entire desktop. - `get_pixel_color` accepts nonnegative main-display coordinates. For a monitor at a negative origin, use `capture(Some(rect))` and bitmap `color_at`. - A key is named `enter`, not `return`; modifiers include `command`, `control`, `alt`, and `shift`. Use `type_string` for Unicode text, `key_tap` for shortcuts. macOS `type_string` batches up to 20 UTF-16 units per native event with a 10 ms minimum interval per batch. Newlines use Return events. `type_string_delayed` retains per-scalar pacing. - `drag_mouse` moves with a held button; callers still press/release it. When adapting a stream of mouse events, track the held button and use drag movement. - Bitmap storage is BGR/BGRA with row stride; it is not tightly packed RGBA. Search ignores alpha. Pixel strings are six-digit RGB without `#`. - OS differences matter: macOS 14+ needs Accessibility and Screen Recording; Linux needs X11/XTest and `DISPLAY` (no native Wayland); Windows needs an interactive desktop. Do not treat cross-compilation as native verification. - Measure consumer workloads before replacing capture: recorded macOS one-pixel and small-region captures were slower than RobotJS. Avoid per-pixel captures; capture once and search the bitmap when appropriate. For library changes, run `cargo test --all-features --locked`, the corresponding `--no-default-features` run, fmt and Clippy. Native test instructions and benchmark limitations live in the repository's `docs/testing.md` and `docs/benchmarks.md`. ## Native media for Node hosts Use `crates/rusty-robot-media` for Rust capture/resize/hash/encode and the shared `crates/rusty-robot-node` bridge for Node apps. Install `@priyankark/rusty-robot@0.1.2` for verified prebuilt binaries, or build from source with `node scripts/build-node.cjs`. `await addon.captureFrame(1440, 85, previousFingerprint, forceRefresh, 'jpeg')` returns dimensions, fingerprint and optional `data`. Missing data means unchanged; force a periodic refresh for recovering subscribers. `resizeImage` accepts JPEG/PNG. Pixel work runs on workers with two outstanding jobs maximum and four resize threads. Keep one live capture in flight, drop obsolete results after stop/settings changes, and handle queue rejection. Do not silently fall back to JS when Rust is selected. Benchmark real socket delivery with fixed dimensions/quality/FPS; distinguish host CPU from subprocess/system CPU and invalid output from successful delivery.
Files in this package (4)
- SKILL.md 5 KB
- agents/openai.yaml 1 KB
- references/node-integration.md 5 KB
- references/rust-api.md 2 KB
Versions
The database has no other skills named rusty-robot.
Database snapshot: 13.11.2026 · package version 3d8347f43532 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100input-system
Handle player input in Godot across keyboard, mouse, gamepad, and touch devices. Use this skill when configuring input actions, processing keyboard/mouse/gamepad events, implementing touch controls, setting up virtual joysticks, managing mouse modes, or building remappable input systems. - 100robot-framework-skill
Generates Robot Framework tests in keyword-driven syntax with Python. Supports SeleniumLibrary, RequestsLibrary, and custom keywords. Use when user mentions \"Robot Framework\", \"*** Test Cases ***\", \"SeleniumLibrary\", \".robot file\". - 95robot-framework-skill
Generates Robot Framework tests in keyword-driven syntax with Python. Supports SeleniumLibrary, RequestsLibrary, and custom keywords. Use when user mentions "Robot Framework", "*** Test Cases ***", "SeleniumLibrary", ".robot file". Triggers on: "Robot Framework", "*** Test Cases… - 100robot-framework-skill
Generates Robot Framework tests in keyword-driven syntax with Python. Supports SeleniumLibrary, RequestsLibrary, and custom keywords. Use when user mentions \"Robot Framework\", \"*** Test Cases ***\", \"SeleniumLibrary\", \".robot file\". - 100snapfit
Turn one picture of a robot (plus a flat-pack picture of it) into a 3D robot written in three.js that lies in pieces on the floor and builds itself part by part, on one offline HTML page with a 24.5 s cursor tour and its own music. Then upgrade it in measured rounds against the… - 100uloop-replay-input
Replay recorded PlayMode keyboard and mouse input. Use for exact gameplay reproduction, E2E runs, or consistent demos from JSON recordings.