/bretfisher-devops:k8s-podspec-profrom bretfisher-devops
Writes and reviews Kubernetes pod specs against Bret Fisher's hardened pod spec recommendations for security context, user namespaces, service account tokens, probes, resources, and graceful shutdown.
Ships in bretfisher-devops. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Every pod template you write or review meets the recommendations: the settings in pod.yaml, an exact copy of https://github.com/BretFisher/podspec/blob/main/pod.yaml. Read pod.yaml at the start of each task. Its field layout and its inline comments are the shape you copy, and the table below is the summary with the exceptions.
spec.template.spec.
CronJob: spec.jobTemplate.spec.template.spec. Pod: spec. A Job, CronJob, DaemonSet, StatefulSet,
Helm chart, or Kustomize base → read workload-kinds.md first.USER and EXPOSE, the health endpoints in the code, the
conventions of the repo's other manifests. Read them before you write a value.USER, a probe path the code does not show, a livenessProbe, a grace period other than 600. Ask for
them in one bundled question. When the user is unavailable or says to go ahead, write the pod.yaml
value with a # TODO: comment and list it under ## Placeholders.| Field | Value | Why, and the exception |
|---|---|---|
image | an immutable tag (semver, git SHA, build ID) or a digest | A moving tag (latest, stable, none) runs different code in two pods and breaks rollback. Keep the user's tag and add # TODO: pin to an immutable tag. Leave imagePullPolicy out: its defaults are correct. |
ports[].containerPort | the app's port, written in the spec | Many images have no EXPOSE. A batch container with no server gets no port. |
readinessProbe | on every long-running container; exec when there is no port | A rolling update and a Service wait for it. Jobs and CronJobs have neither, so they get no readinessProbe. |
livenessProbe | only for an app known to hang | A bad one restarts healthy pods. It never checks a dependency, because then a database outage restarts every pod. |
resources | requests.memory = limits.memory, requests.cpu set, no limits.cpu | Memory cannot be throttled, so the limit equals what the scheduler reserves. A CPU limit throttles on an idle node. This gives Burstable QoS; Guaranteed needs CPU and memory limits equal to requests on every container, so add limits.cpu = requests.cpu only when the user needs Guaranteed (static CPU manager). The pod.yaml numbers are placeholders. |
container securityContext | allowPrivilegeEscalation: false, privileged: false | Blocks setuid gain; a privileged container is host root. |
pod securityContext.seccompProfile | type: RuntimeDefault | Kubernetes runs Unconfined unless asked. |
pod securityContext user | runAsNonRoot: true; runAsUser and runAsGroup: 1001 unless the image sets a numeric non-root USER | A named USER (USER node) with runAsNonRoot fails with CreateContainerConfigError; set runAsUser or tell the user to make USER numeric. Keep UIDs below 65536. |
hostUsers | false | Container root maps to an unused host UID. GA in 1.36, on by default since 1.33. A pod with hostNetwork, hostPID, or hostIPC keeps the host user namespace: leave hostUsers out and say why. Name the node requirements in the hand-back. |
automountServiceAccountToken | false | Most apps never call the API. An app that does (operator, controller, CI runner) gets true, its own serviceAccountName, and minimal RBAC. |
enableServiceLinks | false | Service env vars clash with the app's own. Tell the user to search the app for _SERVICE_HOST, _SERVICE_PORT, and _PORT_ and use DNS names. |
terminationGracePeriodSeconds | 600 | The 30s default cuts long polls, uploads, and queue drains. It is a maximum: an app that exits early does not wait. |
appArmorProfile | unset, as the commented block in pod.yaml | Setting it stops pods on SELinux nodes. Uncomment it only when every node runs AppArmor; Unconfined is a finding. |
The node requirements, the token alternatives, and the full reasons are in why.md: read it when the user asks why, or when an exception in the table applies.
A manifest you write keeps the pod.yaml style: one short inline # comment on each recommended field that says
why it is there. The comments are how the user's team learns the recommendations, so they stay in the output.
When the user asks you to review, audit, or check a manifest for production, run scripts/hardening-check.py
on it (or on helm template / kustomize build output piped to -) and write the report under these
three ## headings, in this order:
## Meets the recommendations: the recommended fields already set.## Missing or wrong: one entry per finding with the field, its location, the fixed YAML, and one
sentence on why. Cite the script's rule id. Add what the script cannot see: a probe that checks a
dependency, numbers that look copied from pod.yaml.## Suggested: readOnlyRootFilesystem: true, capabilities.drop: [ALL], a startupProbe for a slow
boot, a PodDisruptionBudget, a NetworkPolicy. One line each.Change the manifest only when the user asks for fixes, because a review is a report.
End every create or edit task with these three ## sections, in this order:
## Defaults applied: a | Default | Why here | table, one row per recommended field you set.## Questions: the decisions from working style step 3 that are still open, numbered. Write none
when there are none.## Placeholders: every # TODO: value with its field. Write none when there are none.Run scripts/hardening-check.py <file>... on every manifest you wrote or edited. It prints one line per
finding with a rule id and ends with hardening-check: clean or the finding count. Fix each finding, or
keep it and say why in the hand-back (a CPU limit for Guaranteed QoS, a token for an operator). When
kubeconform is installed, also run kubeconform -strict -summary <file> for schema errors. A tool that
is absent: say so by name and offer the brew install command.
For fields newer than your training data, the k8s-catch-up skill has one file per feature.
hardening-check.py is clean on every manifest you wrote or edited, or each remaining rule id is
named in the hand-back with its reason## Defaults applied, ## Questions, and ## PlaceholdersWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
kubernetes, pod-spec, hardening, security-context, helm, kustomize
npx claudepluginhub bretfisher/skills --plugin bretfisher-devops6 skills in this plugin
/docker-proCreate, edit, and modernize Dockerfiles, .dockerignore, Docker Bake files, and Compose files using Bret Fisher's strongly opinionated modern Docker + BuildKit rules. Use this skill whenever the user asks about a Dockerfile, containerizing or "dockerizing" an app, base image choice, digest/SHA pinning of image tags, multi-stage builds, BuildKit, build caching or secrets, .dockerignore, docker-bake.hcl / `docker buildx bake`, hardened or distroless images (Chainguard, Docker Hardened Images / DHI), a compose.yaml / docker-compose file, or local dev environments with Compose — even for a small change to any of these files./gha-auditAudit the GitHub Actions workflows in this repo for security, speed, and correctness, and report findings with a proposed diff./github-actions-workflow-proCreate, edit, audit, and speed up GitHub Actions workflows using Bret Fisher's opinionated DevOps rules. Use it when the user asks to create a workflow or CI/CD pipeline, edit or add a job to an existing `.github/workflows/*` file (even a one-line change), review or harden a workflow for security, speed up slow CI, publish a container image from CI, automate releases, or mentions GHA, action pinning, or findings from gasa, zizmor, poutine, pinact, or actionlint, even if they don't say "GitHub Actions"./k8s-catch-upKubernetes features that reached beta or GA in v1.35 to v1.37 (Dec 2025 to Aug 2026), newer than most models' training data. Use it whenever the user writes Kubernetes manifests or Helm templates, runs kubectl, configures the kubelet, scheduler, or API server, works with DRA, autoscaling, storage, or admission, or asks what a recent Kubernetes version can do, even without naming a version. Also use it to update or extend this skill./super-lintingSet up local development linting by picking the right linters for each file type a project uses, then recording them as required pre-commit checks in AGENTS.md / CLAUDE.md and a `make lint` target. Uses the linters the super-linter project runs for each language, with local install and run commands for every one. Use this skill whenever the user wants to add, choose, configure, or standardize linters for local development; asks "what linter should I use for X"; wants the agent to lint files before committing; sets up AGENTS.md/CLAUDE.md linting rules; or mentions super-linter, linting setup, pre-commit linting, or keeping linters up to date. This is for LOCAL developer/agent linting, not for authoring CI workflows.Other plugins' skills for the same job