code-agent
General-purpose coding agent that reads, writes, and edits code, and searches codebases.
Read-only Kubernetes incident triage using kubectl. Accepts natural language or structured input. Produces root-cause hypotheses, evidence, and next-step commands.
$ npx -y skills add initializ/forge --skill k8s-incident-triage --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/k8s-incident-triageContext preview
The summary Claude sees to decide when to auto-load this skill.
Read-only Kubernetes incident triage using kubectl. Accepts natural language or structured input. Produces root-cause hypotheses, evidence, and next-step commands.
name: k8s-incident-triage
category: sre
tags:
- kubernetes
- incident-response
- triage
- reliability
- observability
- kubectl
- oncall
- runbooks
description: Read-only Kubernetes incident triage using kubectl. Accepts natural language or structured input. Produces root-cause hypotheses, evidence, and next-step commands.
metadata:
forge:
requires:
bins:
- kubectl
env:
required: []
one_of: []
optional:
- KUBECONFIG
- K8S_API_DOMAIN
- DEFAULT_NAMESPACE
- TRIAGE_MAX_PODS
- TRIAGE_LOG_LINES
egress_domains:
- "$K8S_API_DOMAIN"
denied_tools:
- http_request
- web_searchPerforms read-only triage of Kubernetes workloads and namespaces using `kubectl`.
Supports:
This skill NEVER mutates cluster state.
---
This skill uses `cli_execute` with `kubectl` commands exclusively. NEVER use http_request or web_search to interact with Kubernetes. All cluster operations MUST go through kubectl via the cli_execute tool.
---
Diagnose unhealthy Kubernetes workloads, pods, or namespaces.
---
Input is a plain string.
Examples:
Behavior:
---
Input JSON schema:
{ "namespace": "payments-prod", "workload_kind": "deployment", "workload_name": "payments-api", "pod_name": null, "label_selector": null, "include_logs": true, "logs_tail_lines": 200, "include_previous_logs": true, "events_limit": 50, "include_node_diagnostics": true, "include_metrics": false, "output_format": "markdown" }
Rules:
---
Verify cluster access:
kubectl version --client kubectl cluster-info
If RBAC denies access:
---
Namespace scope:
kubectl get pods -n <ns> -o wide kubectl get deploy,sts,ds,job,cronjob -n <ns>
Workload scope:
kubectl get <kind> <name> -n <ns> kubectl rollout status <kind>/<name> -n <ns> --timeout=10s
Select pods in states:
Limit deep triage to `$TRIAGE_MAX_PODS` (default 5).
---
kubectl get events -n <ns> --sort-by=.lastTimestamp | tail -n <events_limit>
Look for:
---
For each selected pod:
kubectl describe pod <pod> -n <ns>
Capture:
If workload-level triage:
kubectl describe <kind> <name> -n <ns>
---
kubectl get nodes -o wide kubectl describe node <node>
Check for:
---
kubectl logs <pod> -n <ns> --all-containers --tail=<N>
If restart loops and include_previous_logs=true:
kubectl logs <pod> -n <ns> --previous --all-containers --tail=<N>
Rules:
---
If enabled:
kubectl top pods -n <ns> kubectl top node
Gracefully skip if metrics-server is unavailable.
---
Classify detected issues into:
For each issue provide:
---
Concise bullet summary.
For each:
Copy-paste kubectl commands.
---
This skill MUST:
---
This skill is designed to be invoked by:
It must:
Forge is the open-source runtime for Anthropic's Agent Skills standard — built for the agent that runs next to a service, in your environment, on infrastructure you already operate. Write a SKILL.md. Compile to a portable, hardened agent.
Repo: initializ/forge
General-purpose coding agent that reads, writes, and edits code, and searches codebases.