# crabbox

Adopt this skill: https://proskills.md/skills/other/openclaw-crabbox-skills-crabbox

Page: https://proskills.md/skills/other/openclaw-crabbox-skills-crabbox
This document is the public skill bundle for that page. It contains SKILL.md and every helper file the catalog carries. No login is required.

## File: skills/crabbox/SKILL.md
size: 8000
upstream: https://github.com/openclaw/crabbox/blob/main/skills/crabbox/SKILL.md

````text
---
name: crabbox
description: "Detect and use Crabbox for repository tests and validation on remote runners. Use when crabbox.yaml or .crabbox.yaml exists, the crabbox CLI is available, or work needs remote compute, a clean or reusable environment, target-platform coverage, or auditable execution evidence."
license: MIT
---

# Crabbox

Use Crabbox when a project needs remote proof, larger cloud capacity, a fresh
PR checkout, a reusable warmed box, GitHub Actions-style setup, durable run
logs/results, UI proof artifacts, or sync from a dirty local checkout.

## Detect Crabbox

- Treat repo-root `crabbox.yaml` or `.crabbox.yaml` as an intentional signal to
  use this skill for validation work. `.crabbox.yml` is not a supported config
  filename.
- If neither config exists, `command -v crabbox` still identifies an installed
  CLI. Run `crabbox doctor` before depending on it for remote work.
- Inspect config before executing it. Detection does not imply permission to
  expose secrets, bypass command approval, or start paid infrastructure.

## Source Of Truth

- Run Crabbox from the repository root; sync mirrors the current checkout.
- Treat repo-local `crabbox.yaml` or `.crabbox.yaml` as executable project
  automation. Review it before remote runs, especially `provider`, `actions`,
  `jobs`, `profiles`, `env.allow`, artifacts, and cleanup policy.
- Verify the installed binary before relying on examples:
  `command -v crabbox && crabbox --version && crabbox --help | sed -n '1,120p'`.
- Use `crabbox providers` or `crabbox providers --json` for the current
  provider/capability matrix; provider docs can lag the compiled binary.
- Use `crabbox doctor` for live readiness checks and `crabbox config show` to
  inspect merged config without printing secrets.
- Prefer local targeted tests for tight edit loops. Move to Crabbox for broad
  suites, package-heavy checks, Docker/E2E/live-provider proof, cross-OS proof,
  UI proof, or commands that bog down the local machine.

## Auth And Config

Brokered operation needs a coordinator URL and token. First login usually needs
an explicit broker URL:

```sh
crabbox login --url <broker-url>
crabbox whoami
crabbox doctor
```

After `broker.url` is configured, `crabbox login` can reuse it. Trusted operator
automation can store a shared token without putting it on argv:

```sh
printf '%s' "$CRABBOX_COORDINATOR_TOKEN" |
  crabbox login --url <broker-url> --provider aws --token-stdin
```

Config precedence is `flags > env > repo config > user config > defaults`.
Default user config is `~/Library/Application Support/crabbox/config.yaml` on
macOS, `~/.config/crabbox/config.yaml` on Linux, or
`$XDG_CONFIG_HOME/crabbox/config.yaml` when set. `crabbox config path` prints
the active user config path.

Keep provider and broker tokens out of repo config and command arguments. Use
environment variables, a credential store, coordinator-managed secrets, or a
short-lived token command.

## Choose The Remote Surface

- `crabbox run -- <command>`: one command on a fresh or reused box.
- `crabbox warmup`: create a reusable lease and run commands later with `--id`.
- `crabbox prewarm`: warm a reusable lease and hydrate it from configured
  GitHub Actions.
- `crabbox job run <name>`: use a repo-local named flow that expands to
  warmup, optional hydration, run, and stop.
- `crabbox run --pool <key>`: borrow a hydrated broker ready-pool lease, run,
  then return/drain/release it according to `--pool-return`.
- `crabbox run --fresh-pr ...`: ignore local sync and check out a GitHub PR on
  the remote; add `--apply-local-patch` to test local uncommitted changes on
  top of that PR.
- `crabbox run --provider ssh`: use an existing macOS, Linux, or Windows host.
- `crabbox warmup --desktop --browser`: provision a visible desktop/browser for
  UI testing, WebVNC, screenshots, and artifacts.

