emmg17/herdr-sandbox/herdr-sandbox-worker
Claude Code and agent skill by emmg17/herdr-sandbox
- community
Checking that the SKILL.md file is still in the repository.
Spawns sandboxed Codex or Claude Code workers through the Herdr Sandbox `hs` launcher, waits for them in Herdr panes, and reviews results on `sandbox/<id>` with plain git. Use when an orchestrator on the host should delegate work into a rootless-Podman worker instead of running a bare agent CLI in a pane.
Install
npx vskill@latest install emmg17/herdr-sandbox/herdr-sandbox-workerSKILL.md
The same SKILL.md was published earlier as emmg17/herdr-sandbox/herdr-sandbox-worker.
Herdr Sandbox Worker
Use dev.herdr.sandbox when a task should run in an isolated Codex or Claude Code worker. Herdr is the control plane on the host. The worker only owns its disposable clone. Results land as sandbox/<id> branches; integration is ordinary git chosen by you or the user—never automatic.
Never run a bare agent CLI (codex, claude) in a pane for delegated work. Always go through hs (hs codex, hs claude, or hs <agent> --prompt "..."). A bare CLI bypasses the sandbox.
Preconditions
Work from the target Herdr Git workspace. Confirm the host is Linux with rootless Podman, Herdr 0.9+, Git, Python 3.11+, and the Codex and/or Claude Code CLI for host-side login. The plugin runs as the ordinary user, never via sudo.
Install or link the plugin if absent:
One-time setup and login
bootstrap creates plugin-owned config/state, dedicated agent homes, the worker image, and an hs shim under ~/.local/bin (ensure that directory is on PATH). check must succeed before spawning workers.
hs login codex runs device auth with CODEX_HOME pointed at the plugin-owned Codex home. hs login claude runs claude auth login with CLAUDE_CONFIG_DIR on the plugin-owned Claude home and sets HOME to an isolated directory under plugin state (login-homes/claude) so the host CLI cannot touch the real ~/.claude.json. Never copy credentials from ~/.codex or ~/.claude.
Optional Claude API-key auth (instead of or alongside login): set [claude].forward_api_key = true in the plugin config.toml and export ANTHROPIC_API_KEY on the host. Prefer hs login claude so credentials live under the plugin-owned home.
Orchestrator loop
Prefer a normal tiled pane (so HERDR_PANE_ID is set and the same pane can reuse one worker). Split a sibling if needed, keep focus, then spawn and wait:
Discover the worker (do not use bare hs inspect)
hs inspect without an ID resolves against your HERDR_PANE_ID and cwd, not the worker pane. After wait, from the source repository:
- Run
hs ls. - Find the row whose
PANEequals<pane>. - Take that row's
IDandRESULT. - Require
STATUS=fetchedandRESULT=sandbox/<id>before reading git. If status is not yetfetched, wait briefly and re-runhs ls(interactive auto-fetch keepsHERDR_AGENTset until the sandbox ref exists; still verify before integrating). - Run
hs inspect <id>(always with the explicit ID). Use itsBase:line and the printedReview (run in source repo ...):git commands. Auto-fetch /hs fetchalso print ready-madeReview:lines—you may use those directly.
Only then run git (or paste the Review lines from fetch / hs inspect <id>):
Non-interactive --prompt
Prefer running hs <agent> --prompt directly (same source-repo cwd) when the orchestrator needs the process exit code. herdr pane run only acknowledges that the command was queued; it does not return the agent/fetch exit status—use herdr pane read or the worker's runs/<run-id>/result.json if you must go through a pane.
On success the launcher prints a summary (print_execution_result): Worker, Run, Exit status, HEAD, Result branch, Commit count, Dirty, Git status, Result path, Log path. Base for review still comes from hs inspect <id> (or the Review lines printed at fetch).
Exit rules (hs_agent with --prompt):
- Setup / argument errors (no worker, extra args with
--prompt, bad prompt, readiness failure) → exit1. - Otherwise → the agent's exit status.
- If auto-fetch failed (
result_branchmissing) → that exit status, or1when the agent exited0.
After --prompt, still run hs ls, confirm STATUS=fetched and RESULT=sandbox/<id>, then hs inspect <id> before integrating.
hs <agent> creates or reuses a worker for the current pane, launches the agent in the sandbox, and on agent exit auto-fetches into refs/heads/sandbox/<id>. The source tree must be clean (no uncommitted changes).
Popup-pane caveat
Plugin popup panes do not receive HERDR_PANE_ID. Without it, every hs launch creates a new worker; there is no per-pane reuse. Prefer herdr pane split / herdr pane run on ordinary tiled panes for orchestrated work.
Integrate with plain git
Review first. Then integrate only what you or the user approve—git merge, git rebase, or git cherry-pick selected commits. The plugin never merges into the current branch and has no action that applies worker commits for you.
Cleanup
GC is mostly implicit: closing a Herdr pane runs GC for that pane's fetched workers (pane.closed), and each hs <agent> launch runs a short opportunistic GC. GC never deletes or rewrites sandbox/* (or other) refs in the source repo.
Remove a worker explicitly when needed:
Safety boundary
Rootless Podman is the isolation boundary (not a VM). Agent launches (hs <agent>, hs <agent> --prompt, and the start-* pane entrypoints) mount only:
- the worker clone at
/workspace(read-write), and - a per-launch session home at
/codexor/claudethat contains only authentication artifacts copied from the dedicated plugin agent home.
They do not mount the host home, the configured plugin agent home wholesale, normal ~/.codex / ~/.claude / ~/.claude.json, SSH/GPG/cloud credentials, the source repository as writable, or Podman/Docker sockets. Capabilities are dropped, no-new-privileges is set, the container root is read-only, and --userns=keep-id is used. Host environment variables are never forwarded into the container implicitly (except the optional explicit ANTHROPIC_API_KEY inherit when [claude].forward_api_key is enabled).
Do not use this for untrusted or hostile workloads. Before relying on a new environment, run the repository's disposable-worker security test. If any access expected to be denied succeeds, preserve the worker, do not fetch or integrate it, and escalate the finding.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/herdr-sandbox-worker/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/emmg17/herdr-sandbox/herdr-sandbox-worker)