Sandbox Setup Skill
Configure Claude Code for optimal autonomous agent execution in this repository.
What This Skill Does
Analyzes your codebase to detect:
- Programming languages (Go, Python, Node.js, Rust, etc.)
- Package managers (go mod, npm, pip, cargo, etc.)
- Build tools and test runners
- Dev servers and their ports
Generates tailored permissions for .claude/settings.json:
- Allow commands for detected tools
- Network access for package registries
- File system permissions for build outputs
Preserves existing settings:
- Merges with hooks configuration
- Keeps deny rules for secrets
- Maintains ask rules for git push
How to Use
When invoked, I will:
- Scan the repository for configuration files (package.json, go.mod, Cargo.toml, requirements.txt, etc.)
- Ask clarifying questions about your workflow
- Present proposed settings for your approval
- Update .claude/settings.json
Detection Patterns
I look for these files to detect your stack:
go.mod → Go (go build, go test, go mod)
package.json → Node.js (npm, yarn, pnpm, node)
Cargo.toml → Rust (cargo build, cargo test)
requirements.txt / pyproject.toml → Python (pip, python, pytest)
Gemfile → Ruby (bundle, ruby, rake)
pom.xml / build.gradle → Java (mvn, gradle)
devbox.json → Devbox (devbox run)
Settings Structure
The generated settings follow this structure:
{
"sandbox": {
"enabled": true,
"autoAllowBashIfSandboxed": true
},
"permissions": {
"allow": ["Bash(detected-tools:*)"],
"deny": ["Read(./.env)", "Read(./secrets/**)"],
"ask": ["Bash(juggle agent:*)", "Bash(git push:*)"]
},
"hooks": { ... }
}
Reference
For detailed sandbox configuration options, see:
https://www.nathanonn.com/claude-code-sandbox-explained/
1---2name: sandbox-setup3description: Configure Claude Code sandbox settings for this repository4---5
6# Sandbox Setup Skill
7
8Configure Claude Code for optimal autonomous agent execution in this repository.
9
10## What This Skill Does
11
121. **Analyzes your codebase** to detect:
13 - Programming languages (Go, Python, Node.js, Rust, etc.)
14 - Package managers (go mod, npm, pip, cargo, etc.)
15 - Build tools and test runners
16 - Dev servers and their ports
17
182. **Generates tailored permissions** for `.claude/settings.json`:
19 - Allow commands for detected tools
20 - Network access for package registries
21 - File system permissions for build outputs
22
233. **Preserves existing settings**:
24 - Merges with hooks configuration
25 - Keeps deny rules for secrets
26 - Maintains ask rules for git push
27
28## How to Use
29
30When invoked, I will:
311. Scan the repository for configuration files (package.json, go.mod, Cargo.toml, requirements.txt, etc.)
322. Ask clarifying questions about your workflow
333. Present proposed settings for your approval
344. Update .claude/settings.json
35
36## Detection Patterns
37
38I look for these files to detect your stack:
39- `go.mod` → Go (go build, go test, go mod)
40- `package.json` → Node.js (npm, yarn, pnpm, node)
41- `Cargo.toml` → Rust (cargo build, cargo test)
42- `requirements.txt` / `pyproject.toml` → Python (pip, python, pytest)
43- `Gemfile` → Ruby (bundle, ruby, rake)
44- `pom.xml` / `build.gradle` → Java (mvn, gradle)
45- `devbox.json` → Devbox (devbox run)
46
47## Settings Structure
48
49The generated settings follow this structure:
50```json
51{
52 "sandbox": {
53 "enabled": true,
54 "autoAllowBashIfSandboxed": true
55 },
56 "permissions": {
57 "allow": ["Bash(detected-tools:*)"],
58 "deny": ["Read(./.env)", "Read(./secrets/**)"],
59 "ask": ["Bash(juggle agent:*)", "Bash(git push:*)"]
60 },
61 "hooks": { ... }
62}
63```
64
65## Reference
66
67For detailed sandbox configuration options, see:
68https://www.nathanonn.com/claude-code-sandbox-explained/