If remote proof is blocked, name the missing capability precisely: auth,
coordinator, capacity, provider support, target OS, hydration, secret access,
artifact storage, desktop support, or a delegated-provider limitation.

## Common Remote Proof

One-shot command:

```sh
crabbox run --preflight --timing-json -- pnpm test
```

Warm and reuse a lease:

```sh
crabbox warmup --class beast --idle-timeout 90m
crabbox status --id <cbx_id-or-slug> --wait
crabbox run --id <cbx_id-or-slug> -- pnpm test:changed
crabbox run --id <cbx_id-or-slug> --full-resync -- pnpm test:changed
crabbox stop <cbx_id-or-slug>
```

Use a repo-local job when configured:

```sh
crabbox job list
crabbox job run --dry-run <job-name>
crabbox job run <job-name>
crabbox job run --id <cbx_id-or-slug> <job-name>
```

Use a ready-pool lease when the coordinator has hydrated pool capacity:

```sh
crabbox pool ready
crabbox run --pool <pool-key> -- pnpm test
crabbox run --pool <pool-key> --pool-return drain -- pnpm test:flaky
```

Use GitHub Actions hydration when the repository already owns setup in CI:

```sh
crabbox warmup --idle-timeout 90m
crabbox actions hydrate --id <cbx_id-or-slug>
crabbox run --id <cbx_id-or-slug> -- pnpm test
```

Use `--github-runner` only when the workflow needs full GitHub Actions
semantics such as repository secrets, OIDC, service containers, job containers,
or unsupported `uses:` steps:

```sh
crabbox actions hydrate --github-runner --id <cbx_id-or-slug>
```

## Sync And Fresh Checkouts

Use `--no-sync` only with a provider that supports skipping local file transfer.
Blacksmith Testbox rejects it: native Testbox runs sync even with an existing
`--id`. Do not use that path to inspect a remote baseline without uploading local
edits. Blacksmith also rejects nonblank `prewarm --probe-command` probes and jobs
with `noSync: true` before lease acquisition. Put probes in its native workflow
instead.

Normal sync transfers tracked files plus non-ignored untracked files, excludes
ignored dependency/build/cache output, honors `.crabboxignore` and
`sync.exclude`, seeds the remote checkout from `origin` when possible, and skips
rsync when the sync fingerprint matches.

Use `crabbox sync-plan` before large runs. Unexpected counts usually mean
local generated churn; update `.crabboxignore` or `sync.exclude` instead of
forcing huge uploads.

```sh
crabbox sync-plan
crabbox run --debug --timing-json -- pnpm test
crabbox run --full-resync -- pnpm test
```

Use fresh PR checkout when local dependency churn or dirty sync would confuse
the result:

```sh
crabbox run --fresh-pr example-org/my-app#123 --script ./scripts/e2e-smoke.sh
crabbox run --fresh-pr 123 --apply-local-patch -- pnpm test
```

`--fresh-pr` accepts `owner/repo#number`, GitHub PR URLs, or a numeric PR from
the current GitHub origin. Non-GitHub hosts are rejected. Fresh PR checkout is
an SSH-run sync feature; delegated providers reject it. Native Windows SSH
targets are supported.

When a warm lease smells stale, prefer `--full-resync` (alias `--fresh-sync`) to
reset the remote workdir, skip the sync fingerprint fast path, reseed Git when
possible, and upload the checkout from scratch.

## Scripts, Shells, And Windows Targets

Use plain argv after `--` for one executable. Use `--shell` for multi-statement
shell snippets, pipes, or shell expansion:

```sh
crabbox run --id <lease> -- go test ./...
crabbox run --id <lease> --shell 'corepack enable && pnpm install --frozen-lockfile && pnpm test'
```

Use `--script` for standalone multi-line commands, included in failure bundles.
On POSIX SSH leases, it runs a content-hashed copy under `.crabbox/scripts/`.
The remote workdir is `$PWD`; `$0`, `dirname "$0"`, and Python's `__file__`
refer to the uploaded copy, not the original script directory. Resolve synced
assets from `$PWD`, or run a repository script in place when it needs adjacent
files: `crabbox run -- ./scripts/check.sh`.

