Skill

Generate Devcontainer Configuration

Devcontainer Setup Skill generates a Claude Code devcontainer matched to a project's Python, Node, Rust, or Go stack.

Works with githubdocker

81
Spark score
out of 100
Updated 12 days ago
Version 15.5.1
Models
claude

Add to Favorites

Why it matters

Automate the setup of isolated, pre-configured development environments using Devcontainers. This skill streamlines the process of creating consistent and reproducible coding workspaces for various languages.

Outcomes

What it gets done

01

Detect project languages and infer project name.

02

Generate Dockerfile and devcontainer.json configurations.

03

Incorporate language-specific tooling and VS Code extensions.

04

Set up post-creation commands for dependency installation and build.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/ag-devcontainer-setup | bash

Overview

Devcontainer Setup Skill

Devcontainer Setup Skill generates a pre-configured devcontainer with Claude Code and language-specific tooling, detecting a project's Python, Node, Rust, or Go stack automatically. Use it to set up a new devcontainer for a project. Not for modifying an existing config, general Docker questions, or production container deployment.

What it does

Devcontainer Setup Skill generates a complete, pre-configured devcontainer for a project - Claude Code plus language-specific tooling - by detecting the project's language stack and writing five files into .devcontainer/: a Dockerfile, devcontainer.json, a post_install.py setup script, a .zshrc, and an install.sh helper that adds a devc CLI command. Its base template already bundles Claude Code (with the anthropics/skills, trailofbits/skills, and trailofbits/skills-curated marketplace plugins), Python 3.13 via uv, Node 22 via fnm, ast-grep, network-isolation tooling (iptables/ipset with NET_ADMIN), and modern CLI tools like ripgrep, fd, fzf, tmux, and git-delta.

When to use - and when NOT to

Use it when a user asks to set up a devcontainer or wants a sandboxed, persistent Claude Code development environment. It is explicitly not for modifying an already-existing devcontainer config, for general Docker questions unrelated to devcontainers, or for building production containers - this generates development environments only.

Inputs and outputs

Input: the project directory, from which it infers a project name - checking package.json's name, pyproject.toml's project.name, Cargo.toml's package.name, go.mod's module path, or the directory name, in that order, then slugifying it - and detects the language stack from marker files: Python (pyproject.toml, *.py), Node/TypeScript (package.json, tsconfig.json), Rust (Cargo.toml), Go (go.mod/go.sum). For multi-language projects it configures all detected languages, Python first via the Dockerfile, the rest via devcontainer features, chaining every setup step into one postCreateCommand. Output: language-specific customization layered onto the base template - for Python, ruff/Pylance extensions and a uv sync postCreateCommand; for Node, ESLint/Prettier extensions and a postCreateCommand that adapts to the detected lockfile (pnpm, yarn, npm ci, or npm install); for Rust, the rust:1 devcontainer feature, rust-analyzer, and cargo build --locked when a Cargo.lock exists; for Go, the go:1 feature, the Go extension, and go mod download.

RUN uv python install <version> --default

Before presenting the result, it validates that every {{PROJECT_NAME}}/{{PROJECT_SLUG}} placeholder is substituted, the devcontainer.json is valid JSON, all detected languages' extensions are present, and postCreateCommand chains every required step with &&.

Integrations

Draws on the devcontainers feature ecosystem (ghcr.io/devcontainers/features/rust:1, .../go:1) for Rust and Go, uv and fnm for fast Python and Node installs, and VS Code's devcontainer customizations schema for extensions and settings; persistent state such as a Cargo or Go module cache is added via named Docker volumes keyed to the project slug.

Who it's for

Developers who want a working, sandboxed devcontainer - matched to their project's actual language stack, with Claude Code and sensible editor defaults already configured - generated automatically rather than hand-written per project.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.