Claude Code, 언어별 툴링, 영구 볼륨이 포함된 사전 구성 devcontainer를 생성하여 격리된 개발 환경을 구축합니다.
- GitHub 스타
- 8,136
- 파일
- 10
- 마지막 커밋
- 2026년 11월 11일
- 라이선스
- CC-BY-SA-4.0
- 허용된 도구
- —
devcontainer-setup skill은 무엇을 하나요?
devcontainer-setup은(는) agent skill입니다. Claude Code, 언어별 툴링, 영구 볼륨이 포함된 사전 구성 devcontainer를 생성하여 격리된 개발 환경을 구축합니다.
skill의 SKILL.md에서 생성된 요약입니다.
devcontainer-setup skill 정보
이 SKILL은 개발자가 Claude Code를 사용하여 샌드박스 형태의 개발 환경을 구축할 수 있도록 지원합니다. Python, Node/TypeScript, Rust, Go와 같은 언어를 감지하기 위해 프로젝트 정찰을 수행하고, 이를 통해 사전 구성된 devcontainer 생성을 자동화합니다. 스택이 식별되면 Dockerfile, devcontainer.json, post-install 스크립트 및 셸 설정이 포함된 완전한 구성 디렉토리를 생성합니다.
사용자가 devcontainer 지원을 추가하거나 격리된 워크스페이스가 필요하다고 요청할 때 에이전트가 이 SKILL을 로드해야 합니다. 이 프로세스는 ripgrep, fzf, tmux와 같은 최신 CLI 도구와 bubblewrap 샌드박싱 및 네트워크 격제와 같은 보안 기능을 포함하는 구조화된 .devcontainer/ 디렉토리를 생성합니다. 특히 확장 프로그램을 병합하고 설정 명령을 체이닝하여 다중 언어 프로젝트를 처리합니다. 이 도구는 엄격히 개발 환경용으로 설계되었으며 프로덕션 컨테이너 배포용이 아닙니다.
agent가 수행할 수 있는 작업
- 1프로젝트에 devcontainer 지원 추가필요한 모든 컨테이너 파일을 자동으로 생성하여 새로운 개발 환경을 구성합니다.
- 2샌드박스형 Claude Code 워크스페이스 생성bubblewrap 및 네트워크 격제와 같은 보안 기능을 사용하여 Claude Code를 위한 격리된 환경을 구축합니다.
- 3다중 언어 환경 설정각 언어에 특화된 확장 프로그램과 설정 명령을 병합하여 Python과 Node.js를 모두 지원하는 단일 워크스페이스를 구성합니다.
- 4개발 데이터의 영구 저장 보장Cargo 또는 Go 모듈과 같은 언어별 데이터를 위한 영구 볼륨이 포함된 구성을 생성합니다.
skill의 SKILL.md를 기반으로 작성되었습니다. 모든 사용 사례는 해당 문서의 인용구와 대조 확인되었습니다.
devcontainer-setup skill 설치 방법
각 명령은 skill 폴더를 클라이언트의 skills 디렉터리에 복사합니다. 클라이언트를 재시작하거나 새 세션을 시작하여 로드하세요.플러그인에 devcontainer-setup skill 설치
/plugin marketplace add trailofbits/skills /plugin install devcontainer-setup@trailofbits
Claude Code에 devcontainer-setup skill 설치
~/.claude/skills/devcontainer-setup/SKILL.md
$ npx degit trailofbits/skills/plugins/devcontainer-setup/skills/devcontainer-setup ~/.claude/skills/devcontainer-setupClaude Code (project)에 devcontainer-setup skill 설치
.claude/skills/devcontainer-setup/SKILL.md
$ npx degit trailofbits/skills/plugins/devcontainer-setup/skills/devcontainer-setup .claude/skills/devcontainer-setupCodex에 devcontainer-setup skill 설치
~/.agents/skills/devcontainer-setup/SKILL.md
$ npx degit trailofbits/skills/plugins/devcontainer-setup/skills/devcontainer-setup ~/.agents/skills/devcontainer-setupGemini CLI에 devcontainer-setup skill 설치
~/.gemini/skills/devcontainer-setup/SKILL.md
$ npx degit trailofbits/skills/plugins/devcontainer-setup/skills/devcontainer-setup ~/.gemini/skills/devcontainer-setupClaude.ai에 devcontainer-setup skill 설치
npx degit trailofbits/skills/plugins/devcontainer-setup/skills/devcontainer-setup devcontainer-setup && zip -r devcontainer-setup.zip devcontainer-setup # claude.ai → Customize → Skills → + → Create skill → Upload a skill → devcontainer-setup.zip
자동 검사
2026년 11월 14일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 보안 감사는 아닙니다. 에이전트가 실행하기 전에 스크립트를 읽어 보세요. 검사 방식
- 소스 저장소 연결 및 접근 가능trailofbits/skills/plugins/devcontainer-setup/skills/devcontainer-setup is public and reachablegithub.com/trailofbits/skills/tree/HEAD/plugins/devcontainer ↗통과
- 오픈 소스 라이선스 (OSI)CC-BY-SA-4.0 is not OSI-approvedspdx.org/licenses/CC-BY-SA-4.0.html ↗결함 발견
- 최근 1년 내 커밋 또는 릴리스Last commit 2026-11-11github.com/trailofbits/skills/commits ↗통과
- 스크립트에 다운로드 후 실행이나 자격 증명 탈취가 없음2 scripts read; no download-and-run, remote eval, base64 execution or credential upload통과
- SKILL.md에 숨겨진 지침 없음No override phrases, safeguard switches, credential requests or hidden charactersgithub.com/trailofbits/skills/blob/HEAD/plugins/devcontainer ↗통과
- 사전 허용 도구가 제한됨No pre-approved tools; the agent asks before using onegithub.com/trailofbits/skills/blob/HEAD/plugins/devcontainer ↗통과
SKILL.md
GitHub에서 보기Devcontainer Setup Skill
Creates a pre-configured devcontainer with Claude Code and language-specific tooling.
When to Use
- User asks to "set up a devcontainer" or "add devcontainer support"
- User wants a sandboxed Claude Code development environment
- User needs isolated development environments with persistent configuration
When NOT to Use
- User already has a devcontainer configuration and just needs modifications
- User is asking about general Docker or container questions
- User wants to deploy production containers (this is for development only)
Workflow
flowchart TB
start([User requests devcontainer])
recon[1. Project Reconnaissance]
detect[2. Detect Languages]
generate[3. Generate Configuration]
write[4. Write files to .devcontainer/]
done([Done])
start --> recon
recon --> detect
detect --> generate
generate --> write
write --> done
Phase 1: Project Reconnaissance
Infer Project Name
Check in order (use first match):
package.json→namefieldpyproject.toml→project.nameCargo.toml→package.namego.mod→ module path (last segment after/)- Directory name as fallback
Convert to slug: lowercase, replace spaces/underscores with hyphens.
Detect Language Stack
| Language | Detection Files |
|---|---|
| Python | pyproject.toml, *.py |
| Node/TypeScript | package.json, tsconfig.json |
| Rust | Cargo.toml |
| Go | go.mod, go.sum |
Multi-Language Projects
If multiple languages are detected, configure all of them in the following priority order:
- Python - Primary language, uses Dockerfile for uv + Python installation
- Node/TypeScript - Uses devcontainer feature
- Rust - Uses devcontainer feature
- Go - Uses devcontainer feature
For multi-language postCreateCommand, chain all setup commands:
uv run /opt/post_install.py && uv sync && npm ci
Extensions and settings from all detected languages should be merged into the configuration.
Phase 2: Generate Configuration
Start with base templates from resources/ directory. Substitute:
{{PROJECT_NAME}}→ Human-readable name (e.g., "My Project"){{PROJECT_SLUG}}→ Slug for volumes (e.g., "my-project")
Then apply language-specific modifications below.
Base Template Features
The base template includes:
- Claude Code with marketplace plugins (anthropics/skills, trailofbits/skills, trailofbits/skills-curated)
- Sandboxing via bubblewrap and socat
- Python 3.13 via uv (fast binary download)
- Node 22 via fnm (Fast Node Manager)
- ast-grep for AST-based code search
- Network isolation tools (iptables, ipset) with NET_ADMIN capability
- Security mounts:
.devcontainer/mounted read-only to prevent container escape - Token forwarding:
CLAUDE_CODE_OAUTH_TOKENandANTHROPIC_API_KEYviaremoteEnv - Modern CLI tools: ripgrep, fd, fzf, tmux, git-delta
Language-Specific Sections
Python Projects
Detection: pyproject.toml, requirements.txt, setup.py, or *.py files
Dockerfile additions:
The base Dockerfile already includes Python 3.13 via uv. If a different version is required (detected from pyproject.toml), modify the Python installation:
# Install Python via uv (fast binary download, not source compilation)
RUN uv python install <version> --default
devcontainer.json extensions:
Add to customizations.vscode.extensions:
"ms-python.python",
"ms-python.vscode-pylance",
"charliermarsh.ruff"
Add to customizations.vscode.settings:
"python.defaultInterpreterPath": ".venv/bin/python",
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
}
}
postCreateCommand:
If pyproject.toml exists, chain commands:
rm -rf .venv && uv sync && uv run /opt/post_install.py
Node/TypeScript Projects
Detection: package.json or tsconfig.json
No Dockerfile additions needed: The base template includes Node 22 via fnm (Fast Node Manager).
devcontainer.json extensions:
Add to customizations.vscode.extensions:
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
Add to customizations.vscode.settings:
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
}
postCreateCommand: Detect package manager from lockfile and chain with base command:
pnpm-lock.yaml→uv run /opt/post_install.py && pnpm install --frozen-lockfileyarn.lock→uv run /opt/post_install.py && yarn install --frozen-lockfilepackage-lock.json→uv run /opt/post_install.py && npm ci- No lockfile →
uv run /opt/post_install.py && npm install
Rust Projects
Detection: Cargo.toml
Features to add:
"ghcr.io/devcontainers/features/rust:1": {}
devcontainer.json extensions:
Add to customizations.vscode.extensions:
"rust-lang.rust-analyzer",
"tamasfe.even-better-toml"
Add to customizations.vscode.settings:
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer"
}
postCreateCommand:
If Cargo.lock exists, use locked builds:
uv run /opt/post_install.py && cargo build --locked
If no lockfile, use standard build:
uv run /opt/post_install.py && cargo build
Go Projects
Detection: go.mod
Features to add:
"ghcr.io/devcontainers/features/go:1": {
"version": "latest"
}
devcontainer.json extensions:
Add to customizations.vscode.extensions:
"golang.go"
Add to customizations.vscode.settings:
"[go]": {
"editor.defaultFormatter": "golang.go"
},
"go.useLanguageServer": true
postCreateCommand:
uv run /opt/post_install.py && go mod download
Reference Material
For additional guidance, see:
references/dockerfile-best-practices.md- Layer optimization, multi-stage builds, architecture supportreferences/features-vs-dockerfile.md- When to use devcontainer features vs custom Dockerfile
Adding Persistent Volumes
Pattern for new mounts in devcontainer.json:
"mounts": [
"source={{PROJECT_SLUG}}-<purpose>-${devcontainerId},target=<container-path>,type=volume"
]
Common additions:
source={{PROJECT_SLUG}}-cargo-${devcontainerId},target=/home/vscode/.cargo,type=volume(Rust)source={{PROJECT_SLUG}}-go-${devcontainerId},target=/home/vscode/go,type=volume(Go)
Output Files
Generate these files in the project's .devcontainer/ directory:
Dockerfile- Container build instructionsdevcontainer.json- VS Code/devcontainer configurationpost_install.py- Post-creation setup script.zshrc- Shell configurationinstall.sh- CLI helper for managing the devcontainer (devccommand)
Validation Checklist
Before presenting files to the user, verify:
- All
{{PROJECT_NAME}}placeholders are replaced with the human-readable name - All
{{PROJECT_SLUG}}placeholders are replaced with the slugified name - JSON syntax is valid in
devcontainer.json(no trailing commas, proper nesting) - Language-specific extensions are added for all detected languages
postCreateCommandincludes all required setup commands (chained with&&)
User Instructions
After generating, inform the user:
- How to start: "Open in VS Code and select 'Reopen in Container'"
- Alternative:
devcontainer up --workspace-folder . - CLI helper: Run
.devcontainer/install.sh self-installto add thedevccommand to PATH
이 스킬의 파일
10devcontainer-setup skill 질문
Claude Code에 devcontainer-setup skill을 어떻게 설치하나요?
npx degit trailofbits/skills/plugins/devcontainer-setup/skills/devcontainer-setup ~/.claude/skills/devcontainer-setup를 실행합니다. Claude Code는 ~/.claude/skills(모든 프로젝트) 또는 .claude/skills(한 프로젝트)에서 skills를 로드하며, 설명이 작업과 일치할 때 skill을 사용합니다.
devcontainer-setup skill을 사용할 수 있는 클라이언트는 무엇인가요?
Agent Skills 형식을 읽는 모든 클라이언트(Claude Code, Codex, Gemini CLI, claude.ai(ZIP으로 업로드))가 사용할 수 있습니다. skill 내 스크립트는 클라이언트가 코드 실행을 허용하는 경우에만 실행됩니다.