create-dockerfile

create-dockerfile is a skill for Claude Code from pjt222/agent-almanac. It costs 88 tokens per session (1,739 once invoked), scanned C, original, MIT.

A guide to writing Dockerfiles for Node.js, Python, Go, Rust, and Java applications. A Dockerfile describes how Docker builds an isolated environment for running an application.

In plain words
What is it for?
Use it to choose a base image, install dependencies, set permissions, define startup commands, and expose application ports.
Why use it?
It helps create consistent build and runtime environments and prepares applications for cloud deployment or Docker Compose.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is RUN CGO_ENABLED=0 go build -o /app/server ./cmd/server.

Part of the agent-almanac plugin — 122 skills, 77 agents shipped together

Good fit Use it to choose a base image, install dependencies, set permissions, define startup commands, and expose application ports.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/pjt222/agent-almanac
agentmods
npx agentmods add skills/pjt222/agent-almanac/create-dockerfile

Made for: Claude Code.

Or install agent-almanac, the plugin that ships this one along with the rest of its 122 skills, 77 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 create-dockerfile

README.md
[![agentmods](https://agentmods.dev/badge/skills/pjt222/agent-almanac/create-dockerfile/github.svg)](https://agentmods.dev/skills/pjt222/agent-almanac/create-dockerfile)
Your own site
<a href="https://agentmods.dev/skills/pjt222/agent-almanac/create-dockerfile"><img src="https://agentmods.dev/badge/skills/pjt222/agent-almanac/create-dockerfile/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 create-dockerfile

Your own site · 80×15
<a href="https://agentmods.dev/skills/pjt222/agent-almanac/create-dockerfile"><img src="https://agentmods.dev/badge/skills/pjt222/agent-almanac/create-dockerfile.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,739 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00088 $0.01739
Opus 5.5 $0.00035 $0.00696
Sonnet 5.5 $0.00018 $0.00348
Haiku 4.5 $0.00009 $0.00174

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

Security

Grade C, and why

create-dockerfile scanned grade C 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 1mo 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.

Recursive force deletehighDestructive command

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

RUN mkdir src && echo "fn main() {}" > src/main.rs && cargo build --release && rm -rf src
i18n/caveman-lite/skills/create-dockerfile/SKILL.md · 239 lines

How it starts

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

Create Dockerfile

Write a production-ready Dockerfile for general-purpose application projects.

When to Use

  • Containerizing a Node.js, Python, Go, Rust, or Java application
  • Creating a consistent build/runtime environment
  • Preparing an application for cloud deployment or Docker Compose
  • No existing Dockerfile in the project

Inputs

  • Required: Project language and entry point (e.g., npm start, python app.py)
  • Required: Dependency manifest (package.json, requirements.txt, go.mod, Cargo.toml, pom.xml)
  • Optional: Target environment (development or production)
  • Optional: Exposed ports

Procedure

Step 1: Choose Base Image

Language Dev Image Prod Image Size
Node.js node:22-bookworm node:22-bookworm-slim ~200MB
Python python:3.12-bookworm python:3.12-slim-bookworm ~150MB
Go golang:1.23-bookworm gcr.io/distroless/static ~2MB
Rust rust:1.82-bookworm debian:bookworm-slim ~80MB
Java eclipse-temurin:21-jdk eclipse-temurin:21-jre ~200MB

Got: Select the slim/distroless variant for production images.

Step 2: Write Dockerfile (by language)

Node.js
FROM node:22-bookworm-slim

RUN groupadd -r appuser && useradd -r -g appuser -m appuser

WORKDIR /app

COPY package.json package-lock.json ./
RUN npm ci --omit=dev

COPY . .

USER appuser
EXPOSE 3000
CMD ["node", "src/index.js"]
Python
FROM python:3.12-slim-bookworm

RUN groupadd -r appuser && useradd -r -g appuser -m appuser

WORKDIR /app

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

USER appuser
EXPOSE 8000
CMD ["python", "app.py"]
Go
FROM golang:1.23-bookworm AS builder

WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -o /app/server ./cmd/server

FROM gcr.io/distroless/static
COPY --from=builder /app/server /server
EXPOSE 8080
ENTRYPOINT ["/server"]

Read the full file on GitHub · 239 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. 1mo ago First seen · 239 lines · 88 tokens per session scan C a8fde49f39cf

Subscribe to this mod's changes

create-dockerfile is a skill published in the GitHub repository pjt222/agent-almanac (42 stars, last pushed 5d ago), licensed MIT. It adds 88 tokens to every session and 1,739 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). 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

graalvm-native-image

Provides expert guidance for building GraalVM Native Image executables from Java applications. Use when converting JVM applications to native binaries, optimizing cold start times, reducing memory footprint, configuring native build tools for Maven or Gradle, resolving reflection and resource issues in native builds…

giuseppe-trisciuoglio/developer-kit · 124 tokens

authoring-go-sdk-tasks

Writes Airflow task logic in Go using the Airflow Go SDK. Use when the user wants to implement Airflow tasks in Go, asks about BundleProvider/RegisterDags, the bundlev1 Registry/Dag interfaces, registering Go tasks (AddTask/AddTaskWithName), dependency injection by parameter type (context.Context, sdk.TIRunContext…

astronomer/agents · 165 tokens

authoring-dags

Workflow and best practices for writing Apache Airflow DAGs. Use when creating a new DAG, write pipeline code, handling questions about DAG patterns and conventions or extending an existing DAG with a follow-up/downstream task. ANY request shaped like 'add a DAG named X', 'write a pipeline', 'add a task that runs…

astronomer/agents · 93 tokens

aws-sdk-java-v2-bedrock

Provides Amazon Bedrock patterns using AWS SDK for Java 2.x. Invokes foundation models (Claude, Llama, Titan), generates text and images, creates embeddings for RAG, streams real-time responses, and configures Spring Boot integration. Use when asking about Bedrock integration, Java SDK for AI models, AWS generative…

giuseppe-trisciuoglio/developer-kit · 92 tokens

aws-cloudformation-task-ecs-deploy-gh

Provides patterns to deploy ECS tasks and services with GitHub Actions CI/CD. Use when building Docker images, pushing to ECR, updating ECS task definitions, deploying ECS services, integrating with CloudFormation stacks, configuring AWS OIDC authentication for GitHub Actions, and implementing production-ready…

giuseppe-trisciuoglio/developer-kit · 106 tokens

aws-lambda-python-integration

Provides AWS Lambda integration patterns for Python with cold start optimization. Use when deploying Python functions to AWS Lambda, choosing between AWS Chalice and raw Python approaches, optimizing cold starts, configuring API Gateway or ALB integration, or implementing serverless Python applications. Triggers…

giuseppe-trisciuoglio/developer-kit · 94 tokens