원클릭으로
investigate
Systematic root-cause debugging and incident investigation. No fixes without understanding the problem first.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Systematic root-cause debugging and incident investigation. No fixes without understanding the problem first.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
End-to-end pipeline to augment any repository for AI-assisted development. Installs opinionated engineering workflows, generates documentation, and configures Claude Code or Cursor.
Destructive command safety guardrails. Warns before dangerous operations in production and shared environments.
Transform a knowledge graph into a human-readable /docs folder with markdown documentation that both humans and agentic workflows can reference.
Architecture review before implementation. Walk through design, failure modes, scope, and test strategy before writing code.
Engineering retrospective and velocity analytics from git history. Generates weekly insights on team productivity, code quality, and contribution patterns.
Structured code and infrastructure PR review with evidence-based findings, auto-fix classification, and scope drift detection.
| name | investigate |
| version | 1.0.0 |
| description | Systematic root-cause debugging and incident investigation. No fixes without understanding the problem first. |
| author | iscmga |
| tags | ["debugging","investigation","incident","root-cause","troubleshooting"] |
| triggers | {"globs":[],"keywords":["investigate","debug","root cause","incident","troubleshoot","why is this broken","what went wrong"]} |
Systematic four-phase debugging methodology. The cardinal rule: NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST. Prevents superficial fixes that mask underlying problems. Inspired by gstack's investigate methodology.
Collect all available evidence before forming any hypothesis.
# Recent logs
aws logs tail /aws/ecs/<service> --since 1h --profile <profile>
# Service status
aws ecs describe-services --cluster <cluster> --services <service> --profile <profile>
# Recent deployments
aws ecs describe-task-definition --task-definition <task-def> --profile <profile>
# Health check status
aws elbv2 describe-target-health --target-group-arn <arn> --profile <profile>
# What changed?
git log --oneline -10
git diff HEAD~1
# Current state
terraform state list
terraform show <resource>
# Plan to see drift
terraform plan
# CloudTrail for recent API calls
aws cloudtrail lookup-events --lookup-attributes AttributeKey=ResourceName,AttributeValue=<resource> --profile <profile>
# Config changes
aws configservice get-resource-config-history --resource-type <type> --resource-id <id> --profile <profile>
Document every symptom:
SYMPTOMS:
1. [timestamp] <what was observed>
2. [timestamp] <error message or behavior>
3. [timestamp] <related observation>
TIMELINE:
- Last known good: <when it was last working>
- First failure: <when it was first noticed>
- What changed between: <deployments, config changes, etc.>
Categorize the symptoms against known failure patterns:
| Pattern | Symptoms | Common Cause |
|---|---|---|
| Deployment rollback | Tasks failing health checks, old task definition running | Bad container image, missing env vars, port mismatch |
| Terraform drift | Plan shows changes nobody made | Manual console changes, another pipeline, auto-scaling |
| Permission denied | 403/AccessDenied in logs | IAM policy change, SCP update, missing role trust |
| Network timeout | Connection refused, timeout errors | Security group change, NACL, route table, DNS |
| Resource exhaustion | OOM kills, disk full, CPU throttle | Undersized instances, missing limits, memory leak |
| State corruption | Terraform errors about existing resources | Concurrent applies, manual state edits, import issues |
| Certificate issues | TLS handshake failures, HTTPS errors | Expired cert, wrong domain, missing SAN |
| DNS propagation | Intermittent failures, some users affected | TTL, cached records, split-horizon issues |
Check if this matches a known prior incident:
For each plausible hypothesis:
HYPOTHESIS 1: Health check failing due to missing env var
TEST: Check task definition for required env vars
RESULT: CONFIRMED — DB_HOST is missing from latest task definition
HYPOTHESIS 2: Security group blocking port 8080
TEST: Check inbound rules on sg-xxxxx
RESULT: ELIMINATED — port 8080 is open from ALB security group
Stop investigating and escalate if:
Only after root cause is confirmed:
## Incident Report
**Summary:** <one-line description>
**Duration:** <first symptom> to <resolution>
**Impact:** <what was affected>
### Root Cause
<Detailed explanation of what went wrong and why>
### Timeline
- HH:MM — First symptom observed
- HH:MM — Investigation started
- HH:MM — Root cause identified
- HH:MM — Fix applied
- HH:MM — Verified resolved
### Fix Applied
- <file:line — what was changed>
- <commit hash>
### Prevention
- <What would prevent this from happening again>
- <Monitoring/alerting to add>
- <Process changes>
# Recent errors in CloudWatch
aws logs filter-log-events --log-group-name <group> --filter-pattern "ERROR" --start-time <epoch-ms>
# Resource configuration history
aws configservice get-resource-config-history --resource-type AWS::EC2::SecurityGroup --resource-id <id>
# Who did what (CloudTrail)
aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=<api-call>
# Show specific resource state
terraform state show <resource.name>
# Check for state lock
terraform force-unlock <lock-id> # only after confirming lock holder
# Import missing resource
terraform import <resource.name> <id>
# DNS resolution
dig +short <hostname>
nslookup <hostname>
# Port connectivity
nc -zv <host> <port>
# Route tracing
traceroute <host>
careful skillInvestigation should use careful mode to prevent accidental destructive actions while debugging production.
review skillPost-fix changes should go through review before merge.
retro skillInvestigation findings feed into retrospectives for process improvement.