devcontainers-nix

devcontainers-nix is a skill for Claude Code, Codex from BagelHole/DevOps-Security-Agent-Skills. It costs 48 tokens per session (2,492 once invoked), scanned E, original, MIT.

A way to define repeatable development environments with Dev Containers, Nix flakes, and Devbox. These environments specify the tools and versions a project needs so team members use consistent setups.

In plain words
What is it for?
Use it to onboard developers, standardize toolchains, create disposable environments, and make local development match continuous-integration environments.
Why use it?
It reduces differences between developers' machines and helps prevent the familiar problem of software working for one person but not another.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/bagelhole/devops-security-agent-skills/devcontainers-nix
Any agent
npx skills add BagelHole/DevOps-Security-Agent-Skills --skill devcontainers-nix
Clone the repo
git clone --depth 1 https://github.com/BagelHole/DevOps-Security-Agent-Skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for devcontainers-nix

README.md
[![agentmods](https://agentmods.dev/badge/skills/bagelhole/devops-security-agent-skills/devcontainers-nix.svg)](https://agentmods.dev/skills/bagelhole/devops-security-agent-skills/devcontainers-nix)
Your own site
<a href="https://agentmods.dev/skills/bagelhole/devops-security-agent-skills/devcontainers-nix"><img src="https://agentmods.dev/badge/skills/bagelhole/devops-security-agent-skills/devcontainers-nix.svg" alt="Measured on agentmods" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,492 The whole file, excluding the scripts and references it only reads on demand.
Security scan E 3 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.02492
Opus 5 $0.00024 $0.01246
Sonnet 5 $0.00010 $0.00498
Haiku 4.5 $0.00005 $0.00249

Measured 6d ago against content hash ab8c0c43254a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade E, and why

devcontainers-nix scanned grade E with 3 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

RUN curl -fsSL https://get.opentofu.org/install-opentofu.sh | sh -s -- --install-method standalone

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

&& rm -rf /var/lib/apt/lists/*

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl \
devops/developer-experience/devcontainers-nix/SKILL.md · 390 lines

How it starts

The opening of the file, as written. The whole thing — 390 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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:

Read the full file on GitHub · 390 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 390 lines · 48 tokens per session scan E ab8c0c43254a

Subscribe to this mod's changes

devcontainers-nix is a skill published in the GitHub repository BagelHole/DevOps-Security-Agent-Skills (1,037 stars, last pushed 3mo ago), licensed MIT. It adds 48 tokens to every session and 2,492 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it E with 3 findings (downloads and executes remote code, recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.