core
Skill456 starsChanged 14 days agoApache-2.0View on GitHub
Control a screen-relay desktop from an agent using screenshots and input commands.
- Installs packages
29 other projects use a version of this.
Adopted by
Most recently taken up by
- ma-serra/claude-skillsjtheir own version, first seen Nov 22, 2026
- oberemokis/skillstheir own version, first seen Nov 15, 2026
- gkurt/ai-soulstheir own version, first seen Nov 8, 2026
- vercel-labs/json-rendertheir own version, first seen Oct 29, 2026
- fishzjp/qa-skillstheir own version, first seen Oct 21, 2026
- ryu111/claude-workflow-configtheir own version, first seen Oct 20, 2026
Used with
Projects with it also use ts-core, native-ui and 3 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
VercelSkillts-core
Authoring guide for the primary Native SDK app-logic path: TypeScript app cores - Model, Msg, update, and the pure functions they call, written in the closed app-core subset, checked by the @native-sdk/core frontend, and compiled ahead-of-time to native code by the external core compiler. Use for new apps unless the user explicitly chose Zig, when writing or modifying a src/core.ts app core, fixing subset checker errors (NS1001-NS1069), or deciding how to express state, messages, text (bytes and the byte-text string methods), text input, continuous controls (sliders, scroll), effects (Cmd), subscriptions (Sub), the host-event wiring channels (frameMsg, keyMsg, pinchMsg, dropMsg, appearanceMsg, chromeMsg, envMsgs, app manifest assets), derived values, the view_unbound lint opt-out, local mutation of owned arrays, or how to split a core into modules under src/ (relative imports, namespace imports, @native-sdk/core/text, @native-sdk/core/events). Use ts-services alongside this guide for src/services work.
Also in 3 projects that use this
VercelSkillnative-ui
Authoring guide for the Native markup (.native) view tier of native-rendered Native SDK apps. TypeScript cores are the default and use this skill together with ts-core; Zig cores are an explicit alternative and this guide labels their lower-level UiApp recipes. Use when building or modifying native UI (widgets, layout, bindings, messages), writing .native files, wiring views to Model/Msg/update, testing markup views, or verifying a native app through the automation harness.
Also in 3 projects that use this
SentrySkillreview
Fixture review skill.
Also in 3 projects that use this
- +2 more from vercel-labs
Other versions29 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 29
- vercel-labs/agent-browser★ 55ksame name
- vercel-labs/json-render★ 20ksame name
- microsoft/data-formulator★ 17ksame name
- microsoft/RD-Agent★ 15ksame name
- vercel-labs/zero-native★ 7.8ksame name
- vercel-labs/native★ 7.8ksame name
- vercel-labs/issue-graph★ 222same name
- vercel-labs/xref★ 222same name
- fishzjp/qa-skills★ 64same name
- modeled-information-format/mnemonic★ 23same name
19 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- architecture-diagramSkill
- technical-writerSkill
- screen-relaySkill
- vercel-sandboxSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 0 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 21 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
After an upgrade, the next up rebuilds the engine.
- Very specific: line 80
Read values by looking at the screenshot.
- Very specific: line 105
If the engine answered (busy, invalid_input, unsupported_input), resend only the rest of the text.
- Very specific: line 106
If the reply was lost (timeout, unreachable, disconnected), the last batch may already be on screen.
- Very specific: line 110
Add --json to any command.
- Very specific: line 121
When next is present, run next[0].command.
- Very specific: line 162
Run screen-relay doctor first.
“Common” is measured: kept by at least 6 in 10 of the 21 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
screen-relay core workflow
screen-relay streams a desktop to a browser viewer and gives you CLI control. Run it on the Linux, macOS or Windows machine that shows the desktop. Node 22 or newer is required.
Set up
npm install -g screen-relay
screen-relay install --yes
screen-relay up -dnpm install -g screen-relayinstalls the CLI, the Node SDK, the viewer, the agent skills and the engine source. It runs no install script and installs no system packages. Client commands work at once with--urland a token file.screen-relay install --yesinstalls the system packages and builds the engine. On a fresh machine it can take several minutes. Run it with a long command timeout or in the background, and wait for it to exit beforeup. It is safe to repeat. With--jsonit prints nothing until it finishes. A failed step returns one JSON error with the command and the end of its output.upruns setup when the machine is not set up. You have no terminal, so pass--yes.install --backend wayland --yessets up sway, XWayland and foot.--desktop noneskips the XFCE packages on x11.up -d --yesruns setup and starts the session in one command.- After an upgrade, the next
uprebuilds the engine. That needs nosudo. - Linux: automatic setup supports Debian, Ubuntu, Fedora, Arch Linux and Alpine on x64 and arm64. It needs root or passwordless
sudo. On another distribution, install the build tools and libraries yourself, then runscreen-relay install. - macOS: setup needs Homebrew and the Xcode Command Line Tools. See macOS.
- Windows: setup needs Windows 10 or later on x64. When
C:\msys64is absent, setup creates the folder with its access rules and installs MSYS2 with winget. It uses an existing folder only when the owner and write rules of every file and directory in it pass its check. It does not change the access rules of an existing installation, only adds packages with pacman; if the check fails, deleteC:\msys64without running any program from it, including its uninstaller, and runscreen-relay installagain. Without winget, install App Installer; a manual MSYS2 installation must already have the access rules. Run the commands in a terminal on the signed-in user's desktop.upover SSH or from a service session fails withNo display is attached to this sessionorDesktop Duplication is unavailable. See Windows.
Pick a backend
| Platform | Backend | Start |
| macOS | macos: streams the logged-in user's display. Starts no virtual display or desktop. | screen-relay up -d |
| Windows | windows: streams the signed-in user's desktop. Starts no virtual display or desktop. | screen-relay up -d |
| Linux | x11: a virtual display with XFCE. | screen-relay up -d |
| Linux | wayland: a headless sway desktop with foot. | screen-relay up -d --backend wayland |
| Linux | Attach to a compositor you already run. | screen-relay up -d --backend wayland --display "$WAYLAND_DISPLAY" |
- On Linux,
upusesx11when the engine has it, elsewayland. - Precedence:
--backend, thenSCREEN_RELAY_BACKEND, then the configbackendkey, then the default above. - Set up a backend before you use it, for example
screen-relay install --backend wayland --yes. - To switch backends, run
screen-relay downfirst. While a session with that name runs,upfails withalready_running. - To attach, run the command from a terminal inside that session.
--displaytakes an X display such as:0on x11, or a Wayland socket such aswayland-1on wayland. A--displaywithout a colon selects wayland. Attach mode uses the display's size and starts no desktop. Compositor setup and limits: Wayland.
Where commands run
- VM commands (
install,up,down,logs,run,doctor) run on the Linux, macOS or Windows machine that shows the desktop.up,downandrunfail withunsupported_platformelsewhere. - Client commands (
status,screenshot,click,move,scroll,key,type,input) reach the engine through the local session, or from another machine with--urland a token file (--token-fileorSCREEN_RELAY_TOKEN_FILE). See Client target. skillsandhelpwork anywhere and never contact an engine.- A script can use the Node SDK instead of the CLI. See Node SDK.
Start a session
screen-relay up -d
screen-relay status --jsonup -dreturns when the display, desktop and engine are ready. Piped, it prints the viewer URL, with the#token=fragment when the session has a token. Treat that URL as a secret.status --jsonprints{"session": {...}}. Readsession.state(starting,ready,stopped,failed),session.running,session.urlandsession.display.- An existing session exits 0 in any state. A missing session exits 1 with
not_running.
Control loop
Take a screenshot, decide from the image, act, then take another screenshot to verify. This run opens a terminal, types, and checks the result. On Wayland, use foot in place of xfce4-terminal. On macOS, use screen-relay run -- open -a Terminal.
screen-relay up -d
screen-relay run -- xfce4-terminal
sleep 1
screen-relay screenshot /tmp/relay.png
screen-relay click 0.5 0.5
screen-relay type "echo hello"
screen-relay key Enter
screen-relay screenshot /tmp/relay-after.pngrunreturns the app's pid at once. The window appears a moment later, so pollscreenshotuntil you see it. Read app output withscreen-relay logs apps.screen-relay downstops apps.- A saved screenshot means the engine captured the frame. Applied input means the engine applied the events. Neither means the app reacted, so check the next screenshot.
- Click a window before you type into it. A click also moves the pointer.
- Read values by looking at the screenshot.
--jsonreports geometry and sizes, not text:
{"screenshot":{"path":"/tmp/relay.png","width":1920,"height":1080,"bytes":48213},"outcome":"saved"}Scroll with screen-relay scroll 0.5 0.5 --dy 5, then take a screenshot. For --dx and --dy, see CLI.
Coordinates
Coordinates are fractions from 0 to 1, measured from the top-left.
x = pixel_x / image_width
y = pixel_y / image_heightFor a 1920x1080 screenshot, pixel 480,810 is screen-relay click 0.25 0.75, and the center is screen-relay click 0.5 0.5. Get the image size from screen-relay screenshot file.png --json, or from the image.
type versus key
screen-relay type <text>sends layout-neutral text events, one per Unicode scalar value. The remote keyboard layout decides each character, so accents, symbols and non-US layouts work. Use it for text.screen-relay key <combo>...sends physical key combinations, in order, such asctrl+l,alt+Tab,cmd+shift+tandEnter. Use it for shortcuts, arrows, function keys and Escape. Modifiers arectrl,shift,altandsuper.cmd,metaandwinaliassuper.- To enter a long text, or text the layout cannot type, put it on the clipboard and paste it:
screen-relay clipboard set --stdin < file.txt, thenscreen-relay key ctrl+v(super+von macOS). To read text an app copied, runscreen-relay clipboard get. - A long
typeis sent in batches of at most 256 events. On failure,data.appliedis the number of events the engine confirmed.- If the engine answered (
busy,invalid_input,unsupported_input), resend only the rest of the text. - If the reply was lost (
timeout,unreachable,disconnected), the last batch may already be on screen. Take a screenshot before you resend anything.
- If the engine answered (
JSON
Add --json to any command. Success writes one document to stdout and leaves stderr empty. Output shapes: CLI output.
On failure, stdout is empty and stderr has one compact document:
{"status":"error","reason":"busy","message":"Another controller holds control of the desktop.","data":{"httpStatus":409}}
{"status":"action_required","reason":"invalid_input","message":"Invalid x: '2'.","next":[{"command":"screen-relay help click","argv":["screen-relay","help","click"]}]}statusisaction_requiredwhen the command stopped before any effect and input would let it run. Otherwise it iserror.- Match
reason, notmessage.reasonis a stable snake_case code. - When
nextis present, runnext[0].command. dataholds context:componentandlogsafter a component failure,appliedafter a partial input batch,httpStatusfrom the engine.
Exit codes: CLI exit codes.
Reasons and recovery
| Reason | Meaning | Recovery |
busy | Another controller holds input, or a screenshot is already running. | See One controller. Screenshots still work. |
unauthorized | Missing or wrong token. | Pass --token-file FILE or set SCREEN_RELAY_TOKEN_FILE. Or open the #token= viewer link. |
forbidden | The engine rejected Host or Origin. | Use the --public URL or a loopback page whose origin matches the address it connects to. For a browser page on another origin, restart with --allow-origin. |
unreachable | Cannot connect: Connection refused., The host name did not resolve. or The TLS certificate was rejected. | Check the address, then screen-relay status --url <URL>. |
timeout | No reply within --timeout, or up was not ready in time. | Raise --timeout. For up, read the component log. |
not_running | No session or logs with that name. | screen-relay up -d. |
not_found | No running session for run or a skill, or an unknown engine endpoint. | Start the session, or run screen-relay skills list. |
already_running | A session with that name is running. | screen-relay down --name N, or pick another name and port. |
component_failed | The display, desktop, engine, supervisor or an app exited. data.component and data.logs are set. | screen-relay logs <component>. |
missing_dependency | A host program or the engine binary is missing. | screen-relay install --yes, with --backend wayland for Wayland. Or screen-relay doctor. |
missing_input | up needs setup and has no terminal to ask (exit 2). | screen-relay install --yes, then screen-relay up -d. Or screen-relay up -d --yes. |
missing_command | run was given no app (exit 2). | screen-relay run -- APP. |
spawn_failed | run could not start the app. | Check the app name and screen-relay logs apps. |
unsupported_input | The backend cannot produce a character or apply the input. | Use screen-relay type for layout-neutral text. |
clipboard_unavailable | The desktop has no clipboard the engine can use, or the app that owns it did not answer. | Use screen-relay type instead. status --json shows capabilities.clipboard. |
unsupported_platform | up, down or run ran on a platform other than Linux, macOS or Windows. | Run host commands on the Linux, macOS or Windows machine that shows the desktop. |
invalid_config | A config key or value is invalid. The message names the file and key. | Fix the file and start again. |
invalid_input, invalid_option, unknown_command | Usage error (exit 2). | Read the next command, usually screen-relay help <command>. |
internal | A bug in screen-relay. | Report it with the command you ran. |
One controller
Only one controller sends input at a time. A viewer claims idle input when it opens. If you hold an SDK control session, the viewer opens view-only. Choose Release control in a viewer that owns input before sending input with the CLI. A second controller gets busy with the message Another controller holds control of the desktop., and nothing is applied. Screenshots, status and capabilities keep working. Do not retry in a loop. Wait for the other controller to release control or close, then retry once.
A person can open the viewer while you hold an SDK control session, and choose Take control at any time. Pending and future input and future session.screenshot() calls fail with control_taken. session.capabilities() and session.status() still use HTTP. Connect again only after the person releases control.
Config
Keys, defaults, file location and precedence: config.
Troubleshooting
- Run
screen-relay doctorfirst. It prints a fix command for each failing check. For Wayland, runSCREEN_RELAY_BACKEND=wayland screen-relay doctor. screen-relay logsprints the last 200 lines of every component log.screen-relay logs <component>selects one:display,dbus,desktop,engineorapps. Add-fto follow.- For symptoms and fixes, see troubleshooting.
References
references/cli.md: commands, options, output and exit codes.references/config.md: config keys, defaults and precedence.references/sdk.md: the Node SDK for scripts.references/wayland.md: Wayland compositors, attach mode and limits.references/macos.md: macOS install, permissions, display choice and limits.references/troubleshooting.md: symptoms and fixes.screen-relay skills get vercel-sandbox: run screen-relay in a Vercel Sandbox.- https://screen-relay.dev/docs: the published documentation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

