@shipshitdev/devcontainer-setup
Set up a .devcontainer for VS Code with Docker, Claude Code CLI support, and configurable options. Use when the user asks to "set up devcontainer", "add docker development environment", "configure dev container", or needs to containerize their development workflow.
| name | devcontainer-setup |
| description | 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. |
| disable-model-invocation | true |
Devcontainer Setup Skill
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 projectsnode:20- Node.js with more tools- Custom image path
Package Manager: Which package manager?
bun- Bun (default for Bun projects)npm- npmpnpm- pnpmyarn- 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
- Yes - Mount parent as
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,postCreateCommandDockerfile— base image, workdir, dependency install (monorepo-aware), dev tools, exposed portsdocker-compose.yml— service definition, volumes (parent mount + node_modules caching), ports, dev commandsetup.sh— installs dependencies; if Claude Code support is requested, also fixes host-to-container Claude config symlinks and prints API key setup instructionsREADME.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
.devcontainerdirectory - Generate each file with the gathered configuration
- Make
setup.shexecutable - 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'."
Loading...
Select a file to preview
Analyzing security...
Checking scan reports and verification data.
Bill of Materials
Everything this skill can do — files, network, commands, and more.