Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
buildatscale-tv avatar

Devbox

  • 5 installs
  • 1 repo stars
  • Updated May 28, 2026
  • buildatscale-tv/agent-skills

devbox is a Claude Code skill that creates, configures, and tears down Namespace cloud devboxes with SSH, GitHub auth, and port tunnels.

About

devbox creates, manages, and tears down Namespace devboxes from a static spec. A developer uses it to spin up an isolated cloud dev environment with SSH aliases, GitHub auth, and forwarded ports, or to fan out multiple variant boxes. When the request involves dispatching work to an agent, an OpenCode profile layers on agent dispatch and monitoring.

  • Creates, configures, and tears down Namespace devboxes with SSH and GitHub auth
  • Opens port tunnels from the devbox to localhost and supports multi-variant parallel boxes
  • Optionally dispatches agent work (issue, ad-hoc, variants) via an OpenCode profile

Devbox by the numbers

  • 5 all-time installs (skills.sh)
  • Ranked #1,085 of 1,435 DevOps & CI/CD skills by installs in the Skillselion catalog
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

devbox capabilities & compatibility

Requires a Namespace account and an OPENCODE_API_KEY secret for agent dispatch images.

Capabilities
execute plan
Works with
github · docker
Use cases
devops · ci cd · orchestration
Runs
Local or remote
Pricing
Bring your own API key
From the docs

What devbox says it does

Create, manage, and tear down Namespace devboxes.
SKILL.md
Create and manage Namespace devboxes. Each box gets its own name, SSH alias, and forwarded ports.
SKILL.md
Namespace devboxes provide Docker automatically (`setup_docker_client: true`).
SKILL.md
npx skills add https://github.com/buildatscale-tv/agent-skills --skill devbox

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs5
repo stars1
Last updatedMay 28, 2026
Repositorybuildatscale-tv/agent-skills

What it does

Provision, tunnel into, and tear down Namespace cloud devboxes, optionally dispatching agent work to them.

Who is it for?

Provisioning isolated Namespace devboxes and fanning out parallel variant environments.

Skip if: Local-only work, since it depends on Namespace devbox and nsc tooling.

When should I use this skill?

You need to create, look up, or tear down a Namespace devbox, or dispatch agent work to one.

What you get

A named Namespace devbox with configured SSH, GitHub auth, and forwarded ports, plus clean teardown when done.

  • provisioned Namespace devbox
  • configured SSH and GitHub auth
  • port tunnels to localhost

By the numbers

  • 6 dispatch parsing modes
  • default agent port 4096, app port 4321

Files

SKILL.mdMarkdownGitHub ↗

/devbox

Create and manage Namespace devboxes. Each box gets its own name, SSH alias, and forwarded ports.

When the request involves agent work (an issue, ad-hoc task, or variant comparison), follow the OpenCode profile after the base lifecycle:

  • OpenCode profile for boxes with opencode serve

Parsing the /devbox argument

PatternModeWhat to do
"tear down issue 32", "destroy that devbox", "kill the variants"TeardownJump to Teardown section
"status", "how's issue 32 doing"StatusJump to Lookup + status check
"<N> variants/versions of <work>", "fan out <N> <work>"Multi-variantRun lifecycle N times in parallel. Requires an agent profile.
"issue 32", "#32", "ticket 42", bare integerIssue dispatchRun lifecycle once. Requires an agent profile.
"create a sponsors page", "refactor auth", any task descriptionAd-hoc dispatchRun lifecycle once. Requires an agent profile.
"give me a devbox", "spin up a box", no task specifiedPlain devboxRun lifecycle only (no agent dispatch).

---

Lifecycle

Identifiers

Compute before starting. Report connection details to the user immediately.

ValueIssue modeAd-hoc / plain mode
PREFIXissue-<N>-<slug>- (lowercase, alphanum + hyphens, max 30 chars)
BRANCHagent/issue-<N>agent/<slug> (skip for plain devbox)
APP_PORT30000 + NPick a free port in 30100-30999
TUNNEL_PORT40000 + NAPP_PORT + 10000
REPOfrom --repo flag, else git remote get-url originsame

Step 0: Resolve image

Before creating the devbox, determine which image to use. Check in this order:

1. User-specified image ("use my opencode image", "use the rails image") — look it up:

   devbox image list -o json | jq -r '.[] | .name'

2. `Dockerfile.devbox` in the project root — if it exists, this project defines its own devbox image. Check if a matching image is already built, and build/rebuild if needed:

   if [ -f Dockerfile.devbox ]; then
     IMAGE_NAME="${REPO_NAME}-devbox"
     EXISTING=$(devbox image list -o json | jq -r --arg name "$IMAGE_NAME" '.[] | select(.name==$name) | .name')
     if [ -z "$EXISTING" ]; then
       echo "Building image $IMAGE_NAME from Dockerfile.devbox..."
       devbox image build ./ -f Dockerfile.devbox --name "$IMAGE_NAME" \
         --secrets OPENCODE_API_KEY=<sec_id>
     fi
   fi

The <sec_id> comes from nsc vault list or a prior vault add. Check the agent profile for secret setup.

