Skip to content
SkillScript-led1,966 tokens in use

Devcontainer Setup

Generates a .devcontainer with Claude Code, language tooling for Python, Node, Rust and Go, network isolation tools and persistent volumes for sandboxed work.

8,319 stars on the repository CC-BY-SA-4.0trailofbits/skills · plugins/devcontainer-setup/skills/devcontainer-setup
/plugin marketplace add trailofbits/skills
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing Devcontainer Setup costs

53tokens idle
1,966tokens in use
2,909tokens, up to

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Up to adds the files its instructions link. Counts are approximate, made offline with cl100k_base.

Model dependence Script-led

Script-ledMixedModel-led

Most of this skill is scripts, so it behaves much the same whichever model runs it.

This describes the skill's structure, how much of it is scripts. It does not say how well it works. Scripts: resources/install.sh, resources/post_install.py.

Touches

shelldetectednetworkdetectedwrites filesdetectedgitdetectedcredentialsdetected

Declared tags come from the skill's frontmatter; detected ones from its scripts, its code blocks and the commands it names in inline code. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Excellent
  • Frontmatter12/15
  • Structure23/25
  • Examples12/15
  • Output15/15
  • Size15/15
  • Resources12/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Needs attention
  • Downloads and runs a program−30

    downloads text and runs it as a program

    references/dockerfile-best-practices.md, line 54
  • File that was not read−15

    a file the skill ships that was not read, so what it does is unknown

    resources/.zshrc
  • File that was not read−5

    a file the skill ships that was not read, so what it does is unknown

    resources/Dockerfile
  • Runs shell commands−5

    does this on the machine, and the frontmatter does not say so

    resources/install.sh, line 2
  • Writes files−8

    does this on the machine, and the frontmatter does not say so

    resources/install.sh, line 26
  • Reaches the network−10

    does this on the machine, and the frontmatter does not say so

    resources/install.sh, line 82
  • Runs git commands−5

    does this on the machine, and the frontmatter does not say so

    resources/install.sh, line 771
  • Reads credentials−15

    does this on the machine, and the frontmatter does not say so

    resources/post_install.py, line 30

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Good
  • Development activity100
  • Maintenance52
  • Community64
  • Maturity32
  • Momentum40

Devcontainer Setup creates a pre-configured development container for a project. It infers the project name from package.json, pyproject.toml, Cargo.toml, go.mod or the directory, detects the language stack, fills templates from its resources folder, and writes the result to .devcontainer/.

The base image carries Claude Code with marketplace plugins, bubblewrap and socat for sandboxing, Python 3.13 through uv, Node 22 through fnm, ast-grep, ripgrep, fzf, tmux and git-delta. Language sections add VS Code extensions, devcontainer features and a postCreateCommand per detected stack.

What You Get

  • Dockerfile, devcontainer.json, post_install.py, .zshrc and an install.sh helper in .devcontainer/
  • A devc command, added by running install.sh self-install, that manages the container
  • Language-specific extensions, settings and a postCreateCommand chain for each detected language
  • Named volumes for shell history, Claude config and GitHub CLI config, with a pattern for adding more

Common Use Cases

  • Adding devcontainer support to a repository that has none
  • Running Claude Code in an isolated container with limited reach into the host
  • Setting up a polyglot project that mixes Python, Node, Rust and Go
  • Reviewing untrusted code inside a sandbox

What Makes It Unique

The template is built for working with Claude Code in a sandbox: it mounts .devcontainer read-only to reduce container escape risk, adds NET_ADMIN with iptables and ipset for network isolation, ignores npm install scripts by default, and forwards tokens only through remoteEnv. It targets development use and its own text excludes production images.

Under The Hood

The skill reads your project manifests, fills templates and writes five files into .devcontainer/. Those files do real work when you build and start the container. The Dockerfile downloads release packages from GitHub, pipes the Claude Code installer from claude.ai, the fnm installer and a zsh setup script into a shell, registers three plugin marketplaces, and installs Python and Node toolchains. The container gets extra network capabilities and mounts your workspace and git config. On creation, post_install.py runs claude with your CLAUDE_CODE_OAUTH_TOKEN when set, marks onboarding complete, and sets Claude Code’s default permission mode to bypassPermissions inside the container, so the agent there runs commands without asking. It also writes a tmux config and may use sudo to fix volume ownership. The install.sh helper that provides the devc command is a large shell script with detected network, git and file-writing use. Review the generated files before building.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers