بنقرة واحدة
deployment-correlation
// Correlate incidents with recent deployments and code changes. Use when investigating if a deployment caused an issue, finding what changed, or identifying the commit that introduced a bug.
// Correlate incidents with recent deployments and code changes. Use when investigating if a deployment caused an issue, finding what changed, or identifying the commit that introduced a bug.
AWS service troubleshooting patterns. Use for EC2, ECS, Lambda, CloudWatch, RDS issues.
Search and read Confluence documentation. Use when looking for internal docs, knowledge base articles, runbooks, or team documentation stored in Confluence.
PostgreSQL database inspection and queries. Use when investigating table schemas, running queries, checking locks, replication status, or long-running queries.
GitHub code search, file reading, PR review, branch/file management, and commit operations. Use when you need to search code patterns, read repository files, review pull requests, create branches, commit files, or open PRs.
Kubernetes debugging methodology and scripts. Use for pod crashes, CrashLoopBackOff, OOMKilled, deployment issues, resource problems, or container failures.
Jira issue tracking and project management. Use for creating, searching, updating, and commenting on Jira issues. Supports JQL queries for advanced searching.
| name | deployment-correlation |
| description | Correlate incidents with recent deployments and code changes. Use when investigating if a deployment caused an issue, finding what changed, or identifying the commit that introduced a bug. |
| allowed-tools | Bash(python *) |
Scripts use GITHUB_TOKEN from environment variables for GitHub API access. Set this in your .env file.
The first question in any incident investigation should be: "What deployed recently?"
All scripts are in .claude/skills/deployment-correlation/scripts/
python .claude/skills/deployment-correlation/scripts/list_commits.py --repo OWNER/REPO [--branch BRANCH] [--since TIMESTAMP] [--limit N]
# Examples:
python .claude/skills/deployment-correlation/scripts/list_commits.py --repo myorg/api --branch main --limit 20
python .claude/skills/deployment-correlation/scripts/list_commits.py --repo myorg/api --since "2026-01-27T00:00:00Z"
python .claude/skills/deployment-correlation/scripts/compare_commits.py --repo OWNER/REPO --base BASE --head HEAD
# Examples:
python .claude/skills/deployment-correlation/scripts/compare_commits.py --repo myorg/api --base v1.2.3 --head main
python .claude/skills/deployment-correlation/scripts/compare_commits.py --repo myorg/api --base abc123 --head def456
python .claude/skills/deployment-correlation/scripts/get_commit.py --repo OWNER/REPO --sha COMMIT_SHA
# Examples:
python .claude/skills/deployment-correlation/scripts/get_commit.py --repo myorg/api --sha abc1234
Find deployments around the incident time:
# List recent commits to production branch
python list_commits.py --repo org/repo --branch main --limit 20
Key questions:
Compare code changes around the incident time:
# Compare current state to previous known-good state
python compare_commits.py --repo org/repo --base v1.2.3 --head main
# Get specific commit details
python get_commit.py --repo org/repo --sha abc123
Look for:
Match code changes to observed symptoms.
Correlation checklist:
Timeline:
14:00 - Deploy completed
14:05 - Latency increases
14:10 - Alerts fire
Investigation:
1. list_commits.py --repo org/repo --branch main → Find 14:00 deploy
2. get_commit.py --repo org/repo --sha <sha> → See files changed
3. Look for: connection pool changes, timeout configs, new external calls
Symptom: "Service X throwing NullPointerException"
Investigation:
1. compare_commits.py --base last-good-deploy --head current → What changed?
2. Filter for changes to Service X files
3. get_commit.py on suspicious commits
Symptom: Memory usage creeping up over days
Investigation:
1. list_commits.py --since "7 days ago" → All recent changes
2. Look for: new caching, data structure changes, memory allocations
| Goal | Command |
|---|---|
| Recent commits | list_commits.py --repo X --branch main |
| Compare versions | compare_commits.py --repo X --base v1 --head v2 |
| Commit details | get_commit.py --repo X --sha abc123 |
| Time-filtered | list_commits.py --repo X --since "2026-01-27T00:00:00Z" |
## Deployment Correlation Summary
### Timeline
- **Incident start**: [timestamp]
- **Last successful deploy**: [timestamp, commit sha]
- **Previous deploy**: [timestamp, commit sha]
### Changes Since Last Known Good
- **Commits**: N commits
- **Files changed**: M files
- **Authors**: [list]
### Suspicious Changes
1. **[commit sha]** - [summary]
- Files: [list of changed files]
- Reason for suspicion: [why this might be related]
### Correlation Confidence
- **High**: Deploy clearly matches timeline and touches failing component
- **Medium**: Timeline matches but changes are indirect
- **Low**: No obvious correlation, consider other causes
### Recommended Actions
1. [If high confidence] Consider rollback to [commit sha]
2. [If medium] Investigate specific change
3. [If low] Look at infrastructure, dependencies, or external factors