devcontainers-nix
devcontainers-nix is an engineering AI skill with a core value of Create reproducible development environments with Dev Containers, Nix flakes, and Devbox for consistent toolchains across teams. It
helps developers solve real-world problems in the engineering domain, boosting
efficiency, automating repetitive tasks, and optimizing workflows.
Create reproducible development environments with Dev Containers, Nix flakes, and Devbox for consistent toolchains across teams.
Quick Facts
mkdir -p ./skills/devcontainers-nix && curl -sfL https://raw.githubusercontent.com/sickn33/antigravity-awesome-skills/main/skills/devcontainers-nix/SKILL.md -o ./skills/devcontainers-nix/SKILL.md Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).
Skill Content
# Dev Containers & Nix Environments
Reproducible, portable development environments that eliminate environment drift.
When to Use This Skill
Use this skill when:
- Onboarding new developers (zero-to-productive in minutes)
- Standardizing toolchains across a team
- Eliminating "works on my machine" problems
- Setting up CI environments that match local dev
- Creating ephemeral, disposable dev environments
Dev Containers
Basic Configuration
// .devcontainer/devcontainer.json
{
"name": "My Project",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu-22.04",
"features": {
"ghcr.io/devcontainers/features/node:1": { "version": "20" },
"ghcr.io/devcontainers/features/python:1": { "version": "3.12" },
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {}
},
"forwardPorts": [3000, 5432],
"postCreateCommand": "npm install",
"customizations": {
"vscode": {
"extensions": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"ms-python.python"
],
"settings": {
"editor.formatOnSave": true
}
}
}
}Docker Compose Dev Container
// .devcontainer/devcontainer.json
{
"name": "Full Stack Dev",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspace",
"forwardPorts": [3000, 5432, 6379],
"postCreateCommand": "npm install && npx prisma migrate dev"
}# .devcontainer/docker-compose.yml
services:
app:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
volumes:
- ..:/workspace:cached
command: sleep infinity
depends_on: [db, redis]
db:
image: postgres:16
environment:
POSTGRES_DB: dev
POSTGRES_USER: dev
POSTGRES_PASSWORD: dev
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
pgdata:Custom Dockerfile
# .devcontainer/Dockerfile
FROM mcr.microsoft.com/devcontainers/base:ubuntu-22.04
# System dependencies
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
jq \
unzip \
&& rm -rf /var/lib/apt/lists/*
# Install project-specific tools
RUN curl -fsSL https://get.opentofu.org/install-opentofu.sh -o /tmp/install-opentofu.sh \
&& sh /tmp/install-opentofu.sh -s -- --install-method standalone \
&& rm /tmp/install-opentofu.sh
RUN curl -LO "https://dl.k8s.io/release/$(curl -sL https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \
&& install kubectl /usr/local/bin/
# Non-root user setup
USER vscode
WORKDIR /workspaceNix Flakes
Basic Flake
# flake.nix
{
description = "Project development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in {
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
# Languages
nodejs_20
python312
go_1_22
rustc
cargo
# Tools
docker-compose
kubectl
kubernetes-helm
opentofu
awscli2
jq
yq-go
# Databases
postgresql_16
redis
];
shellHook = ''
echo "Dev environment loaded"
export PROJECT_ROOT=$(pwd)
export PATH="$PROJECT_ROOT/node_modules/.bin:$PATH"
'';
};
}
);
}# Enter the dev shell
nix develop
# Or run a single command
nix develop --command bash -c "node --version && go version"
# Build and run
nix build
nix run🎯 Best For
- Claude users
- AI users
💡 Use Cases
- Using devcontainers-nix in daily workflow
- Automating repetitive engineering tasks
📖 How to Use This Skill
- 1
Install the Skill
Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.
- 2
Load into Your AI Assistant
Open Claude and reference the skill. Paste the SKILL.md content or use the system prompt tab.
- 3
Apply devcontainers-nix to Your Work
Provide context for your task — paste source material, describe your audience, or share existing work to guide the AI.
- 4
Review and Refine
Edit the AI output for accuracy, tone, and completeness. Add human insight where the AI lacks context.
❓ Frequently Asked Questions
How do I install devcontainers-nix?
Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/devcontainers-nix/SKILL.md, ready to use.
Can I customize this skill for my team?
Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.
⚠️ Common Mistakes to Avoid
Not reading the full skill
Skills contain important context and edge cases beyond the quick start.