devcontainers
/devcontainers
Use when building, modifying, using, or distributing Dev Containers — creating or editing devcontainer.json from scratch, adding devcontainer features, writing Dockerfiles for dev containers, authoring custom features or templates, publishing to GHCR, using the devcontainer CLI (devcontainer up, build, exec, features test), or debugging container startup failures. Also use when the user mentions ghcr.io/joeblackwaslike/devcontainer, the claude-code or claude-code-extend templates, or asks about setting up a reproducible development environment in a container. Invoke this skill whenever the wor
- Author
- joeblackwaslike ↗
- Repository
- agent-skills ↗
- Licence
- MIT
- Last repository change
- 26.10.2026
Assessment and security
- Files in this package
- 24
- Scripts
- 1
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
- 1 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: scripts/update.js
What it does and when to use it
Use when building, modifying, using, or distributing Dev Containers — creating or editing devcontainer.json from scratch, adding devcontainer features, writing Dockerfiles for dev containers, authoring custom features or templates, publishing to GHCR, using the devcontainer CLI (devcontainer up, build, exec, features test), or debugging container startup failures. Also use when the user mentions ghcr.io/joeblackwaslike/devcontainer, the claude-code or claude-code-extend templates, or asks about setting up a reproducible development environment in a container. Invoke this skill whenever the wor
Original author description
Use when building, modifying, using, or distributing Dev Containers — creating or editing devcontainer.json from scratch, adding devcontainer features, writing Dockerfiles for dev containers, authoring custom features or templates, publishing to GHCR, using the devcontainer CLI (devcontainer up, build, exec, features test), or debugging container startup failures. Also use when the user mentions ghcr.io/joeblackwaslike/devcontainer, the claude-code or claude-code-extend templates, or asks about setting up a reproducible development environment in a container. Invoke this skill whenever the wor
How it works
- Route First
- Quick Patterns
- Red Flags — Stop
- Completion Criteria
SKILL.md preview
---
name: devcontainers
description: Use when building, modifying, using, or distributing Dev Containers — creating or editing devcontainer.json from scratch, adding devcontainer features, writing Dockerfiles for dev containers, authoring custom features or templates, publishing to GHCR, using the devcontainer CLI (devcontainer up, build, exec, features test), or debugging container startup failures. Also use when the user mentions ghcr.io/joeblackwaslike/devcontainer, the claude-code or claude-code-extend templates, or asks about setting up a reproducible development environment in a container. Invoke this skill whenever the word "devcontainer", "dev container", ".devcontainer", or "devcontainer.json" appears, or whenever someone wants to containerize their development environment.
metadata:
last_updated: "2026-06-01"
---
# Dev Containers
Core principle: A devcontainer is a version-controlled, reproducible development environment. Prefer features over Dockerfile layers for common tools; write Dockerfiles only for custom tooling not available as a feature.
## Route First
| Task | Reference |
|---|---|
| Create or edit devcontainer.json | `references/devcontainer-json.md` |
| Add or find features | `references/features.md` + `references/generated/features-index.md` |
| Author a custom feature | `references/features.md` (authoring section) |
| Create or publish a template | `references/templates.md` |
| devcontainer CLI commands | `references/cli.md` |
| Publish features/templates to OCI/GHCR | `references/distribution.md` |
| Debug startup, mounts, GPU, PATH, permissions | `references/gotchas.md` |
| Joe's personal devcontainer (ghcr.io/joeblackwaslike/devcontainer) | `references/joe-devcontainer.md` |
| Browse all available features / templates | `references/generated/features-index.md` or `references/generated/templates-index.md` |
Read the most specific reference first; read others only if the first doesn't cover the need.
## Quick Patterns
### Minimal devcontainer.json
```json
{
"name": "My Project",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/devcontainers/features/node:1": { "version": "lts" }
}
}
```
### Config file discovery order
1. `.devcontainer/devcontainer.json`
2. `.devcontainer.json` (project root)
3. `.devcontainer/<subfolder>/devcontainer.json` (multi-config; user selects at open time)
### `image` vs `build`
Use `image` when the base needs no customization.
Use `build.dockerfile` when you need custom layers (apt installs, baked files, config not available as a feature).
```json
{ "build": { "dockerfile": "Dockerfile", "context": "..", "args": { "NODE_VER": "18" } } }
```
### Lifecycle execution order
```
initializeCommand (host machine, before anything)
→ image pull / build
→ features install (as root)
→ onCreateCommand (container, once on creation)
→ postCreateCommand (container, once; runs as remoteUser)
→ postStartCommand (container, every start/rebuild)
→ postAttachCommand (container, every editor attach)
```
Any non-zero exit skips all subsequent scripts. Scripts can be a string, array, or parallel object:
```json
"postCreateCommand": {
"deps": "npm install",
"types": "npm run typecheck"
}
```
### Environment variables: `containerEnv` vs `remoteEnv`
| Property | Set at | Visible to |
|---|---|---|
| `containerEnv` | Image build time | All processes in container |
| `remoteEnv` | Runtime (by tooling) | VS Code terminals, tasks, debug only |
Always append to PATH — never overwrite:
```json
"remoteEnv": { "PATH": "${containerEnv:PATH}:/my/custom/bin" }
```
### VS Code customizations
```json
"customizations": {
"vscode": {
"extensions": ["ms-python.python", "esbenp.prettier-vscode"],
"settings": { "editor.formatOnSave": true }
}
}
```
## Red Flags — Stop
- Installing a common tool in `postCreateCommand` when a Feature exists for it
- Setting `PATH` in `remoteEnv` without `${containerEnv:PATH}:` prefix
- Adding `"--gpus all"` to `runArgs` without guarding for non-GPU hosts
- Publishing to GHCR without setting package visibility to **public**
- Editing devcontainer.json and expecting auto-rebuild — VS Code requires explicit `Dev Containers: Rebuild Container`
- Running `postCreateCommand` as root when the intent is user-level setup (use `remoteUser`)
## Completion Criteria
- Config validates: `devcontainer read-configuration --workspace-folder .` exits 0
- Container starts: `devcontainer up --workspace-folder .` exits 0
- All lifecycle scripts exit 0
- For features: `devcontainer features test -f ./src/<feature>` passes
- For distribution: GHCR package is set to **public** and version is confirmed in registry
Files in this package (24)
- SKILL.md 5 KB
- references/cli.md 4 KB
- references/devcontainer-json.md 6 KB
- references/distribution.md 5 KB
- references/features.md 7 KB
- references/gotchas.md 7 KB
- references/joe-devcontainer.md 5 KB
- references/templates.md 5 KB
- references/generated/README.md 1 KB
- references/generated/feature-authoring-best-practices.md 15 KB
- references/generated/feature-authoring-guide.md 8 KB
- references/generated/features-distribution.md 16 KB
- references/generated/features-index.md 153 KB
- references/generated/features-spec.md 51 KB
- references/generated/json-reference.md 29 KB
- references/generated/manifest.json 5 KB
- references/generated/templates-distribution.md 11 KB
- references/generated/templates-index.md 23 KB
- references/generated/templates-spec.md 18 KB
- references/generated/vscode-cli.md 26 KB
- references/generated/vscode-containers.md 50 KB
- references/generated/vscode-create.md 47 KB
- references/generated/vscode-tips.md 23 KB
- scripts/update.js 9 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · joeblackwaslike/agent-skills | 100 | MIT |
| TerminalSkills/skills | 100 | Apache-2.0 |
| digitalocean-labs/do-app-platform-skills | 100 | MIT |
| uw-ssec/rse-plugins | 100 | BSD-3-Clause |
Database snapshot: 13.11.2026 · package version 760759a1b01a (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 88dev-loop-dev-container
Use when the user asks about development containers, devcontainer.json, Dev Containers in VS Code/GitHub Codespaces, Docker-based dev environments, or reproducible development setups. Do NOT use for: production Dockerfiles, or CI/CD pipelines. - 95skill-148
Expert guidance for Development Containers (devcontainers) in VS Code. Create, configure, and manage devcontainer.json files, use Templates and Features, integrate with Docker/Docker Compose, and troubleshoot common issues. Use when working with devcontainers, containerized… - 90devcontainers-best-practices
Expert reference for the Dev Container ecosystem. Consult this skill whenever the user is setting up a dev container, configuring or debugging devcontainer.json, working in a Docker-based development environment, or asking about dev containers, GitHub Codespaces, DevPod, or Zed… - 100om-dev-container-maintenance
Maintain the VS Code Dev Container setup for Open Mercato. MUST use for ANY change to `.devcontainer/` files. Also use when the container fails to build/start, services inside misbehave, or "works locally but not in dev container". Triggers on "dev container", "devcontainer", ".devcontainer". - 100configure-container
GHCR image pipeline: multi-platform builds, Trivy/Grype scanning, .dockerignore, devcontainer. Use when setting up GHCR image publishing or adding image scanning to CI. - 90docker-dev
Assistance with Local Development using Docker (Compose, DevContainers). Use when: docker, compose, local dev, devcontainer, dev environment, containerize, dockerization.