agentleFS
kaynetikkaynetik/skills/podmaster/SKILL.md

podmaster

Skill1 starsChanged 8 months agoMITView on GitHub

End-to-end container expertise spanning OCI images, runtimes, and operations: image design, Dockerfile/Containerfile optimization, Docker Engine and Compose, Podman (rootless, pods, Quadlet), containerd and CRI, debugging, security hardening, and CI scanning. Use when building or reviewing container images, choosing Docker vs Podman, troubleshooting containers or pods, optimizing layers and cache, working with nerdctl/ctr, Kubernetes node runtimes, Containerfile, docker-compose, podman-compose, health checks, or when the user mentions containers, OCI, rootless, BuildKit, or image supply chain.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the relevant reference before giving version-specific flags or config paths.

    line 21
  2. Very specific:

    Run as non-root: when the workload allows; set USER after COPY with correct ownership.

    line 46
  3. Very specific:

    Prefer explicit publish (-p, ports:) over --network host unless host networking is genuinely required.

    line 52
  4. Very specific:

    Add a non-root user, health check, and metadata labels (org.opencontainers.image.*).

    line 72
  5. Very specific:

    Check ps or orchestrator events for exit code and restart policy.

    line 79
  6. Distinctive:

    Read logs (runtime and application).

    line 80

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Podmaster (container engineering)

Think in OCI terms first (image format, distribution, runtime bundle), then map to the concrete tool (Docker, Podman, containerd, Kubernetes).

Reference files

TopicFileWhen to read
Docker Engine, Compose, Buildxreference/docker.mddocker CLI, compose files, buildx, contexts
Podmanreference/podman.mdrootless, pods, Quadlet, podman compose, kube play
Dockerfile and Containerfilereference/dockerfile.mdmulti-stage builds, layer cache, .dockerignore, hardening
containerd and CRIreference/containerd.mdctr, crictl, nerdctl, snapshots, Kubernetes node runtime
Debuggingreference/debugging.mdcrash loops, networking, resources, exec, logs
Runtimes and CRIreference/runtimes-and-cri.mdrunc/crun, shim, kubelet CRI flow, what to use when

Read the relevant reference before giving version-specific flags or config paths. Prefer the user's installed version when commands differ.

Mental model: what a "container" is

  1. Image -- immutable artifact: manifest, config, and layers (tar blobs addressed by digest). The same image produces the same filesystem root on any OCI-compliant host.
  2. Container -- an isolated process (or process tree) governed by:
    • Namespaces (PID, mount, network, UTS, IPC, user, cgroup) -- what it can see.
    • cgroups -- CPU, memory, IO, and PID limits.
    • Capabilities and seccomp -- which privileges and syscalls are allowed.
  3. Low-level runtime (typically runc or crun) unpacks the OCI bundle and execs the init process inside those namespaces.
  4. Higher-level daemon (Docker Engine, Podman, containerd) manages images, storage graphs, networking plugins, and the API surface you call.

Orchestrators (Kubernetes) talk to containerd (or CRI-O) via the CRI, not to Docker Engine directly.

Principles (tool-agnostic)

Images and supply chain

  • Pin bases by digest or immutable tag for reproducibility; latest is for local experiments, not production.
  • Separate build and runtime with multi-stage builds; ship only compiled artifacts and production dependencies.
  • Scan images in CI (Trivy, Grype, or equivalent) and fail on policy for critical CVEs in shipped layers.
  • Do not bake secrets into images; inject at runtime via env, files from an orchestrator, or a KMS.

Process and filesystem

  • Run as non-root when the workload allows; set USER after COPY with correct ownership.
  • Read-only root filesystem where possible; use tmpfs or writable volumes only where the application requires.
  • Minimize packages in the final stage; clean package caches in the same RUN layer as installs.

Networking

  • Prefer explicit publish (-p, ports:) over --network host unless host networking is genuinely required.
  • Service discovery in orchestration is DNS-based; verify name resolution and whether headless vs cluster IP services are needed.

Observability

  • One main process per container when possible -- PID 1 owns signal handling and graceful shutdown.
  • Health checks belong in the image (HEALTHCHECK) and in the orchestrator (liveness/readiness); align the endpoint with what "ready" actually means for the workload.

Layer caching

  • Order Dockerfile instructions from least often changing to most often changing.
  • Copy lockfiles before application source; run install before COPY ..

Workflows

Design or review an image

  1. Identify runtime vs build-time dependencies.
  2. Choose a base image (slim, alpine, distroless) balancing size, libc compatibility, and security update cadence.
  3. Sketch the multi-stage graph: builder, optional test stage, minimal runtime.
  4. Add a non-root user, health check, and metadata labels (org.opencontainers.image.*).
  5. Add .dockerignore / .containerignore.

See reference/dockerfile.md.

Debug a failing container

  1. Check ps or orchestrator events for exit code and restart policy.
  2. Read logs (runtime and application).
  3. inspect for env, mounts, network endpoints, and cgroup limits.
  4. exec into a running container, or run a debug sidecar sharing namespaces.

See reference/debugging.md.

Choose Docker vs Podman on a workstation

  • Daemonless operation, rootless by default, pods without Kubernetes, or systemd unit generation: favor Podman. See reference/podman.md.
  • Docker Compose v2 ecosystem, BuildKit cloud builders, or scripts that assume docker.sock: favor Docker. See reference/docker.md.

Operate on a Kubernetes node

Node images and pods run under containerd (typical) or CRI-O. Use crictl for CRI-level inspection and ctr for low-level containerd debugging. See reference/containerd.md and reference/runtimes-and-cri.md.

Checklist: production-grade container

  • Multi-stage build; no compilers or SCM tools in the final stage unless required.
  • Pinned base image version or digest.
  • Non-root user; minimal capability set at deploy time where supported.
  • .dockerignore / .containerignore prevents secrets and large context uploads.
  • Health check defined and matches real readiness.
  • CI pipeline: build, scan, sign (if policy requires), push with immutable tag.
  • CMD/ENTRYPOINT and expected env vars documented (no secrets as literals).

Additional resources

  • OCI distribution and image specs: opencontainers.org
  • This skill covers images, local container engines, and the CRI layer. For Kubernetes workload patterns (Deployments, Services, RBAC, etc.) use a cluster-focused skill.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.