Devcontainer Setup Skill
Authorized Scope
Apply this engine only within the user's requested task and existing explicit
authorization. Loading or delegating to it grants no additional authority.
Preserve report-only restrictions and the caller's target, host, provider, and
cost limits. Existing approval satisfies a gate only for the same actions and
scope; obtain approval before expanding them. Forward these limits to delegates.
Contract
Inputs:
- Project runtime, existing container configuration, and requested development setup
- Approved directory mounts and optional tooling
Outputs:
- Dev Container configuration and startup instructions
Creates/Modifies:
.devcontainer/ files within the authorized setup scope
External Side Effects:
- Image pulls, package installs, or container startup only when requested
Confirmation Required:
- Before overwriting existing configuration or mounting directories outside the
selected project
- Before adding tooling or starting containers outside the approved setup
Delegates To:
docker-expert for container configuration details
Information Gathering
Before creating the devcontainer, gather the following information from the user:
Required Information
Project Name: What is the project/container name? (e.g., my-project, shipshitdev-api)
Base Image: What runtime does this project use?
oven/bun:1.3.5 - Bun projects (recommended for speed)
node:20-slim - Node.js projects
node:20 - Node.js with more tools
- Custom image path
Package Manager: Which package manager?
bun - Bun (default for Bun projects)
npm - npm
pnpm - pnpm
yarn - Yarn
Ports: What ports need to be forwarded? (comma-separated, e.g., 3000, 3001, 5432)
Port Labels (optional): Labels for each port (e.g., 3000=Web, 5432=Postgres)
Parent Directory Mount: Should the parent directory be mounted for cross-repo access?
- Yes - Mount parent as
/workspace (good for monorepos, shared libraries)
- No - Only mount this project
Claude Code Support: Include Claude Code CLI setup?
- Yes - Install Claude Code and fix symlinks for container use
- No - Skip Claude Code setup
VS Code Extensions (optional): Additional extensions to install (comma-separated extension IDs)
Monorepo Structure (if applicable):
- Is this a monorepo with nested package.json files?
- What are the app/package directories? (e.g.,
apps/*, packages/*)
File Structure to Create
.devcontainer/
├── devcontainer.json # VS Code dev container config
├── Dockerfile # Container image definition
├── docker-compose.yml # Docker compose config
├── setup.sh # Post-create setup script
└── README.md # Documentation
Templates
Generate all five files from the gathered information:
devcontainer.json — build config, mounts, features, VS Code extensions/settings, forwarded ports, postCreateCommand
Dockerfile — base image, workdir, dependency install (monorepo-aware), dev tools, exposed ports
docker-compose.yml — service definition, volumes (parent mount + node_modules caching), ports, dev command
setup.sh — installs dependencies; if Claude Code support is requested, also fixes host-to-container Claude config symlinks and prints API key setup instructions
README.md — quick start, mount/port tables, directory structure, troubleshooting
See references/templates.md for the full fill-in-the-blank text of each file
({{PLACEHOLDER}} values come from the gathered information above).
Package Manager Reference
| Package Manager |
Lock File |
Install Command |
Dev Command |
| bun |
bun.lock* |
bun install --frozen-lockfile |
bun run dev |
| npm |
package-lock.json |
npm ci |
npm run dev |
| pnpm |
pnpm-lock.yaml |
pnpm install --frozen-lockfile |
pnpm run dev |
| yarn |
yarn.lock |
yarn install --frozen-lockfile |
yarn dev |
Implementation Steps
- Ask the user the required questions above using AskUserQuestion
- Create the
.devcontainer directory
- Generate each file with the gathered configuration
- Make
setup.sh executable
- Provide summary of what was created and how to use it
Example Usage
User: "Set up devcontainer for my Next.js project"
- Gather info: Project uses Bun, ports 3000, needs Claude Code support
- Create all 5 files in
.devcontainer/
- Output: "Created devcontainer configuration. Open in VS Code and click 'Reopen in Container'."
1---2name: devcontainer-setup-23description: Scaffolds a complete VS Code Dev Container configuration with Docker, docker-compose, and optional Claude Code CLI support. Activates when asked to "set up devcontainer", "add docker development environment", "configure dev container", or containerize a development workflow.4---56# Devcontainer Setup Skill78## Authorized Scope910Apply this engine only within the user's requested task and existing explicit11authorization. Loading or delegating to it grants no additional authority.12Preserve report-only restrictions and the caller's target, host, provider, and13cost limits. Existing approval satisfies a gate only for the same actions and14scope; obtain approval before expanding them. Forward these limits to delegates.1516## Contract1718Inputs:1920- Project runtime, existing container configuration, and requested development setup21- Approved directory mounts and optional tooling2223Outputs:2425- Dev Container configuration and startup instructions2627Creates/Modifies:2829- `.devcontainer/` files within the authorized setup scope3031External Side Effects:3233- Image pulls, package installs, or container startup only when requested3435Confirmation Required:3637- Before overwriting existing configuration or mounting directories outside the38 selected project39- Before adding tooling or starting containers outside the approved setup4041Delegates To:4243- `docker-expert` for container configuration details4445## Information Gathering4647Before creating the devcontainer, gather the following information from the user:4849### Required Information50511. **Project Name**: What is the project/container name? (e.g., `my-project`, `shipshitdev-api`)52532. **Base Image**: What runtime does this project use?54 - `oven/bun:1.3.5` - Bun projects (recommended for speed)55 - `node:20-slim` - Node.js projects56 - `node:20` - Node.js with more tools57 - Custom image path58593. **Package Manager**: Which package manager?60 - `bun` - Bun (default for Bun projects)61 - `npm` - npm62 - `pnpm` - pnpm63 - `yarn` - Yarn64654. **Ports**: What ports need to be forwarded? (comma-separated, e.g., `3000, 3001, 5432`)66675. **Port Labels** (optional): Labels for each port (e.g., `3000=Web, 5432=Postgres`)68696. **Parent Directory Mount**: Should the parent directory be mounted for cross-repo access?70 - Yes - Mount parent as `/workspace` (good for monorepos, shared libraries)71 - No - Only mount this project72737. **Claude Code Support**: Include Claude Code CLI setup?74 - Yes - Install Claude Code and fix symlinks for container use75 - No - Skip Claude Code setup76778. **VS Code Extensions** (optional): Additional extensions to install (comma-separated extension IDs)78799. **Monorepo Structure** (if applicable):80 - Is this a monorepo with nested package.json files?81 - What are the app/package directories? (e.g., `apps/*, packages/*`)8283## File Structure to Create8485```86.devcontainer/87├── devcontainer.json # VS Code dev container config88├── Dockerfile # Container image definition89├── docker-compose.yml # Docker compose config90├── setup.sh # Post-create setup script91└── README.md # Documentation92```9394## Templates9596Generate all five files from the gathered information:9798- `devcontainer.json` — build config, mounts, features, VS Code extensions/settings, forwarded ports, `postCreateCommand`99- `Dockerfile` — base image, workdir, dependency install (monorepo-aware), dev tools, exposed ports100- `docker-compose.yml` — service definition, volumes (parent mount + node_modules caching), ports, dev command101- `setup.sh` — installs dependencies; if Claude Code support is requested, also fixes host-to-container Claude config symlinks and prints API key setup instructions102- `README.md` — quick start, mount/port tables, directory structure, troubleshooting103104See `references/templates.md` for the full fill-in-the-blank text of each file105(`{{PLACEHOLDER}}` values come from the gathered information above).106107## Package Manager Reference108109| Package Manager | Lock File | Install Command | Dev Command |110|-----------------|-----------|-----------------|-------------|111| bun | `bun.lock*` | `bun install --frozen-lockfile` | `bun run dev` |112| npm | `package-lock.json` | `npm ci` | `npm run dev` |113| pnpm | `pnpm-lock.yaml` | `pnpm install --frozen-lockfile` | `pnpm run dev` |114| yarn | `yarn.lock` | `yarn install --frozen-lockfile` | `yarn dev` |115116## Implementation Steps1171181. Ask the user the required questions above using AskUserQuestion1192. Create the `.devcontainer` directory1203. Generate each file with the gathered configuration1214. Make `setup.sh` executable1225. Provide summary of what was created and how to use it123124## Example Usage125126User: "Set up devcontainer for my Next.js project"1271281. Gather info: Project uses Bun, ports 3000, needs Claude Code support1292. Create all 5 files in `.devcontainer/`1303. Output: "Created devcontainer configuration. Open in VS Code and click 'Reopen in Container'."