agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when deploying to or debugging Kubernetes. Covers workload configuration, resource requests and limits, probes, rollout strategy, networking, and the failure modes that produce CrashLoopBackOff and OOMKilled.
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill kubernetes --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/kubernetesContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when deploying to or debugging Kubernetes. Covers workload configuration, resource requests and limits, probes, rollout strategy, networking, and the failure modes that produce CrashLoopBackOff and OOMKilled.
name: kubernetes description: Use when deploying to or debugging Kubernetes. Covers workload configuration, resource requests and limits, probes, rollout strategy, networking, and the failure modes that produce CrashLoopBackOff and OOMKilled. metadata: category: devops version: 1.0.0 tags: [kubernetes, k8s, containers, deployment, debugging]
Deploy workloads that survive node failures, scale predictably, and fail visibly. Most Kubernetes incidents trace back to three things: wrong resource limits, wrong probes, and a rollout that had no way to be judged healthy.
1. **Set requests and limits deliberately** — Requests determine scheduling; limits determine throttling and killing. A pod with no requests is scheduled anywhere and evicted first. 2. **Configure the three probes distinctly** — Startup probe protects a slow boot. Readiness controls traffic. Liveness restarts a hung process. Conflating them causes a slow-starting pod to be killed forever. 3. **Handle SIGTERM** — Kubernetes sends SIGTERM, waits `terminationGracePeriodSeconds`, then SIGKILL. A process that ignores SIGTERM drops in-flight requests on every deploy. 4. **Protect the rollout** — `maxUnavailable`, `maxSurge`, and a `PodDisruptionBudget` so a node drain cannot take the last replica. 5. **Debug from the events** — `kubectl describe pod` before `kubectl logs`. The reason is usually in the events, not the application output.
**A Deployment with correct probes and graceful shutdown:**
apiVersion: apps/v1
kind: Deployment
metadata:
name: orders-api
spec:
replicas: 3
strategy:
rollingUpdate: { maxSurge: 1, maxUnavailable: 0 } # never dip below capacity
template:
spec:
terminationGracePeriodSeconds: 45 # > the longest in-flight request
containers:
- name: api
image: registry.example.com/orders-api@sha256:9f2c... # immutable
resources:
requests: { cpu: 250m, memory: 512Mi } # scheduling
limits: { memory: 1Gi } # OOM ceiling; no CPU limit
startupProbe: # allows up to 60s to boot
httpGet: { path: /healthz, port: 8080 }
failureThreshold: 30
periodSeconds: 2
readinessProbe: # gates traffic; checks deps
httpGet: { path: /readyz, port: 8080 }
periodSeconds: 5
livenessProbe: # restarts a hung process only
httpGet: { path: /healthz, port: 8080 }
periodSeconds: 10
failureThreshold: 3
lifecycle:
preStop:
exec:
command: ["sleep", "10"] # let the LB deregister first
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: orders-api
spec:
minAvailable: 2
selector:
matchLabels: { app: orders-api }**Diagnosing the standard failures:**
kubectl describe pod orders-api-7d4f -n prod | sed -n '/Events/,$p' # OOMKilled -> memory limit too low, or a leak. Check actual usage, then raise or fix. # CrashLoopBackOff-> read the previous container's logs: kubectl logs --previous # ImagePullBackOff-> registry auth or a tag that does not exist # Pending -> no node satisfies the requests; check `kubectl describe node`
A curated library of 137 production-grade skills for Claude and other AI coding agents. Every skill follows one structure, speaks with one voice, and earns its place by changing what the agent does.
Repo: nimadorostkar/Claude-Skills-collection
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory, structuring notes for retrieval, and…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should not be trusted to remember,…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling, versioning, testing, and…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive disclosure, and the difference between a…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base model, and measuring whether the…