```sh
crabbox run --script ./scripts/e2e-smoke.sh --timing-json
printf '%s\n' 'echo CRABBOX_PHASE:test' 'pnpm test' | crabbox run --script-stdin
```

Native Windows targets use PowerShell and tar-based man
````

## File: README.md
upstream: https://github.com/openclaw/crabbox/blob/main/README.md

````text
<picture>
  <source media="(max-width: 600px)" srcset="docs/assets/readme-hero-mobile.svg">
  <img src="docs/assets/readme-hero.svg" alt="Crabbox — warm a box, sync the diff, run the suite." width="1200">
</picture>

# On-demand computers for coding agents.

Crabbox gives agents and humans a computer to run tests, builds, and UI checks
while they keep editing locally. Choose a cloud box, a local VM or container,
or a machine you already own.

[![CI](https://github.com/openclaw/crabbox/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/openclaw/crabbox/actions/workflows/ci.yml)
[![Release verification](https://github.com/openclaw/crabbox/actions/workflows/release-assets.yml/badge.svg)](https://github.com/openclaw/crabbox/actions/workflows/release-assets.yml)
[![Latest release](https://badgen.net/github/release/openclaw/crabbox/stable)](https://github.com/openclaw/crabbox/releases/latest)
[![MIT license](https://img.shields.io/badge/license-MIT-blue)](LICENSE)

**[Quick start](#quick-start)** · [Commands](#everyday-commands) · [Any OS](#any-os) ·
[Desktop and browser](#desktop-browser-and-portals) · [Providers](#providers) ·
[Install](#install) · [Docs](https://crabbox.sh/)

With your provider and project dependencies configured:

```sh
crabbox run -- pnpm test
```

1. Lease a box and sync your working tree, including uncommitted changes.
2. Run `pnpm test` there and stream the output back to your terminal.
3. Return the command's exit code and release the one-shot box.

## Why Crabbox?

- **More agents, less contention.** Give concurrent work separate cloud boxes
  instead of making every test suite compete for your laptop's CPU, RAM, and ports.
- **A faster edit–test loop.** Keep prepared boxes warm, reuse installed
  dependencies, and sync changes without committing or pushing first.
- **Test across operating systems.** Target Linux, macOS, native Windows, or
  WSL2 from the same CLI. Choose the provider and image for the job.
- **See and drive the result.** Open a desktop with VNC or WebVNC, run a browser,
  edit through browser VS Code, and inspect runs in the coordinator portal.
- **Share capacity with a team.** The optional coordinator keeps cloud credentials
  centrally, tracks usage, enforces spend caps, and expires stale leases.

Capabilities vary by provider. Crabbox supplies computers and execution evidence;
your agent or harness decides what to run and what the result means.

## Quick start

### 0. Install

On macOS or Linux with Homebrew:

```sh
brew install openclaw/tap/crabbox
crabbox --version
```

On Linux without Homebrew, extract a release archive and keep `crabbox-runtime/`
beside the `crabbox` executable (use `arch=arm64` on ARM):

```sh
v=0.81.0 arch=amd64
curl -fLO "https://github.com/openclaw/crabbox/releases/download/v$v/crabbox_${v}_linux_${arch}.tar.gz"
curl -fLO "https://github.com/openclaw/crabbox/releases/download/v$v/checksums.txt"
sha256sum -c checksums.txt --ignore-missing
mkdir -p ~/.local/share/crabbox
tar -xzf "crabbox_${v}_linux_${arch}.tar.gz" -C ~/.local/share/crabbox
export PATH="$HOME/.local/share/crabbox:$PATH"
crabbox --version
```

GNU tar may warn about `LIBARCHIVE.xattr.com.apple.provenance` headers; they are
harmless. See [Install](#install) for Windows and other options.

### 1. Try a local box

Start Docker or Podman and make sure `git`, `ssh`, `ssh-keygen`, and `rsync` are
on your `PATH` (Debian/Ubuntu: `sudo apt-get install -y git openssh-client rsync`).
Then enter a **Git repository you trust**. No cloud account or coordinator login
is needed:

```sh
crabbox doctor --provider local-container
crabbox run --provider local-container -- uname -a
```

You should see Linux kernel information, followed by cleanup of the one-shot
container. First startup includes an image pull and bootstrap. On images with
`apt-get`, missing `sshd`, `git`, `rsync`, `curl`, `sudo`, or `python3` triggers
installation of those tools and CA certificates, so the container needs internet access.
For offline or locked-down engines, pass `--local-container-image` with an image
that already has those tools. The box has Crabbox's sync/run prerequisites;
supply your project's runtime and dependencies.

### 2. Run a project's tests

For a Node.js repository with a `package-lock.json` and an `npm test` script:

```sh
crabbox run --provider local-container \
  --local-container-image node:22-bookworm \
  --shell 'npm ci && npm test'
```

Choose an image compatible with your project. For remote boxes, use a prepared
image, repository setup scripts, or [Actions hydration](docs/features/actions-hydration.md).
Dependency and build directories are excluded from normal [workspace sync](docs/features/sync.md).

### 3. Reuse a box while you iterate

```sh
crabbox warmup --provider local-container --slug dev-box
crabbox run --provider local-container --id dev-box -- uname -a
# Edit locally, then run again with the same --id.
# Open a shell, or release the box when finished.
crabbox connect --provider local-container --id dev-box
crabbox stop --provider local-container dev-box
```

Replace `uname -a` with your test command once the box is prepared. `warmup`
keeps a reusable lease; `prewarm` also performs Actions hydration. Use the
printed `cbx_...` ID or friendly slug to select it. Each agent can keep its own
lease and working directory.

### Already have a team coordinator?

Use your team's URL in place of this example:

```sh
crabbox login --url https://broker.example.com
crabbox doctor
crabbox run -- pnpm test
```

The repository must select a provider and prepare its remote runtime and
dependencies. For your own cloud account, follow a [provider guide](#providers)
and skip coordinator login. Cloud capacity is billed by the provider; choose
[machine sizes](#machine-classes) deliberately.

[Getting started](docs/getting-started.md) · [Local Container](docs/providers/local-container.md)

## Everyday commands

| Command | What it does |
| --- | --- |
| `crabbox doctor` | Check prerequisites, configuration, and provider reachability. |
| `crabbox providers --json` | Discover providers, targets, and capabilities. |
| `crabbox run -- <cmd>` | Lease, sync, run, stream output, and release. |
| `crabbox run --shell '<script>'` | Run a multi-step shell command. |
| `crabbox warmup` / `crabbox prewarm` | Keep a box ready; `prewarm` also hydrates from Actions. |
| `crabbox run --id <box> -- <cmd>` | Sync changes and run on an existing box. |
| `crabbox connect --id <box>` | Open an interactive shell. |
| `crabbox ssh --id <box>` | Print the SSH command for your own tools. |
| `crabbox job run <name>` | Run a named workflow from repository configuration. |
| `crabbox list` / `crabbox stop <box>` | List active boxes or release one. |

Use `--script <file>` for longer scripts. The execution and lease commands above
(`run`, `warmup`, `prewarm`, `connect`, `ssh`, `list`, and `stop`) and
`doctor` accept `--provider <name>` to override your configured provider.
Named jobs select their provider in repository configuration. `--provider`
is a command-specific flag, not a global flag. The `providers` catalog
does not accept `--provider`; use `crabbox providers describe aws` to inspect
one provider. See [Commands](docs/commands/README.md) and the
[CLI reference](docs/cli.md) for details.

## Any OS

Run platform-specific tests without moving your local checkout. These are
execution targets, not just operating systems that can install the CLI:

| Target | Providers |
| --- | --- |
| Linux | Cloud VMs, local containers, self-hosted VMs, and delegated sandboxes; see the [complete list](#providers). |
| macOS | [anthropic-sandbox-runtime](docs/providers/anthropic-sandbox-runtime.md), [aws](docs/providers/aws.md), [external](docs/providers/external.md), [lume](docs/providers/lume.md), [parallels](docs/providers/parallels.md), [ssh](docs/providers/ssh.md), [tart](docs/providers/tart.md). |
| Native Windows | [aws](docs/providers/aws.md), [azure](docs/provi
````
