generate-sandbox-policy
What it does
This skill has the AI turn what you want a sandbox to reach into a valid network policy file. It is for people who set up OpenShell sandboxes and want to control which sites and API calls are allowed.
When to use it
- ✓When you want to allow your sandboxed AI to reach a specific website or API.
- ✓When you have API documentation and want a policy limited to certain methods and paths.
- ✓When you need to change how network middleware is attached to a sandbox or what happens when it fails.
Skill link
https://github.com/NVIDIA/OpenShell/blob/main/skills/generate-sandbox-policy/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Write a sandbox policy that lets my AI read from the GitHub API but nothing else.”
5 new skills a week. 1 minute to read.
How it works
The AI collects the hosts and access you need, picks the level of detail your input allows, and writes a YAML policy that matches the sandbox policy format for you to review.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Generate Sandbox Policy
Generate YAML sandbox network policies and network middleware configuration from API documentation and natural-language user requirements.
Overview
This skill translates a user's plain-language policy intent into a valid sandbox policy. The amount of detail the user provides determines the granularity of the generated policy — from broad L4 or preset-based policies (just a host:port) up to fine-grained per-endpoint L7 rules (full API docs).
The output is a network_policies YAML block, an optional network_middlewares block, and optionally a full policy file that conforms to the sandbox policy schema.
Step 1: Gather Inputs
Determine the Detail Tier
The user's input falls into one of three tiers. Work with whatever the user provides — do not require a higher tier than needed.
| Tier | User provides | What you can generate |
|---|---|---|
| Minimal | Host(s) and plain-language intent | L4-only policies, or L7 with access presets (read-only, read-write, full) |
| Moderate | Host(s) + some known URL paths or resources | L7 with targeted glob rules for known paths, presets for the rest |
| Full | Complete API docs (OpenAPI, Swagger, markdown, URL) | Fine-grained per-endpoint L7 rules with specific method+path combinations |
Minimal Tier (host + intent only)
The user provides API endpoints and a broad intent. No API docs needed.
Examples:
- "Allow curl to hit api.github.com, read-only"
- "Give claude full access to api.anthropic.com"
- "Let /usr/bin/myapp talk to internal-svc:8080 but only for reading"
This is sufficient for:
- L4-only policies (host:port + binary checks, no method or path rules)
- Preset-based L7 policies (
read-only,read-write,fullon all paths)
For this tier, default to:
access: read-onlywhen the user says "read", "browse", "view", "query", "fetch"access: read-writewhen the user says "read-write", "create", "update" (but not "delete")access: fullwhen the user says "full access", "everything", "unrestricted"- L4-only when the user says "just allow it", "pass through", or "no
inspection". Omit
protocolfor explicit-proxy clients. Useprotocol: tcponly when the workload must use native DNS and direct socket calls, the endpoint has a valid DNS hostname, and the selected runtime support (currently Docker and Podman).
Moderate Tier (host + partial path knowledge)
The user knows some API paths but doesn't have full docs.
Examples:
- "Allow GET on /api/v1/models and POST on /api/v1/completions at integrate.api.nvidia.com"
- "Read-only on /repos/** at api.github.com, but also allow POST on /repos///issues"
Generate explicit rules for the known paths. If the user also wants broader access beyond the specific paths, combine with a catch-all rule or suggest a preset instead.
Full Tier (complete API docs)
The user provides full API documentation. Accepted formats:
| Format | How to consume |
|---|---|
| URL | Fetch with the agent's web access and parse the endpoint list |
| File path | Read the file (OpenAPI JSON/YAML, markdown, etc.) |
| Pasted text | Parse inline from the conversation |
| OpenAPI/Swagger spec | Extract paths object for all method+path combinations |
From the API docs, build an endpoint inventory — a list of (method, path, description) tuples. Group them logically (e.g., by resource or tag). Then generate precise rules that allow only what the user's intent requires.
Policy Intent
Regardless of tier, extract (or infer) these from the user's description:
| Aspect | What to identify | Required? |
|---|---|---|
| Scope | Which API host(s) and port(s) | Yes — always needed |
| Access level | Broad intent: read-only, read-write, full, or custom | Yes — ask if unclear |
| Methods | Specific HTTP methods to allow | Only for custom/fine-grained |
| Paths | Specific URL paths or patterns | Only for custom/fine-grained |
| Enforcement | enforce or audit? Default to enforce. |
No — has a default |
| Binary | Which binary/process should have access | Yes — ask if not stated |
| Middleware | Whether admitted HTTP requests, final HTTP responses, or client WebSocket text messages need an ordered built-in or operator-run processing stage | No |
If the host and access level are clear but binaries are not specified, ask the user w
FAQ
Do I need API documentation to use it?
No. A host and a plain description are enough for a basic policy. Full API docs let it write more precise rules.
What is an access preset?
A preset is a ready-made access level, such as read-only, read-write, or full, that the AI can use when detailed rules are not needed.
Can it write rules for only some paths?
Yes. With some known URL paths, it can write targeted rules for those paths and use presets for the rest.
Details
Original description by the author
Generate sandbox security policies from plain-language requirements and optional REST API documentation. Produces L4 or fine-grained L7 network policies and ordered network middleware configuration. Use for API access rules, middleware host selection, failure behavior, or built-in and operator-run middleware attachment. Trigger keywords - generate policy, create policy, update policy, change policy, sandbox policy, network policy, API policy, security policy, allow API, restrict API, network middleware, supervisor middleware.
repo: NVIDIA/OpenShell
Popularity
- GitHub stars
- 21k
- Ranking position
- #10367
- License
- Apache-2.0
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
create-github-issue
21kHelps your agent create a GitHub issue for a bug, feature request, or task, using the gh command line tool and the project's template.
create-github-pr
21kLets your agent open a GitHub pull request for your branch with the gh tool, after checking that the work is ready for review.
review-github-pr
21kTeaches your agent to read a GitHub pull request and explain its changes, key design choices, and notable code in plain terms.
watch-github-actions
21kLets your agent check GitHub Actions runs, follow them until they finish, and read the logs of any job that failed.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.