production-debugging
БесплатноБез исполняемых скриптовНе проверенDebug production issues in Kubernetes clusters. Use this skill when investigating 500 errors, missing functionality, silent failures, or service integration…
от mjunaidca★ 27 звёзд на GitHubОб этом скилле
Production Debugging
Systematic approach to debugging production issues in Kubernetes microservice environments.
When to Use
- Investigating HTTP 500 errors
- Debugging missing functionality (feature works locally, fails in production)
- Tracing requests across microservices
- Finding silent failures (no error, but wrong behavior)
- Service-to-service integration issues
Debugging Methodology
Step 1: Reproduce and Identify Symptoms
# What's the user seeing?
# - HTTP 500 error on /workers page
# - No reminder notifications
# - Data saved but logs show errors
# Document the symptom precisely before diving in
Step 2: Check Logs Systematically
# Start with the failing service
kubectl logs deploy/<service-name> -n <namespace> --tail=100
# Filter for errors
kubectl logs deploy/<service-name> -n <namespace> --tail=200 | grep -i -E "(error|exception|fail|warn)"
# Check specific container in multi-container pod
kubectl logs deploy/<service-name> -n <namespace> -c <container-name> --tail=100
# Common containers:
# - main app container (e.g., "api", "web")
# - daprd (Dapr sidecar)
# - init containers (e.g., "wait-for-db")
Step 3: Trace the Request Path
For microservice issues, trace the full request path:
# 1. Frontend → API
kubectl logs deploy/web-dashboard -n taskflow --tail=50
# 2. API processing
kubectl logs deploy/taskflow-api -n taskflow --tail=100 | grep -i "endpoint-name"
# 3. API → External service (e.g., Dapr, SSO)
kubectl logs deploy/taskflow-api -n taskflow -c daprd --tail=50
# 4. Downstream service
kubectl logs deploy/notification-service -n taskflow --tail=50
Step 4: Analyze the Error
Common patterns to look for:
| Error Pattern | Likely Cause |
|---|---|
AttributeError: 'X' has no attribute 'Y' |
Model/schema mismatch |
404 Not Found on internal call |
Wrong endpoint URL |
greenlet_spawn has not been called |
Async SQLAlchemy pattern issue |
event_type: None |
Message format/unwrapping issue |
| Times off by hours | Timezone handling bug |
Quick Commands
Check All Services Status
kubectl get pods -n taskflow
kubectl get pods -n taskflow -o wide # With node info
Check Service Logs
# Main app logs
kubectl logs deploy/taskflow-api -n taskflow --tail=100
# Dapr sidecar logs
kubectl logs deploy/taskflow-api -n taskflow -c daprd --tail=100
# Follow logs in real-time
kubectl logs deploy/taskflow-api -n taskflow -f
# Logs from specific time
kubectl logs deploy/taskflow-api -n taskflow --since=5m
Check Pod Events
kubectl describe pod <pod-name> -n taskflow
kubectl get events -n taskflow --sort-by='.lastTimestamp'
Execute Commands in Pod
# Shell into pod
kubectl exec -it deploy/taskflow-api -n taskflow -- /bin/sh
# Run specific command
kubectl exec deploy/taskflow-api -n taskflow -- env | grep DATABASE
Common Bug Patterns
1. Model/Schema Mismatch
Symptom: AttributeError: 'Model' has no attribute 'field'
Debug:
# Find the error
kubectl logs deploy/taskflow-api -n taskflow --tail=100 | grep -i "attribute"
# Check the model definition
grep -r "class Worker" apps/api/src/
Fix: Ensure code references match actual model fields.
2. Wrong Endpoint URL
Symptom: 404 Not Found on internal service calls
Debug:
# Check what URL is being called
kubectl logs deploy/taskflow-api -n taskflow -c daprd --tail=100 | grep "404"
# Check what endpoints exist
kubectl exec deploy/taskflow-api -n taskflow -- curl localhost:8000/openapi.json | jq '.paths | keys'
Fix: Match the callback URL to what the service exposes.
3. Timezone Bugs
Symptom: Scheduled jobs fire at wrong times (hours off)
Debug:
# Check when job was scheduled vs when it should fire
kubectl logs deploy/taskflow-api -n taskflow | grep -i "scheduled"
# Compare times
# If local time 23:00 but scheduled for 23:00 UTC → timezone bug
Fix: Convert to UTC before storing/scheduling.
4. Message Format Issues
Symptom: Handler receives data but can't find expected fields
Debug:
# Add logging to see raw message
kubectl logs deploy/notification-service -n taskflow | grep -i "raw"
# Check message structure
# CloudEvent wraps payload in "data" field
Fix: Unwrap CloudEvent: event = raw.get("data", raw)
5. Async SQLAlchemy Errors
Symptom: greenlet_spawn has not been called
Debug:
# Find the line that crashes
kubectl logs deploy/notification-service -n taskflow | grep -A 20 "greenlet"
Fix: Add await session.refresh(obj) after commit before accessing attributes.
Debugging Dapr Specifically
Check Dapr Sidecar
# Dapr scheduler connection
kubectl logs deploy/taskflow-api -n taskflow -c daprd | grep -i "scheduler"
# Dapr API calls
kubectl logs deploy/taskflow-api -n taskflow -c daprd | grep "HTTP API Called
Установить production-debugging в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл production-debugging?
Debug production issues in Kubernetes clusters. Use this skill when investigating 500 errors, missing functionality, silent failures, or service integration issues. Covers systematic log analysis, tracing requests across microservices, and common bug patterns.
Как установить скилл production-debugging?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл production-debugging запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic