anthropics/claude-quickstarts/openshell
Claude Code and agent skill by anthropics/claude-quickstarts
- vendor
Checking that the SKILL.md file is still in the repository.
Set up NVIDIA OpenShell as the self-hosted sandbox for Claude Managed Agents, step by step. Covers the host check, installing OpenShell, creating the agent and environment, running a first session, confirming the policy held, and changing policy.yaml for your own agent. Use when someone asks to set up, run, adapt, or debug this quickstart, or asks where the OpenShell policy reference is.
Install
npx vskill@latest install anthropics/claude-quickstarts/openshellSKILL.md
The same SKILL.md was published earlier as anthropics/claude-quickstarts/openshell.
Setup walkthrough: NVIDIA OpenShell as a sandbox for Claude Managed Agents
Walk the user through these steps in order, from this directory. Each step says what to run, what a healthy result looks like, and what to do when it is not. Finish a step before you start the next. `README.md` has the design and `../CLAUDE.md` has the full debugging table.
Ground rules
- Never print the environment key or a session token. Ask the user to
paste the key into .env themselves.
- Ask before you install anything. The OpenShell installer adds a system
package and starts a service.
- Do not loosen the policy to make an error go away. Three of the five
commands in step 6 are supposed to fail. Keep enforcement: enforce and compatibility: hard_requirement: the defaults for both let violations through.
- Shell variables do not outlive a shell. Steps 6 to 8 share
$session,
$environment, and $sandbox. A person keeps one terminal open. If you are Claude Code, each command runs in a new shell, so start every command that uses them with the "set the variables again" lines in step 6, and run ./start.sh in the background with its output in a file you can read.
- Look fields up, do not guess them. The
policy reference at the end lists where each one is documented.
What you are building
The agent loop runs on Anthropic's servers. Its tool calls run in a sandbox on your machine, and OpenShell confines that sandbox to what policy.yaml allows.
1. Check the host
- No login:
ant auth login, or exportANTHROPIC_API_KEY. The CLI does not
read .env.
- Linux also needs the Landlock kernel feature. Nothing here tests for it up
front. policy.yaml sets hard_requirement, so on a kernel that cannot enforce Landlock the sandbox refuses to start in step 6. The fix is a kernel with Landlock on. Do not switch to best_effort: it starts the sandbox with no filesystem rules at all.
- macOS: Apple silicon, Docker Desktop with host networking on and Enhanced
Container Isolation off.
- Anything else in doubt: OpenShell's
2. Install OpenShell
Skip this if openshell --version already prints 0.1.x. A 0.0.x release has a different CLI and will not work. Otherwise ask the user, then:
Check the gateway, the local service that creates sandboxes:
Use sandbox list for this check. openshell status exits 0 even with no gateway configured. If the list fails, ../CLAUDE.md has rows for no gateway registered and for a host that is itself a Kubernetes pod.
3. Create the agent and the environment
Healthy output lists ./environments/self-hosted.yaml and ./agents/openshell-demo.md as created, or says Everything is up to date on a later run. Run it from this directory, never from the parent: ant apply walks the directory it is given. For the same reason, never add a file named skill.md or SKILL.md here. ant apply . would take the whole directory for one skill resource and stop finding the agent and the environment.
4. Add the environment key
This is the one step you cannot do for the user. Ask them to:
- Open the Console, then Environments, then
quickstart-self-hosted-sandbox-openshell-env, then Keys, and mint a key.
- Run
cp .env.example .env. - Uncomment
ANTHROPIC_ENVIRONMENT_KEY=in.envand paste the key there.
Confirm it without reading the file. This prints a count, not the key:
A 0 means the line is still commented out or empty, and step 5 would stop with set ANTHROPIC_ENVIRONMENT_KEY in .env and uncomment the line.
5. Start the sandbox side
Leave it running. It checks the gateway, builds the shs-openshell image, and starts the poller. Healthy output ends with polling env=env_....
6. Run a first session
From this directory, in a second terminal:
Note that ID. To set the variables again in a new shell:
The start.sh terminal prints [on-work] session=sesn_... work=sesn_... sandbox=shs-... (creating), then one dispatched tool line per tool call. One stream disconnected; reconnecting warning about ten seconds in is expected. The report is ready as soon as the tool calls stop. About a minute later the worker prints session idle after end_turn; stopping, and on-work.sh prints worker exited rc=0, stopping shs-... and stops the sandbox.
If on-work.sh exits non-zero instead, nothing retries that work item and the session stays stuck. Fix what it logged, then create a new session. An exit about 15 seconds after (creating) with ControlSupervisorStartFailed is rootless Docker, and ../CLAUDE.md has the row for it.
7. Confirm the policy held
Read the agent's report:
| Command | Expected result | |
|---|---|---|
write to /workspace, write to /tmp | succeeds | |
write to /etc | Permission denied | |
curl https://example.com | curl: (7) Failed to connect | |
curl https://api.anthropic.com/v1/models | a 403 body with "error":"policy_denied" |
Then read OpenShell's own record, which does not depend on what the agent says:
The log has one ALLOWED or DENIED line per connection and per request, with the program, the destination, and the reason. Expect these DENIED lines and no others:
| Line | Meaning | |
|---|---|---|
NET:REFUSE ... DENIED example.com and NET:OPEN ... DENIED /usr/bin/curl(0) -> example.com:443 | One blocked curl, logged at the name lookup and at the connection | |
HTTP:GET ... DENIED GET http://api.anthropic.com:443/v1/models | The host is allowed and the route is not | |
DENIED api.anthropic.com:443 [reason:L7 tunnel closed ... because policy changed ...] | Not a refusal. OpenShell reloads its settings about ten seconds after each start and closes open connections, which is the worker's reconnecting warning |
rule get lists the rules OpenShell drafted from blocked connections, here one for example.com. Read it as a summary of what was blocked. Nothing in it applies until a person approves it. Do not approve a drafted rule to make the demo pass, and leave the gateway's approval mode on manual.
Leave --level warn off openshell logs: it hides policy events. Filesystem denials are not logged.
The setup is done when the report matches the first table and the log matches the second.
8. Change the policy
To try a rule on one sandbox, add it, then send the session a message. By now on-work.sh has stopped the sandbox, and the message restarts it:
The update prints Policy version 2 submitted, start.sh prints (restarting), and the agent reports 200. Read the report with the command from step 7.
To give the rule to every new session, add it under network_policies in policy.yaml. This is the YAML OpenShell stores for the command above:
What reaches which sandbox:
| Change | Reaches | |
|---|---|---|
openshell policy update, network rules only | That one sandbox: within about ten seconds if it is running, at its next start if it is stopped. It survives stop and start | |
An edit to policy.yaml, any part | New sandboxes only, which means new sessions. on-work.sh reads the file when it creates a sandbox |
No command changes filesystem_policy, landlock, or process on a sandbox that has started.
Check that a sandbox has not drifted from the file:
Straight after the update above it prints result: exceeds_boundary, names example.com:443 as the counterexample, and exits 1. That is the check working. Now take the rule out, whether or not you ran the check, so the sandbox is not left with a host the file does not allow:
It prints result: within_boundary and exits 0: the sandbox allows nothing the file does not. Treat any other exit code as drift. The prover compares two policies. It says nothing about what an agent did.
9. Make it yours
Work through these with the user for their own agent:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 30 Sep 2026.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingmanaged-agents/self-hosted-sandboxes/openshell/setup-skill.md
Popularity
- Repository stars
- 17,773
- Repository forks
- 3,065
- 7-day trend score
- 49
Stars and forks are for the whole GitHub repository, not this skill alone. 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/anthropics/claude-quickstarts/openshell)