3. No Dockerfile.devbox, no user preference — fall back to the spec's default (builtin:agents).

Override the spec's image: line via sed if using a non-default image.

Custom images: Namespace supports any Docker base image — you are not limited to builtin:agents or builtin:base. If the project needs a specific runtime (e.g. ruby:3.3.9-slim, node:22), create a Dockerfile.devbox in the project root. Namespace converts any image into its optimized format.

Do NOT install Docker in `Dockerfile.devbox`. Namespace devboxes provide Docker automatically (setup_docker_client: true). Only add application-level dependencies (runtimes, libraries, tools) to the image. Docker commands like docker compose up work out of the box in session commands.

Step 1: Create

Resolve the repo from --repo flag or git remote get-url origin. Derive REPO_NAME (the final path segment) for use in session commands.

If the project has a `devbox.yaml` in the root, use it directly — it already contains the image, sessions, and repo config. Only rewrite name_prefix::

mkdir -p .devbox-tmp
REPO=$(git remote get-url origin 2>/dev/null | sed 's|.*github.com[:/]||;s|\.git$||')
REPO_NAME=$(basename "$REPO")

if [ -f devbox.yaml ]; then
  sed 's/^name_prefix:.*/name_prefix: <PREFIX>/' devbox.yaml > .devbox-tmp/spec.yaml
else
  # No project spec — build one from the skill's base template
  sed 's/^name_prefix:.*/name_prefix: <PREFIX>/' .agents/skills/devbox/devbox.yaml > .devbox-tmp/spec.yaml
  [ -n "$IMAGE_NAME" ] && sed -i 's/^image:.*/image: '"$IMAGE_NAME"'/' .devbox-tmp/spec.yaml
  [ -n "$REPO" ] && echo "repository: github.com/$REPO" >> .devbox-tmp/spec.yaml
  # Append sessions per the OpenCode profile instructions
fi

devbox create --from .devbox-tmp/spec.yaml 2>&1 | tee .devbox-tmp/create.log
NAME=$(grep -oE 'ssh [^ ]+\.devbox\.namespace' .devbox-tmp/create.log | head -1 | awk '{print $2}' | sed 's/\.devbox\.namespace$//')
echo "devbox: $NAME"

When a project devbox.yaml exists, skip the "Add sessions to spec" step in the agent profile — sessions are already defined.

Step 2: Configure

devbox configure-ssh "$NAME" >/dev/null
devbox setup-github "$NAME" || echo "setup-github skipped (gh CLI not on image)"

setup-github requires gh on the devbox. It ships with builtin:agents / builtin:base but not with custom base images (e.g. ruby:*-slim). The command is non-critical — repo cloning works via the spec's repository: line regardless.

Step 3: Open tunnels

Forward ports from the devbox to localhost. Adjust the remote targets to match whatever the devbox runs (values below are defaults from the Constants table).

ssh -fN -o LogLevel=ERROR -o ExitOnForwardFailure=yes \
  -o ServerAliveInterval=30 -o ServerAliveCountMax=3 \
  -L <TUNNEL_PORT>:localhost:<TUNNEL_REMOTE_PORT> \
  -L <APP_PORT>:<APP_BIND_HOST>:<APP_PORT_INTERNAL> \
  "$NAME.devbox.namespace"

For plain devbox requests, stop here. Report the box name + SSH alias.

For agent dispatch requests, continue with the relevant profile.

---

Teardown

StepCommand
Kill tunnelspkill -f "ssh.*<NAME>.devbox.namespace"
Expire boxdevbox expire <NAME> --force

---

Lookup

Box names encode the dispatch identity via name_prefix:

  • Issue: issue-<N>-<random> (e.g. issue-32-rsep2bmaq4)
  • Ad-hoc: <slug>-<random>
devbox list -o json | jq -r '.[] | select(.name | startswith("issue-32-")) | .name'

Or by deterministic port (issue mode): lsof -iTCP:40032 -sTCP:LISTEN.

---

Constants

NameDefaultWhat it's for
APP_PORT_INTERNAL4321Dev server port inside the box (Astro default)
APP_BIND_HOST[::1]Astro binds IPv6; tunnel target must match
TUNNEL_REMOTE_PORT4096Agent server port inside the box (OpenCode default)

Change these when the spec's session command moves to a different stack or agent runtime.

Common overrides by framework:

FrameworkAPP_PORT_INTERNALAPP_BIND_HOST
Astro4321[::1]
Rails3000localhost
Next.js3000localhost
Vite5173localhost

Files

  • devbox.yaml - static Namespace devbox spec. name_prefix: is rewritten per dispatch via sed.
  • profiles/opencode.md - OpenCode agent dispatch and monitoring.
  • prompts/issue.md, prompts/adhoc.md - prompt templates (used by agent profiles).

Host env

  • gh auth status green; GitHub auth is forwarded into the box.

Related skills

FAQ

What does devbox provision?

It creates Namespace devboxes, each with its own name, SSH alias, and forwarded ports, from a static spec.

Can it run agent work?

Yes. When the request involves an issue, ad-hoc task, or variants, the OpenCode profile layers on agent dispatch and monitoring.

DevOps & CI/CDinfradeploy

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.