claude-code-mastery-project-starter-kit: Skill for Claude Code

.claude/skills/docker/SKILL.md

docker is a skill for Claude Code from TheDecipherist/claude-code-mastery-project-starter-kit. It costs 103 tokens per session (1,486 once invoked), scanned D, original, MIT.

A set of rules for creating Dockerfiles, Compose files, and Swarm stack files. Docker packages an application and its dependencies into portable containers.

In plain words
What is it for?
It helps structure multi-stage builds, order Docker layers for better caching, and define correct container startup commands.
Why use it?
It prevents common build mistakes that can make images unnecessarily large, slow to rebuild, or harder to secure.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter.

This is TheDecipherist/claude-code-mastery-project-starter-kit's own configuration. It tells Claude Code how to work on claude-code-mastery-project-starter-kit itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-code-mastery-project-starter-kit configures →

Reuse

Borrowing it

Nothing to install: this file belongs to TheDecipherist/claude-code-mastery-project-starter-kit. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/TheDecipherist/claude-code-mastery-project-starter-kit/main/.claude/skills/docker/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/TheDecipherist/claude-code-mastery-project-starter-kit

Made for: Claude Code.

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 docker

README.md
[![agentmods](https://agentmods.dev/badge/skills/thedecipherist/claude-code-mastery-project-starter-kit/docker/github.svg)](https://agentmods.dev/skills/thedecipherist/claude-code-mastery-project-starter-kit/docker)
Your own site
<a href="https://agentmods.dev/skills/thedecipherist/claude-code-mastery-project-starter-kit/docker"><img src="https://agentmods.dev/badge/skills/thedecipherist/claude-code-mastery-project-starter-kit/docker/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 docker

Your own site · 80×15
<a href="https://agentmods.dev/skills/thedecipherist/claude-code-mastery-project-starter-kit/docker"><img src="https://agentmods.dev/badge/skills/thedecipherist/claude-code-mastery-project-starter-kit/docker.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 103 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,486 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 2 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00103 $0.01486
Opus 5.5 $0.00041 $0.00594
Sonnet 5.5 $0.00021 $0.00297
Haiku 4.5 $0.00010 $0.00149

Measured 2mo ago against content hash 248a49779c0e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade D, and why

docker scanned grade D with 2 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 2mo 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- **Run as non-root.** Containers run as root by default. Add a `USER` (for example `USER node`) before the entrypoint so a container escape isn't root on the host.

Recursive force deletehighDestructive command

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

- **Combine and clean in one `RUN`.** `apt-get update && apt-get install -y ... && rm -rf /var/lib/apt/lists/*` in a single layer. A separate `update` layer goes stale behind the cache, and the cleanup only shrinks the i
.claude/skills/docker/SKILL.md · 73 lines

How it starts

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

Docker: Production Image and Compose Rules

From production, not defaults. Claude's Dockerfiles tend to be wrong in the same few ways. Fix them here.

Dockerfile

  • Multi-stage builds, always. Build in a stage that has the compilers and dev dependencies, then COPY --from=build only the artifacts into a slim runtime stage. The runtime image carries no build tools, which cuts size hard (a real build went from ~2GB to ~200MB) and removes a pile of CVEs.
FROM node:22 AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

FROM node:22-slim AS runtime
WORKDIR /app
COPY package*.json ./
RUN npm ci --omit=dev
COPY --from=build /app/dist ./dist
USER node
ENTRYPOINT ["node", "dist/server.js"]
  • Order layers by how often they change: stable first, source last. Docker caches each layer and rebuilds every layer after the first one whose inputs changed. So copy the dependency manifest and install deps BEFORE copying source: COPY package*.json ./ then RUN npm ci then COPY . .. Copy source first and a one-line code change reinstalls every dependency, every build.

  • The runtime command is ENTRYPOINT/CMD in exec form, never RUN. RUN executes at build time; the container's process belongs in ENTRYPOINT ["node","server.js"] (a JSON array). Use exec form, not shell form (ENTRYPOINT node server.js): shell form runs your app under /bin/sh -c, so sh is PID 1, it swallows SIGTERM, and your app never shuts down gracefully (Docker waits out the grace period then SIGKILLs it) and its exit code is lost. Exec form makes your process PID 1 so signals and exit codes propagate. ENTRYPOINT for the executable, CMD for default args.

  • Pin base image versions. FROM node:22.3.0-slim, not node:latest. latest makes builds non-reproducible and shifts under you silently. Pin a tag (or a digest for full reproducibility), and expose it as an ARG so it's easy to bump deliberately.

  • Add a .dockerignore. Exclude node_modules, .git, .env, dist, and local junk. Without it the whole directory ships as build context (slow), busts the cache on unrelated changes, and can bake a stale node_modules or a secret file into the image.

Read the full file on GitHub · 73 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. 2mo ago First seen · 73 lines · 0 tokens per session scan D 248a49779c0e

Subscribe to this mod's changes

docker is a skill published in the GitHub repository TheDecipherist/claude-code-mastery-project-starter-kit (342 stars, last pushed 4mo ago), licensed MIT. It adds 103 tokens to every session and 1,486 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it D with 2 findings (asks for root, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

docker compared with skills from other repositories

docker next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
dockerTheDecipherist/claude-code-mastery-project-starter-kitSkill3424mo agoMITD103Claude Code
deploy-docker-composeomnigent-ai/omnigentSkill11kyesterdayApache-2.0A84Claude Code, Codex
bdd-container-updateNVIDIA-AI-Blueprints/video-search-and-summarizationSkill2.0kyesterdayApache-2.0A117Cursor
securing-kubernetes-on-cloudxalgorix/xalgorixSkill1.3kyesterdayApache-2.0A80Claude Code, Codex
detecting-privilege-escalation-in-kubernetes-podsxalgorix/xalgorixSkill1.3kyesterdayApache-2.0A40Claude Code, Codex
docker-socket-mountPurpleAILAB/DecepticonSkill6.5k8d agoApache-2.0B67Claude Code
k8s-networkingrohitg00/kubectl-mcp-serverSkill96815d agoMITA34Claude Code, Codex