containers

containers is a skill for Claude Code, Codex from nimadorostkar/Claude-Skills-collection. It costs 38 tokens per session (1,138 once invoked), scanned A, original, MIT.

A guide to building and troubleshooting container images, packaged environments that include an application and its runtime. It covers image size, build speed, security, and process behavior.

In plain words
What is it for?
Use it to write Dockerfiles, optimize build layers, create multi-stage images, run as a non-root user, scan images, and debug local-versus-deployed differences.
Why use it?
It helps avoid oversized images, slow rebuilds, containers running as root, and applications that exit or handle shutdown incorrectly.

Skill for Claude CodeCodex

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

Good fit Use it to write Dockerfiles, optimize build layers, create multi-stage images, run as a non-root user, scan images, and debug local-versus-deployed differences.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nimadorostkar/claude-skills-collection/containers
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.

Any agent
npx skills add nimadorostkar/Claude-Skills-collection --skill containers
Clone the repo
git clone --depth 1 https://github.com/nimadorostkar/Claude-Skills-collection

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 containers

README.md
[![agentmods](https://agentmods.dev/badge/skills/nimadorostkar/claude-skills-collection/containers/github.svg)](https://agentmods.dev/skills/nimadorostkar/claude-skills-collection/containers)
Your own site
<a href="https://agentmods.dev/skills/nimadorostkar/claude-skills-collection/containers"><img src="https://agentmods.dev/badge/skills/nimadorostkar/claude-skills-collection/containers/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for containers

Your own site · 80×15
<a href="https://agentmods.dev/skills/nimadorostkar/claude-skills-collection/containers"><img src="https://agentmods.dev/badge/skills/nimadorostkar/claude-skills-collection/containers.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,138 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00038 $0.01138
Opus 5 $0.00019 $0.00569
Sonnet 5 $0.00008 $0.00228
Haiku 4.5 $0.00004 $0.00114

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

Security

Grade A, and why

containers scanned grade A with 0 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 8d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/devops/containers/SKILL.md · 104 lines

How it starts

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

Containers

Purpose

Build container images that are small, cached effectively, and safe to run — not a 1.2 GB image running as root that rebuilds from scratch every time a source file changes.

When to Use

  • Writing or reviewing a Dockerfile.
  • Reducing image size or build time.
  • Debugging a container that exits, hangs, or behaves differently from local development.
  • Hardening images before a security review.

Capabilities

  • Multi-stage builds and build-cache optimization.
  • Base-image selection: distroless, Alpine, slim, and their trade-offs.
  • Non-root users, read-only filesystems, and dropped capabilities.
  • Signal handling and PID 1 semantics.
  • Image scanning and SBOM generation.

Inputs

  • The application, its runtime, and its build steps.
  • The target platform (including whether ARM builds are required).
  • Security and compliance requirements.

Outputs

  • A multi-stage Dockerfile with an ordered, cache-friendly layer sequence.
  • An image running as a non-root user, with no build tooling inside.
  • A scan report with no critical vulnerabilities in the final image.

Workflow

  1. Order layers by change frequency — Dependency manifests first, dependency install second, source code last. Copying the source before installing dependencies invalidates the cache on every code change.
  2. Build in stages — A build stage with compilers and dev dependencies; a runtime stage containing only the artifact and its runtime. The compiler must not ship to production.
  3. Run as non-root — Create a user in the image and USER it. A container running as root that is compromised is a root process on the node.
  4. Handle signals — Use exec form (CMD ["node", "server.js"]), not shell form. Shell form makes /bin/sh PID 1, which does not forward SIGTERM, so your graceful shutdown never runs.
  5. Scan and pin — Pin the base image by digest, scan the final image, and rebuild regularly to pick up base-image patches.

Best Practices

  • COPY package*.json ./ then RUN npm ci then COPY . . — in that order. This is the single most impactful Dockerfile optimization and it is routinely written backwards.
  • Shell-form CMD means your process is not PID 1 and will not receive SIGTERM. Every "why doesn't my container shut down gracefully" question has this answer.
  • Distroless or scratch images have no shell, which is excellent for security and inconvenient for debugging. Use kubectl debug or a debug variant tag.
  • A .dockerignore that excludes .git, node_modules, and build output can cut the build context from hundreds of megabytes to a few.
  • latest is not a version. Pin by digest for reproducibility, or at minimum by an immutable tag.
  • Secrets passed as build args are baked into the image layers and recoverable. Use BuildKit secret mounts.

Read the full file on GitHub · 104 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. 8d ago First seen · 104 lines · 38 tokens per session scan A e5a4695a507f

Subscribe to this mod's changes

containers is a skill published in the GitHub repository nimadorostkar/Claude-Skills-collection (26 stars, last pushed 24d ago), licensed MIT. It adds 38 tokens to every session and 1,138 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

offensive-container-escape

Container escape and breakout techniques targeting Docker, containerd, and Podman runtimes. Covers privileged container breakout via host filesystem mount and nsenter, Docker socket abuse through /var/run/docker.sock, Linux capability exploitation including CAPSYSADMIN, CAPSYSPTRACE, and CAPNETADMIN, cgroup v1…

SnailSploit/Claude-Red · 196 tokens

datarobot-workload-api

Use when the user wants to create, configure, scale, debug, observe, or roll out container workloads on DataRobot's Workload API. Triggers include: deploying a container as a managed service, listing/starting/stopping workloads, changing replica counts or autoscaling, picking CPU/GPU compute bundles, injecting…

datarobot-oss/datarobot-agent-skills · 152 tokens

dockerfile-best-practices

Create and optimize Dockerfiles and Compose files with BuildKit, multi-stage builds, cache mounts, and non-root hardening. Also triggers on container images, build performance, or Docker security, even without the word 'Dockerfile'.

obeone/claude-skills · 53 tokens

helm-bjw-s-chart

Generate production-ready Helm charts on the bjw-s-labs common library (app-template v5, v4 legacy). Use for new charts, Compose-to-Helm conversion, sidecars, init containers, services, ingress, persistence, StatefulSets, HPAs, Service/PodMonitors, and NetworkPolicies.

obeone/claude-skills · 70 tokens

docker-compose

Use this skill when authoring or editing Docker Compose files (compose.yaml / docker-compose.yml), running multi-container stacks, or containerizing a Drupal/PHP application — e.g. "set up a local Drupal stack with nginx and MariaDB", "add Redis to my compose file", "why won't my containers start", "split dev and prod…

siva01c/claude-plugins · 100 tokens

speckit.devops

Docker Infrastructure & Security Hardening Specialist — Port ENV-first.

wedabro/bro-skills · 18 tokens