pn-docker

pn-docker is a skill for Claude Code, Codex from perniemann/pnCore. It costs 50 tokens per session (625 once invoked), scanned A, original, MIT.

A guide to building and reviewing Docker containers, which package an application with everything it needs to run. It covers production images, local development with Compose, and basic container security.

In plain words
What is it for?
Use it when writing Dockerfiles, setting up local services such as databases or Redis, improving image builds, hardening containers, or adding Docker builds to CI.
Why use it?
It helps avoid oversized, slow, unsafe, or unreliable containers. It also reduces repeated build work by using Docker’s cache correctly.

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

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 pn-docker

README.md
[![agentmods](https://agentmods.dev/badge/skills/perniemann/pncore/pn-docker.svg)](https://agentmods.dev/skills/perniemann/pncore/pn-docker)
Your own site
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-docker"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-docker.svg" alt="Measured on agentmods" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 625 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00050 $0.00625
Opus 5 $0.00025 $0.00313
Sonnet 5 $0.00010 $0.00125
Haiku 4.5 $0.00005 $0.00063

Measured 2d ago against content hash 80cd19724995, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

pn-docker 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 2d 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.

packages/pn-core-mcp/content/skills/ci/pn-docker/SKILL.md · 55 lines

How it starts

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

Docker

When to use

  • Writing or reviewing a Dockerfile for a Node.js, Python, Go, or other service
  • Setting up compose.yaml for local development (databases, Redis, message queues)
  • Optimising image size, build speed, or layer caching
  • Hardening a container: non-root user, read-only filesystem, security scanning
  • Integrating Docker builds into CI/CD pipelines

For full Dockerfile examples, compose.yaml, and CI config, see reference.md.

Key rules

Multi-stage builds: Use at least two stages (deps/build → runner). Final stage uses alpine or distroless and a non-root user.

Layer caching: Copy dependency manifests first, install, then copy source code. Never COPY . . && RUN npm ci — invalidates cache on every source change.

.dockerignore: Always include — omitting it copies node_modules into the build context, slowing every build. Minimum: node_modules, .next, .git, local env/secret patterns (see reference.md), dist, coverage.

compose.yaml: Use target: build for local dev with volume mounts for live reload. Use service_healthy depends_on for databases.

Security hardening

Practice Why
Non-root user (USER appuser) Limits blast radius of container escape
Read-only root filesystem docker run --read-only --tmpfs /tmp
No privileged: true Never in production
Pin base image versions node:22.11.0-alpine not node:alpine
Scan with Trivy trivy image myapp:latest in CI
No secrets in ENV or ARG Use runtime secrets: Vault, AWS Secrets Manager
Minimal base image alpine or distroless to reduce attack surface

Image size targets

Stack Target compressed size
Node.js API (alpine) < 150 MB
Next.js (standalone, alpine) < 200 MB
Python FastAPI (slim) < 120 MB
Go (scratch/distroless) < 30 MB

Guardrails

  • Reference pn-devops-automation for full CI/CD pipeline patterns.
  • Reference pn-observability for HEALTHCHECK endpoint implementation.
  • Reference pn-monorepo for multi-service monorepo Docker build strategies.
  • Never use latest tag in production manifests; always pin to a SHA or semver.

Read the full file on GitHub · 55 lines

Files

What ships with it

1 file 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. 2d ago First seen · 55 lines · 50 tokens per session scan A 80cd19724995

Subscribe to this mod's changes

pn-docker is a skill published in the GitHub repository perniemann/pnCore (0 stars, last pushed 2d ago), licensed MIT. It adds 50 tokens to every session and 625 once invoked, about $0.0003 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

deploy-docker-compose

Run the Omnigent server as a Docker compose stack (server + Postgres) on any Docker host — your laptop, a VPS, EC2 by hand, or as the base layer of any container-platform deploy. Invoke when the user wants to build the image, bring up the compose stack, debug the stack on a host they already have, or extend the stack…

omnigent-ai/omnigent · 84 tokens

t-800-factory-scaffold

Procedural checklist CREATE артефактов T-800 через factory (не ad-hoc Write в agents/skills/commands/rules/hooks). Use when /t800-start, factory CREATE, factory-brief, или «собери агента/skill/command». Do NOT use when /t800-fix PATCH, обычный код без Cursor-артефактов, или обучение новичка (→ Task t-800-operator).

Khar-AG/t-800-agent · 100 tokens

t-800-command-chains

Как читать и обновлять machine-readable commandchains T-800 и не плодить orphan commands/agents. Use when правка commands/, registry, graph команд↔агенты, или после добавления /t800- команды. Do NOT use when soft prose orchestration в agent body без JSON, plugin-audit полный отчёт (→ t-800-plugin-auditor), или product…

Khar-AG/t-800-agent · 91 tokens

t-800-fix-pack

Структура fix-pack и constraints factory PATCH для /t800-fix. Use when правка существующего артефакта, fix-packs/ .md, audit→fixpack, или mode PATCH. Do NOT use when полный CREATE /t800-start, Loop report-only (/t800-loop), или doctor/plugin-audit без PATCH.

Khar-AG/t-800-agent · 79 tokens

t-800-plugin-sync

Procedural install/sync T-800 в /.cursor/plugins/local с CONTENTDRIFT --check и обязательным Reload Window. Use when install-plugin, sync --check, CONTENTDRIFT, stale marketplace pin, или «плагин не обновился». Do NOT use when KB sync-docs (/t-800-sync → t-800-knowledge-base), factory CREATE артефактов, или MIR в…

Khar-AG/t-800-agent · 98 tokens

t-800-run-gates

Какие machine gates гонять перед «готово» в прогоне T-800 (rungate, frontmatter, doctor/audit по режиму). Use when перед сдачей CREATE/PATCH, STATE Gates, strict-create, или exit code gates. Do NOT use when проектирование промпта (prompt-craft), обучение новичка, или cloud conversation hooks как sole-gate (P1).

Khar-AG/t-800-agent · 89 tokens