On-Demand Incus Boxes with pu

VerifiedSafe

Provision and manage ephemeral Incus containers for CI, builds, and evidence capture. Use pu to spin up, connect, and destroy remote Linux hosts.

Sby Skills Guide Bot
DevelopmentIntermediate
7/23/2026
Claude Code
#incus#containers#remote-hosts#ci#ephemeral

Recommended for

Automated summary

Provisions ephemeral Incus containers (pu boxes) to run commands, CI builds, or capture evidence on a clean, reproducible Linux host.

Strengths

  • Total isolation: nothing runs on the user's local machine.
  • Reproducible environment via NixOS with flakes.
  • Simple lifecycle: create, list, connect, scp, destroy.
  • Handles network failure with detection and automatic recreation.

Limitations

  • Depends on underlying Incus infrastructure; box unavailable if daemon is down.
  • Requires pu tool installed and configured on the host.
  • Boxes with no outbound network require manual probing or a detection script.
When to use it

Use pu whenever a task needs to run on a clean, reproducible Linux host isolated from the local machine (CI, builds, evidence capture, bug reproduction).

When not to use it

Avoid pu if the task requires direct local resource access (devices, local network) or if the environment must persist beyond the session.

Security analysis

Safe
Quality score88/100

The skill describes a legitimate container management tool with no destructive, exfiltrating, or obfuscated actions. Commands are well-defined and standard (create, connect, destroy, copy files). No risky patterns like remote script execution or disabling safety measures are present.

No concerns found

How this analysis is made

Examples

Spin up a box and run a build
pu create mybuild && pu connect mybuild -- 'nix run github:owner/app && cp result /tmp/out && scp -F ~/.pu-state/mybuild/ssh_config mybuild:/tmp/out /tmp/' && pu destroy mybuild
Capture evidence from a remote session
pu create evidence-box && pu connect evidence-box -- 'uname -a; nix-shell -p ffmpeg --run "ffmpeg -f x11grab -video_size 1280x720 -i :99 -frames 1 /tmp/screen.png"' && scp -F ~/.pu-state/evidence-box/ssh_config evidence-box:/tmp/screen.png ./evidence.png && pu destroy evidence-box
Probe egress and recreate if broken
pu connect mybox -- 'timeout 15 curl -sS -o /dev/null -w "%{http_code}\n" https://api.github.com' || { echo 'no egress — recreating'; pu destroy mybox; pu create mybox; }

name: pu description: >- Provision and drive a pu box — an Incus container used as a clean Linux host for CI, builds, and evidence capture. Use when you need to run something on a fresh remote box instead of the user's machine: nix run a build, run CI against a real host, capture screenshots/video off-machine, or reproduce on a pristine environment. Covers create/connect/scp/destroy, running remote commands, copying artifacts back, and the no-egress failure mode. Triggers on "pu box", "spin up a box", "run this on a box", "ephemeral host", "pu create/connect/destroy".

pu — on-demand Incus boxes

pu hands out Linux containers. Each box is a clean NixOS host with Nix

  • flakes, reachable over SSH through pu's own proxy. Use one whenever work should run off the user's machine — a CI run, a nix run build, evidence capture — so nothing local is at risk and the environment is reproducible. A box can be short-lived (spin up, use, destroy) or kept around long-term — the lifetime is yours to choose.

Lifecycle

pu create "$host"          # create; writes ~/.pu-state/$host/ssh_config
pu list                    # NAME + LOCATION (the physical host it landed on)
pu connect "$host"         # interactive ssh
pu connect "$host" -- CMD  # run CMD on the box and return
pu destroy "$host"         # tear down — always do this when finished

Name is positional. Pick a descriptive, collision-free name (e.g. app-pr-42-evidence).

pu connect is the reliable way in — it reads ~/.pu-state/$host/ssh_config itself, so it needs no setup. Bare ssh "$host" works only if you've added Include ~/.pu-state/*/ssh_config to ~/.ssh/config (optional, often not set up); otherwise use pu connect, or pass the config explicitly: ssh -F ~/.pu-state/$host/ssh_config "$host".

Run commands on the box

# One-shot
pu connect "$host" -- 'uname -a'

# Background a long-running server (nohup so it survives the SSH session)
pu connect "$host" -- "nohup nix run github:owner/app -- --port 8080 >/tmp/app.log 2>&1 &"

# Poll until it's healthy
pu connect "$host" -- 'until curl -sf http://127.0.0.1:8080/health; do sleep 2; done'

The box has its own loopback — bind servers to 127.0.0.1 on whatever port you like; there is no clash with anything on the user's machine.

Copy artifacts back

pu connect is SSH, so scp works against the box's generated config:

scp -F ~/.pu-state/"$host"/ssh_config "$host":/tmp/out.png /tmp/out.png

Failure mode: no outbound network

A box occasionally lands on a host with broken egress — DNS and even raw-IP TCP time out, so nix run github:... hangs on "Resolving timed out". This is host-specific, not your fault. Probe egress first; if it fails, destroy and recreate (a fresh box usually lands on a healthy host):

pu connect "$host" -- 'timeout 15 curl -sS -o /dev/null -w "%{http_code}\n" https://api.github.com' \
  || { echo "no egress — recreating"; pu destroy "$host"; pu create "$host"; }

If retries keep landing on dead hosts, capture diagnostics for the admin — the box's LOCATION from pu list, /etc/resolv.conf, ip route, and a /dev/tcp connect test to the gateway and to a raw IP — and hand them over (e.g. a gist).

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/on-demand-incus-boxes-with-pu-mrwak917/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/on-demand-incus-boxes-with-pu-mrwak917' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/on-demand-incus-boxes-with-pu-mrwak917/download' --output '.skill-downloads/on-demand-incus-boxes-with-pu-mrwak917/SKILL.md.part' && mv '.skill-downloads/on-demand-incus-boxes-with-pu-mrwak917/SKILL.md.part' '.skill-downloads/on-demand-incus-boxes-with-pu-mrwak917/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/on-demand-incus-boxes-with-pu-mrwak917/SKILL.md' && test -s '.skill-downloads/on-demand-incus-boxes-with-pu-mrwak917/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/pu' && cp -R '.skill-downloads/on-demand-incus-boxes-with-pu-mrwak917' '.claude/skills/pu'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/on-demand-incus-boxes-with-pu-mrwak917'

openskills read 'on-demand-incus-boxes-with-pu-mrwak917'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/on-demand-incus-boxes-with-pu-mrwak917/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills