Help us improve
Share bugs, ideas, or general feedback.
From agent-skills
Configures dev containers and GitHub Codespaces with devcontainer.json schema, features, lifecycle hooks, port forwarding, and VS Code customizations.
npx claudepluginhub tyler-r-kendrick/agent-skills --plugin agent-skillsHow this skill is triggered — by the user, by Claude, or both
Slash command
/agent-skills:devcontainerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Dev containers define reproducible development environments using a `devcontainer.json` file. They are the foundation of GitHub Codespaces and work with VS Code Dev Containers, the devcontainer CLI, and DevPod.
AGENTS.mdREADME.mdaspire/AGENTS.mdaspire/README.mdaspire/metadata.jsonaspire/rules/_sections.mdaspire/rules/_template.mdaspire/rules/aspire-add-the-node-feature-if-your-aspire-solution-includes-a.mdaspire/rules/aspire-always-include-docker-in-docker.mdaspire/rules/aspire-forward-the-dashboard-ports-15888-18888-and-set.mdaspire/rules/aspire-install-the-aspire-workload-via-the-dotnet-feature-s.mdaspire/rules/aspire-pin-the-net-sdk-version-to-match-your-global.mdaspire/rules/aspire-set-aspnetcore-environment-development-in-containerenv.mdaspire/rules/aspire-use-codespaces-prebuilds-to-cache-the-aspire-workload.mddocker-in-docker/AGENTS.mddocker-in-docker/README.mddocker-in-docker/metadata.jsondocker-in-docker/rules/_sections.mddocker-in-docker/rules/_template.mddocker-in-docker/rules/docker-in-docker-add-installdockerbuildx.mdCreates devcontainers with language-specific tooling (Python/Node/Rust/Go) and persistent volumes. Use when adding devcontainer support to a project or setting up isolated development environments.
Creates devcontainers with Claude Code, Python/Node/Rust/Go tooling, and persistent volumes for isolated development environments and sandboxed workspaces.
Generates .devcontainer configs for Python/Node/Rust/Go projects with Claude Code plugins, language tooling (uv/fnm), and persistent volumes for isolated dev environments.
Share bugs, ideas, or general feedback.
Dev containers define reproducible development environments using a devcontainer.json file. They are the foundation of GitHub Codespaces and work with VS Code Dev Containers, the devcontainer CLI, and DevPod.
Place devcontainer.json in one of:
.devcontainer/devcontainer.json (preferred).devcontainer.json (repo root).devcontainer/<folder>/devcontainer.json (multiple configs){
"name": "My Project",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"forwardPorts": [3000],
"postCreateCommand": "npm install"
}
| Image | Use Case |
|---|---|
mcr.microsoft.com/devcontainers/base:ubuntu | General-purpose |
mcr.microsoft.com/devcontainers/javascript-node:22 | Node.js / TypeScript |
mcr.microsoft.com/devcontainers/python:3.12 | Python |
mcr.microsoft.com/devcontainers/dotnet:9.0 | .NET |
mcr.microsoft.com/devcontainers/universal:2 | Multi-language (Codespaces default) |
Features install additional tools without custom Dockerfiles:
{
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/node:1": { "version": "22" },
"ghcr.io/devcontainers/features/python:1": { "version": "3.12" },
"ghcr.io/devcontainers/features/go:1": { "version": "1.24" },
"ghcr.io/devcontainers/features/github-cli:1": {}
}
}
Hooks run at different stages. Each can be a string, array, or object (parallel commands):
{
// Runs on host before container creation
"initializeCommand": "echo 'Starting build'",
// Runs once after container is created
"onCreateCommand": {
"deps": "npm ci",
"db": "npm run db:setup"
},
// Runs when new content is available (rebuild / prebuilt update)
"updateContentCommand": "npm install",
// Runs after onCreateCommand and updateContentCommand complete
"postCreateCommand": "npm run build",
// Runs every time the container starts
"postStartCommand": {
"server": "npm run dev",
"watch": "npm run watch"
},
// Runs every time an editor attaches
"postAttachCommand": "echo 'Ready'",
// Which command to wait for before showing as ready
"waitFor": "postCreateCommand"
}
{
"forwardPorts": [3000, 5432, 6379],
"portsAttributes": {
"3000": {
"label": "Application",
"onAutoForward": "openBrowser"
},
"5432": {
"label": "Database",
"onAutoForward": "silent"
}
}
}
{
// Available in all processes inside the container
"containerEnv": {
"MY_VAR": "value"
},
// Available only in the integrated terminal / remote connection
"remoteEnv": {
"DATABASE_URL": "postgresql://user:pass@db:5432/mydb"
},
// User-level environment
"remoteUser": "vscode"
}
{
"customizations": {
"vscode": {
"extensions": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"ms-dotnettools.csdevkit"
],
"settings": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
}
}
{
"build": {
"dockerfile": "Dockerfile",
"context": "..",
"args": {
"VARIANT": "22-bookworm"
}
}
}
postCreateCommand for project-specific setup (dependency install, migrations) and postStartCommand for starting dev servers.:2) rather than :latest.containerEnv for build-time variables and remoteEnv for secrets or connection strings.postCreateCommand results and speed up start times."shutdownAction": "stopCompose" with Docker Compose setups to clean up sidecar containers..devcontainer/ in version control so every contributor gets the same environment.