Run commands on the owner's remote devices, Linux, macOS or Windows (a Jetson, a Raspberry Pi, a home server, a Mac, a Windows PC), through agent-device-access - install the device-access binary, log in with DEVICE_ACCESS_HUB, DEVICE_ACCESS_EMAIL and DEVICE_ACCESS_PASSWORD, list your devices, read a device's system facts, run shell commands and read its logs. Use when the owner says to use agent-device-access or device-access, or asks what a device is doing, why it is slow or broken, or to lo...
2 stars
0 votes
0 copies
0 views
Added December 2, 2026
ai-agentsgoshellnodegit
Security analysis
C60/100
highPerforms destructive filesystem operations
criticalSends environment variables or credentials to an external URL
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Agent To Device?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/litvak-daniil-agent-to-device)
---
name: agent-to-device
description: Run commands on the owner's remote devices, Linux, macOS or Windows (a Jetson, a Raspberry Pi, a home server, a Mac, a Windows PC), through agent-device-access - install the device-access binary, log in with DEVICE_ACCESS_HUB, DEVICE_ACCESS_EMAIL and DEVICE_ACCESS_PASSWORD, list your devices, read a device's system facts, run shell commands and read its logs. Use when the owner says to use agent-device-access or device-access, or asks what a device is doing, why it is slow or broken, or to look at or change something on a device.
---
# agent-to-device: an agent's hand on the owner's devices
`device-access` asks the owner's hub to sign one order for one device, waits for the device's signed answer and
prints it. Your login names you; the owner's rule names the devices and the kinds of order (`info`, `exec`) you may
use. The owner gives you three secrets as environment variables:
1. `DEVICE_ACCESS_HUB`: the hub link, `https://<ref>.supabase.co#<publishable key>`.
2. `DEVICE_ACCESS_EMAIL` and `DEVICE_ACCESS_PASSWORD`: your login, the two lines `device-access member add` printed.
With them set, every command logs in by itself and keeps the session. You need nothing else.
## Install
1. No Go needed: the newest release of `github.com/litvak-daniil/agent-device-access` has
`device-access-darwin-arm64` and `-darwin-amd64` (macOS), `device-access-linux-amd64`, `-linux-arm64`,
`-linux-armv7` and `-linux-armv6`, and `device-access-windows-amd64.exe` and `-windows-arm64.exe`, each with its
`.sha256` beside it, under `https://github.com/litvak-daniil/agent-device-access/releases/latest/download/`. These
lines pick the file for this machine, check its sha256 and keep it as `device-access` only when it matches:
f=device-access-$(uname -s | tr A-Z a-z)-$(uname -m | sed 's/x86_64/amd64/; s/aarch64/arm64/; s/armv[78]l/armv7/; s/armv6l/armv6/'); u=https://github.com/litvak-daniil/agent-device-access/releases/latest/download/$f; curl -fsSLO "$u" -O "$u.sha256" && if [ "$(uname -s)" = Darwin ]; then shasum -a 256 -c "$f.sha256"; else sha256sum -c "$f.sha256"; fi && chmod +x "$f" && mv "$f" device-access && ./device-access version
On Windows, in PowerShell, the same with `Get-FileHash`, kept as `device-access.exe`:
$f = "device-access-windows-$($env:PROCESSOR_ARCHITECTURE.ToLower()).exe"; $u = "https://github.com/litvak-daniil/agent-device-access/releases/latest/download/$f"; curl.exe -fsSLO $u -O "$u.sha256"; if ($LASTEXITCODE -eq 0 -and (Get-FileHash $f).Hash -eq (Get-Content "$f.sha256").Split(' ')[0]) { Move-Item -Force $f device-access.exe; .\device-access.exe version } else { "not kept: no download, or its sha256 differs" }
Run it by its path (`./device-access status`, `.\device-access.exe status`) or move it into a directory on
`PATH`. `curl` saying `returned error: 404` means the release has no binary for this machine: build it with Go (2),
or tell the owner.
2. With Go: `go build -o bin/device-access ./cmd/device-access` in a checkout of the repository, or
`go install github.com/litvak-daniil/agent-device-access/cmd/device-access@latest` (the binary lands in
`$(go env GOPATH)/bin`, often not on `PATH`).
## Order of work
1. `device-access status`: who you are (your member name and kinds) and one line per device you may use. `not a
member of this hub` or a login error: ask the owner, do not guess. `last order taken` is when the device last picked
up an order, not a heartbeat: an old time on an idle device is normal.
2. `device-access info <device>`: JSON with hostname, os, arch, kernel, uptime_s, load1, mem_total_mb,
mem_available_mb, root_free_mb, node_version. Read it before running anything: a full disk or no free memory is
often the answer.
3. `device-access exec <device> -- '<command>'`: runs `/bin/sh -c '<command>'` on the device **as root**
(`cmd.exe /S /C "<command>"` on a Windows device, whose `info` says `"os":"windows"`). Quote the whole command once;
words after `--` are joined with spaces, as ssh does. Flags go between the device and `--`: `--timeout-s N` (1-600,
default 60), and `--agent <your name>` (such as `claude`) when several agents share one login, so the device's
journal shows which one sent the order.
## Rules
1. Read-only commands first. Linux: `journalctl -u <unit> -n 100 --no-pager`, `systemctl status <unit> --no-pager`,
`systemctl --failed`, `dmesg | tail -n 50`, `df -h`, `free -m`, `ps aux --sort=-%mem | head`, `cat` of a config.
macOS: `log show --last 10m`, `launchctl list`, `df -h`, `vm_stat`, `ps aux`. Windows (`cmd.exe`): `systeminfo`,
`tasklist`, `sc query`, `wevtutil qe System /c:50 /rd:true /f:text`, `type` of a config. Change something
(restart a unit, edit a file, install a package, reboot) only when the owner asked for that change on that device.
2. Every `exec` is root: never run a command whose effect you cannot state in one sentence, and never `rm -rf`,
`mkfs`, `dd`, a firewall change or a reboot without the owner asking for it in this conversation.
3. `DEVICE_ACCESS_PASSWORD` is a secret: never print it, echo it, or write it to a file, a log, a commit or the chat.
Never read the device's `login.json` or `node-key.txt` (Linux `/var/lib/device-access/`, macOS
`/var/db/device-access/`, Windows `%ProgramData%\device-access\`). `add`, `remove`, `member`, `update` and `link`
are the owner's commands: run one only when the owner asks you to.
4. Output is capped at the last 30 KiB (30720 bytes), with a first line `[device-access: output cut ...]` when cut:
narrow the command (`| tail -n 200`, `| grep`, `-n`) instead of reading huge output.
5. One order runs at a time on a device, and a long command holds everything else sent to it. On Linux, something
longer than 600 s goes to `systemd-run --unit=<name> <command>` and is checked later with `journalctl -u <name>`; on
macOS and Windows, split it into commands under 600 s, or tell the owner.
## How an answer reads
Every message of `device-access` itself starts with `device-access:` on stderr. These are the exit codes of `exec`;
`info` prints the same messages but exits 1 where `exec` exits 255.
1. 0 to 255 with no `device-access:` line: the command ran; the code is the device's.
2. 255 and `<device> refused the order: <reason>`: the device did not run it.
1. `kind not allowed on this host`: the device does not allow that kind. Tell the owner.
2. `bad args`: the command was empty or the timeout outside 1-600.
3. `order expired` or `order from the future`: the order reached the device outside its time. Send it once more;
if it repeats, tell the owner.
4. `cannot start /bin/sh` (or `cmd.exe`): the device's shell is broken. Tell the owner.
5. `wrong host`, `bad order` or `bad order signature`: something between you and the device is wrong. Stop and
tell the owner.
3. 255 and `<device> interrupted the order: timed out`: it was killed at the timeout; the output so far is on stdout.
`node stopped while running` or `node restarted while running`: the device's node stopped or restarted during the
command, which never ran to its end and is never repeated by itself.
4. 255 and `expired: <device> did not take the order in time`: the device did not pick the order up within 5 minutes
(it is off, offline, or its node is down); before that, stderr said `<device> has not taken the order yet`. Nothing
ran, so the order can be sent again later. Tell the owner when it stays so.
5. 255 and `taken, no answer: ...`, or `the hub could not be reached to read order <id> by its deadline: ...`: the
device took the order, or may have, and no answer came. The command may have run or may still run: do not repeat a
changing command; look at its effect with a read-only one first.
6. 255 and `the hub refused: <reason>`: your rule (`your rule does not name the device ...`, `your rule does not allow
exec`, `the device ... does not allow exec`, `you are not a member of this hub`). Nothing was sent. Tell the owner;
do not look for another way in.
7. 255 and `the hub answered 429: ...`: a limit the hub keeps for your login; nothing was sent. Never send it again
in a loop.
1. `you placed 60 orders in the last minute ...`: wait a minute, then send it again.
2. `you placed 500 orders in the last 24 hours ...`: your login's daily share is used up. Stop and tell the owner.
3. `with this order, your orders of the last 24 hours and their answers would pass 12 MiB ...`: while orders you
sent still wait for their answers, wait for those answers, then go on. If it comes again with none of your
orders waiting, stop and tell the owner.
8. 255 and `the hub answered 404: no device <device>`: no device of that name; `status` lists yours.
9. 255 and `the hub refused the login of <email> with DEVICE_ACCESS_PASSWORD`, `DEVICE_ACCESS_EMAIL and
DEVICE_ACCESS_PASSWORD go together`, or `no hub link`: the environment is wrong or your login was removed. Ask the
owner.
10. 255 and `is not signed by <device>'s node key` or `does not name <device> and the node key`: the answer cannot be
relied on. Stop and tell the owner; do not repeat a changing command.
11. 2: a usage error; the list of commands is on stderr.