docker-templates

docker-templates is a skill for Claude Code, Codex from komluk/scaffolding. It costs 58 tokens per session (1,071 once invoked), scanned A, original, MIT.

Templates and security guidance for building Docker images and defining groups of Docker services. Docker packages an application and its dependencies into isolated environments that can run consistently on different machines.

In plain words
What is it for?
Use it when writing a Dockerfile, setting up multiple services with Docker Compose, or hardening a container image. It covers multi-stage builds, smaller base images, version pinning, non-root users, health checks, and excluded files.
Why use it?
It reduces repeated setup work and helps avoid common container risks, such as running as an administrator, including secrets, or shipping unnecessary files.

Skill for Claude CodeCodex

Part of the scaffolding plugin — 35 skills, 9 commands, 13 agents shipped together

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/komluk/scaffolding/docker-templates
Any agent
npx skills add komluk/scaffolding --skill docker-templates
Clone the repo
git clone --depth 1 https://github.com/komluk/scaffolding

Made for: Claude Code, Codex.

Or install scaffolding, the plugin that ships this one along with the rest of its 35 skills, 9 commands, 13 agents.

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-templates

README.md
[![agentmods](https://agentmods.dev/badge/skills/komluk/scaffolding/docker-templates.svg)](https://agentmods.dev/skills/komluk/scaffolding/docker-templates)
Your own site
<a href="https://agentmods.dev/skills/komluk/scaffolding/docker-templates"><img src="https://agentmods.dev/badge/skills/komluk/scaffolding/docker-templates.svg" alt="Measured on agentmods" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,071 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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 $0.00058 $0.01071
Opus 5 $0.00029 $0.00535
Sonnet 5 $0.00012 $0.00214
Haiku 4.5 $0.00006 $0.00107

Measured 5d ago against content hash e56ec053f1db, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

docker-templates scanned grade A with 1 finding 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 5d 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.

Makes network callslowCapability

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

CMD wget --no-verbose --tries=1 --spider http://localhost:3000/health || exit 1
skills/docker-templates/SKILL.md · 144 lines

How it starts

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

Multi-stage Build Pattern

# Build stage
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production=false
COPY . .
RUN npm run build

# Production stage
FROM node:20-alpine AS production
WORKDIR /app

# Security: Non-root user
RUN addgroup -g 1001 -S nodejs && \
    adduser -S nextjs -u 1001

# Copy only production artifacts
COPY --from=builder --chown=nextjs:nodejs /app/dist ./dist
COPY --from=builder --chown=nextjs:nodejs /app/node_modules ./node_modules
COPY --from=builder --chown=nextjs:nodejs /app/package.json ./

USER nextjs
EXPOSE 3000

# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
  CMD wget --no-verbose --tries=1 --spider http://localhost:3000/health || exit 1

CMD ["node", "dist/server.js"]

Docker Security Best Practices

Practice Implementation
Non-root user USER nodejs after setup
Minimal base image Use -alpine variants
No secrets in image Use runtime env vars
Pin versions FROM node:20.10.0-alpine
.dockerignore Exclude node_modules, .git, .env
Read-only filesystem --read-only flag when possible
Resource limits Set memory/CPU limits

Docker Compose Patterns

version: '3.8'

services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
      target: production
    ports:
      - "3000:3000"
    environment:
      - NODE_ENV=production
      - DATABASE_URL=${DATABASE_URL}
    depends_on:
      db:
        condition: service_healthy
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000/health"]
      interval: 30s
      timeout: 10s
      retries: 3

  db:
    image: postgres:15-alpine
    environment:
      - POSTGRES_USER=${DB_USER}
      - POSTGRES_PASSWORD=${DB_PASSWORD}
      - POSTGRES_DB=${DB_NAME}
    volumes:
      - postgres_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U ${DB_USER}"]
      interval: 10s
      timeout: 5s
      retries: 5

volumes:
  postgres_data:

Read the full file on GitHub · 144 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 144 lines · 58 tokens per session scan A e56ec053f1db

Subscribe to this mod's changes

docker-templates is a skill published in the GitHub repository komluk/scaffolding (15 stars, last pushed 1mo ago), licensed MIT. It adds 58 tokens to every session and 1,071 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

seo-strategy

Audits and improves organic search performance — technical health, site architecture, internal linking, structured data, and the content decisions that determine what can rank. Use this to run an SEO audit, diagnose why pages are not ranking or were deindexed, plan a site's URL and navigation structure, add structured…

cbrock84/headcount · 74 tokens

financial-statement-analysis

Reads a set of financial statements and establishes what changed and why — fluctuation analysis against prior period and against budget, profitability, liquidity, solvency and efficiency ratios, benchmarking, and the non-GAAP measures presented alongside them. Use this to interpret results, review a counterparty's or…

cbrock84/headcount · 93 tokens

youtube-producer

Plans, packages, and scripts long-form video for retention and channel growth — idea selection, titles and thumbnails, script structure, and diagnosing why a video or channel underperforms. Use this for video ideas, packaging, scripting, a retention teardown, or channel strategy — including when someone describes a…

cbrock84/headcount · 86 tokens

estimating-and-contingency

Produces a cost or effort estimate someone can defend — decomposing the work, choosing between analogous, parametric and bottom-up methods, documenting the basis and its assumptions, expressing confidence as a range, and sizing contingency and management reserve separately. Use this to build an estimate, challenge one…

cbrock84/headcount · 87 tokens

scenario-planning

Plans under genuine uncertainty — building scenarios, identifying which assumptions are load-bearing, setting early-warning indicators, and stress-testing a plan against futures rather than forecasting one. Use this when a decision depends on something unknowable, when a plan assumes conditions that may not hold…

cbrock84/headcount · 78 tokens

support-operations

Designs and runs the support function — channels, queues, routing, staffing, service levels, quality, and the metrics that show whether it is working. Use this to set up or fix support operations, choose channels, size a team, set or renegotiate service levels, reduce cost per contact, diagnose long queues or poor…

cbrock84/headcount · 77 tokens