project-hami/hami/k8s-debug-gpu-pod
Claude Code and agent skill by project-hami/hami
- community
Checking that the SKILL.md file is still in the repository.
Use when pods are stuck in Pending, CrashLoopBackOff, or ImagePullBackOff state. Performs event-driven triage to quickly identify root cause, then deep-dives into scheduling failures, resource exhaustion, image pull errors, and crash loops.
Install
npx vskill@latest install project-hami/hami/k8s-debug-gpu-podSKILL.md
The same SKILL.md was published earlier as project-hami/hami/k8s-debug-gpu-pod.
Interaction
Collect the following from the user in a single exchange before starting diagnosis:
| Input | Required | Default | |
|---|---|---|---|
| Namespace | Yes | — | |
| Kubeconfig file path | No | ~/.kube/config | |
| Context name | No | current-context in the kubeconfig |
If the user provides a cluster name instead of a context, fuzzy-match it against available contexts in the kubeconfig and confirm the match.
The skill automatically discovers and diagnoses all unhealthy pods (Pending, CrashLoopBackOff, ImagePullBackOff, Error) in the namespace. No pod name is needed.
Command Convention
All kubectl commands use shorthand below. Actual execution must always include explicit flags:
Never rely on default kubeconfig or current-context.
Diagnostic Workflow
Step 1: Global Pod Overview
Get a full picture of all pod states in one command:
Categorize pods into:
- ✅ Running/Completed — healthy, skip
- 🟡 Pending — go to Step 3
- 🔴 CrashLoopBackOff/Error — go to Step 4
- 🔴 ImagePullBackOff/ErrImagePull — go to Step 5
- ⚠️ Other abnormal states — note for report
All unhealthy pods are diagnosed. No manual pod selection needed.
Step 2: Event Triage
Quick scan of recent warning events for immediate signal:
Use events to guide which deep-dive steps are most relevant. Common event→action mapping:
| Event Reason | Points to | |
|---|---|---|
FailedScheduling | Step 3 (Pending) | |
CrashLoopBackOff / BackOff | Step 4 (Crash) | |
ImagePullBackOff / ErrImagePull | Step 5 (Image) | |
OOMKilled | Step 4 (Crash) | |
FailedAttachVolume / FailedMount | PVC issue — note in report | |
Unhealthy | Probe misconfiguration — note in report | |
Evicted | Node pressure — note in report | |
NodeNotReady | Infrastructure issue — note in report |
Short-circuit rule: If events clearly point to a single root cause (e.g., all events areFailedSchedulingwith the same message), mark it as the confirmed primary cause but still scan remaining steps at reduced depth for additional findings.
Step 3: Pending Pod Root Cause Analysis
For each Pending pod:
Parse the Events and Conditions sections. Common causes:
| Event Message Pattern | Root Cause | Remediation | |
|---|---|---|---|
Insufficient cpu / Insufficient memory | Resource exhaustion | Reduce requests, scale cluster, or check quota (→ Step 6) | |
0/N nodes are available + taint | Taint/toleration mismatch | Add toleration or untaint node | |
0/N nodes are available + node selector | No matching nodes | Fix nodeSelector or add matching nodes | |
0/N nodes are available + affinity | Affinity rule unsatisfiable | Relax affinity rules | |
persistentvolumeclaim "X" not found | Missing PVC | Create PVC or fix claim name | |
pod has unbound immediate PersistentVolumeClaims | PVC not bound | Check StorageClass and PV availability | |
exceeded quota | Quota limit hit | → Step 6 |
Step 4: CrashLoopBackOff / Error Diagnosis
Only execute if Step 1 found pods in CrashLoopBackOff or Error state.
A. Termination reason:
| Termination Reason | Root Cause | Remediation | |
|---|---|---|---|
OOMKilled | Memory limit exceeded | Increase memory limits, profile usage | |
exitCode 1 | Application failure | Check logs, configs, secrets, dependencies | |
exitCode 137 | SIGKILL / OOM | Check node pressure and memory | |
exitCode 139 | Segfault | Debug binary compatibility | |
exitCode 143 | SIGTERM not handled | Review graceful shutdown |
B. Logs (current + previous):
C. Resource config:
D. Restart count:
High restart count (>5) combined with short uptime indicates persistent failure — check probes, dependencies, and startup ordering.
Step 5: ImagePullBackOff Diagnosis
Only execute if Step 1 found pods in ImagePullBackOff or ErrImagePull state.
A. Image reference:
B. Pull error from events:
| Error Pattern | Root Cause | Remediation | |
|---|---|---|---|
repository does not exist | Wrong image name/tag | Verify image name | |
unauthorized | Missing credentials | Fix imagePullSecrets | |
manifest unknown | Tag doesn't exist | Verify tag in registry | |
connection refused | Registry unreachable | Check network/DNS | |
x509: certificate | TLS issue | Fix CA trust chain |
C. imagePullSecrets check:
If empty and the image is from a private registry, this is likely the root cause.
Step 6: Resource Quota Check (Conditional)
Only execute if Step 3 indicates quota exhaustion or resource issues.
Analyze:
- Which resources are at or near limits (Used/Hard ratio > 80%)
- Whether the pending pod's requests would exceed remaining capacity
- Recommend: request quota increase or reduce pod resource requests
Optional — Resource allocation efficiency:
Flag:
- Requests >> actual usage → waste, can reduce to free quota
- No limits set → unbounded usage risk
- High requests with low limits → OOM risk
Step 7: Report
Generate a structured report:
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskill/k8s-debug-gpu-pod/SKILL.md
Popularity
- Repository stars
- 4,965
- Repository forks
- 874
- 7-day trend score
- 41
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/project-hami/hami/k8s-debug-gpu-pod)