remote-agents
Skill11 starsChanged 10 days agoMITView on GitHub
Orchestrate headless Claude Code (`claude -p`) and Codex (`codex exec`) workers on a remote Linux SSH host (default `jetson`, override with REMOTO_HOST) from the local session: probe hosts, spawn jobs, wait, collect results, cross-review across providers, report fleet status. Use when work should run on a remote box (its GPU, files, environment) while this session coordinates: 'run this on the jetson', 'spawn remote agents', 'remote swarm', 'status of the remote jobs', 'córrelo en el jetson', 'lanza agentes remotos', 'cómo van los jobs remotos'. Also for checking or collecting jobs spawned earlier. NOT for local-only work or local subagents, and NOT usable without an SSH host that has key auth and a logged-in claude or codex.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- jsvillalbat/sevito-skillstheir own version, first seen Oct 20, 2026
- CodeAlive-AI/pragmatic-orchestrationtheir own version, first seen Sep 22, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- CodeAlive-AI/pragmatic-orchestration★ 45same name
- jsvillalbat/sevito-skills★ 0same name
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 repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- image-to-frontendSkill
- motion-designSkill
- compound-knowledgeSkill
- file-todosSkill
- agent-sdk-wizardSkill
- askcodexSkill
- managed-agents-wizardSkill
- metapromptSkill
- goal-loopSkill
- insistirSkill
- second-opinionSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Every mechanic goes through one script in this skill's directory:
- Very specific: line 79
Prepare the remote workspace: Every job needs an existing remote directory: check with ssh <host> 'ls <dir>', clone the repo on the host, …
- Very specific: line 88
Wait without blocking the user: Run $REMOTO wait <ids> in the background (Claude Code: Bash with run_in_background: true) and keep doing …
- Very specific: line 97
Permissions: Default is full bypass (claude --dangerously-skip-permissions, codex --dangerously-bypass-approvals-and-sandbox): use only on …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
You are the orchestrator in the local session. Workers are headless claude -p / codex exec processes on a remote SSH host. Never implement remotely yourself: spawn jobs, poll, collect, synthesize.
Request: $ARGUMENTS
Runner and host
Every mechanic goes through one script in this skill's directory:
REMOTO="${CLAUDE_SKILL_DIR}/scripts/remoto.sh" # other harnesses: absolute path of scripts/remoto.sh beside this SKILL.mdHost selection (environment; prefix any call, e.g. REMOTO_HOST=gpu-box $REMOTO ls):
| Variable | Effect | Default |
REMOTO_HOST | Host every command targets | jetson (Jairo's Jetson) |
REMOTO_FALLBACK_HOST | Second host hosts probes; retarget to it with REMOTO_HOST=<it> when the primary is DOWN | jetson-ts (Tailscale route) when REMOTO_HOST is unset, none otherwise |
REMOTO_HOSTS | Explicit list for hosts | $REMOTO_HOST $REMOTO_FALLBACK_HOST |
A host is anything ssh <host> resolves (ssh config alias, user@ip, Tailscale name). The host must be Linux with key-based SSH (BatchMode, no prompts), bash, setsid, python3, and claude and/or codex logged in on PATH. Local side needs only ssh and rsync. Job state lives on the host in ~/.remoto/jobs/<id>/, so jobs survive disconnects and are visible to every session.
Arguments
Parse $ARGUMENTS; when empty (model-invoked), read the same fields from the user's latest message:
status [job-id ...], or a question about existing jobs → Status mode below. Do not spawn.--host <h>→ prefix every call withREMOTO_HOST=<h>.--engine codex|claude|both→ implementer engine (defaultcodex).both: one implementer per engine on separate clones/worktrees, compare the two REPORTs, pick one, cross-review it with the other engine.--dir <path>→ remote workdir. Quote tildes ('~/code/x') so they expand on the host; the script refuses local-home paths.- The rest is the task. No task and no status question → ask for the task.
Engines and roles
Both engines are driven the same way: headless CLI, prompt on stdin, answer as final message, never through an MCP server. Role is orthogonal to engine; only the prompt changes.
| Role | Who | Spawn flags |
| Orchestrator | This session. Never delegated. | — |
| Implementer (default) | Codex at high reasoning | -e codex -r high |
Implementer (alt: user asks for Claude, or --engine claude) | Claude Code headless | -e claude |
| Reviewer | The engine that did NOT write the work | per engine above |
| Judge (final verdict on a review loop) | The engine that did NOT write the work, so the author's provider never grades itself (default Codex implementer → Claude judge) | -e claude, or -e codex -r high when Claude implemented |
Models: omit -m and the host CLI uses its own configured default (model in the host's ~/.codex/config.toml; Claude Code's model setting on the host). That config is the single place the current defaults live; change it there, not in prompts. Pass -m <name> only when the user names a model or the task needs a specific one. hosts prints each CLI's version.
-r/--effort low|medium|high|xhigh maps to Codex model_reasoning_effort; it is codex-only (headless claude has no effort flag; the script rejects it).
CLI quick reference
| Command | Purpose |
$REMOTO hosts | Probe hosts: UP/DOWN, CLI versions, load; first line names the target |
$REMOTO spawn -e claude|codex -d <remote-dir> [-m model] [-r effort] [-n name] [--safe] - | Launch a worker, prompt on stdin. Prints the job id |
$REMOTO ls / status <id>... | Fleet / job state: RUNNING, DONE, FAILED(rc), DEAD, MISSING |
$REMOTO wait [-t secs] <id>... | Block until all finish (poll 15 s, default timeout 7200). Exit 0 all DONE, 1 any failed, 124 timeout |
$REMOTO logs [-f] <id> | Tail stderr + stdout |
$REMOTO result <id> | Final answer (claude: parsed from stream-json; codex: last message) |
$REMOTO kill <id> / clean | Kill the process group / delete finished job dirs |
$REMOTO push <local> <remote> / pull <remote> <local> | rsync payloads and artifacts (mind trailing slashes) |
$REMOTO help | Usage |
Status mode
$REMOTO hosts.- Job ids given:
$REMOTO status <ids>, then$REMOTO result <id>for each DONE. No ids:$REMOTO lsfor the whole fleet. - For each FAILED or DEAD job,
$REMOTO logs <id>. - Report: running, finished (with the REPORT status line of each result), failed (with the log tail that explains it).
Orchestration workflow
- Probe.
$REMOTO hosts. Primary DOWN → retarget withREMOTO_HOST=<fallback>. All DOWN → stop and tell the user which hosts were tried. - Prepare the remote workspace. Every job needs an existing remote directory: check with
ssh <host> 'ls <dir>', clone the repo on the host, or$REMOTO push. Parallel workers on the same repo get separate clones or worktrees; remote workers cannot coordinate with each other. - Write worker prompts. Workers have zero context from this conversation; every prompt is self-contained. Read references/prompt-templates.md before writing the first prompt and build from its engine-specific template. Keep its REPORT contract so results are machine-collectable.
- Spawn. Pipe the prompt on stdin (never inline-quote a multi-line prompt):
Spawn independent jobs back to back in one shell call; capture every printed job id.$REMOTO spawn -e codex -r high -d '~/code/project' -n api-worker - <<'PROMPT' ...full self-contained prompt... PROMPT - Wait without blocking the user. Run
$REMOTO wait <ids>in the background (Claude Code: Bash withrun_in_background: true) and keep doing local work. Jobs can take many minutes; spot-check long ones withlogs. - Collect. Per job:
status, thenresult <id>, then read the REPORT block. FAILED or DEAD → readlogs <id>before deciding to respawn. Never retry silently. - Cross-review (nontrivial work). Spawn a fresh reviewer on the other engine over the worker's uncommitted diff in the same workdir (reviewer template). Findings → fixer job → re-review, max 2 rounds. High-stakes changes: close with a judge job (judge template) that scores the review loop instead of re-reviewing the code.
- Verify and deliver.
$REMOTO pullartifacts if needed, run or inspect what came back, then report: what ran on which host, results, failures, remote paths.$REMOTO cleanonce the user is done with the batch.
Rules
- Self-contained prompts. The top failure mode is a prompt that references context the worker cannot see. Include repo path, task, constraints, verification commands, and the REPORT contract.
- One job = one task. Split multiple deliverables into parallel jobs.
- Permissions. Default is full bypass (claude
--dangerously-skip-permissions, codex--dangerously-bypass-approvals-and-sandbox): use only on a host you own that holds nothing you cannot lose. Pass--safewhen the task only edits files (claudeacceptEdits, codex--sandbox workspace-write). - Do not kill what you did not spawn.
lsshows every job on the host, including other sessions'. - Ground the report. A job succeeded only after DONE status and a result whose REPORT says success; DONE with an error-shaped result is a failure.
- No background remnants. Headless processes die with their background children. Every worker prompt says: "Do all polling/waiting synchronously; do not leave background tasks running; your final message must contain all evidence." A result that says "waiting for background tasks" is incomplete: verify the work directly or respawn.
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.

