agentleFS
scoobydont-666scoobydont-666/shared-claude-skills/skills/container-sandbox/SKILL.md

container-sandbox

Skill1 starsChanged 32 days agoMITView on GitHub

Prepare disposable test environments and inspect mounts, credentials, network access, isolation limits and cleanup before running risky code.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use an approved image pinned by digest.

    line 12
  2. Distinctive:

    Run non-root, drop capabilities, enable no-new-privileges, use a read-only root filesystem, bound memory/processes, and disable networking …

    line 13
  3. Distinctive:

    Do not mount SSH keys, cloud credentials, the container socket, host root, or host networking.

    line 14
  4. Very specific:

    Use a unique output directory owned by the operator.

    line 15

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Disposable execution environments

A container shares its host kernel. It is not a sufficient boundary for arbitrary hostile code. Use an approved disposable VM or stronger isolation for untrusted workloads. Choose isolation based on the actual trust boundary.

Prepare

  • Inspect the script and expected writes. Use a disposable copy containing no secrets, credentials or private data that the workload is not allowed to read.
  • Use an approved image pinned by digest. Resolve the image before disabling networking.
  • Run non-root, drop capabilities, enable no-new-privileges, use a read-only root filesystem, bound memory/processes, and disable networking unless explicitly needed.
  • Do not mount SSH keys, cloud credentials, the container socket, host root, or host networking. Read-only secret mounts still disclose secrets.
  • Use a unique output directory owned by the operator. Never reuse a shared fixed /tmp directory.

Example structure

Set SANDBOX_IMAGE to a reviewed name@sha256:... image and SANDBOX_INPUT to a disposable sanitized input directory. Verify both before running:

: "${SANDBOX_IMAGE:?Set a reviewed digest-pinned image}"
: "${SANDBOX_INPUT:?Set a sanitized absolute input directory}"
SANDBOX_OUTPUT=$(mktemp -d)
docker run --rm --network none --read-only \
  --user "$(id -u):$(id -g)" --cap-drop ALL \
  --security-opt no-new-privileges --pids-limit 128 --memory 1g \
  --tmpfs /tmp:rw,nosuid,nodev,size=128m \
  --mount "type=bind,src=$SANDBOX_INPUT,dst=/input,readonly" \
  --mount "type=bind,src=$SANDBOX_OUTPUT,dst=/output" \
  "$SANDBOX_IMAGE" /bin/sh -c 'cp -R /input/. /output/ && cd /output && ./test.sh'

The image must contain the chosen shell and dependencies; do not silently fetch packages during the test. This example is a template, not proof of containment on a particular host. Device/GPU passthrough expands the boundary and needs separate review.

Inspect results before use. Keep failed-run evidence and output until no longer needed. Remove only the verified directory created by this run under the user's cleanup policy. Ansible check mode can still contact real hosts; use disposable inventory and targets, never production credentials as a sandbox shortcut.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.