mcpField
I
investigate-incident

investigate-incident

github.com/revitalb-portCloud & DevOps054 installsUpdated 10w ago
Repository

About investigate-incident

A root-cause analysis skill that uses Port service catalog data to investigate production incidents. It builds a timeline, correlates changes and dependencies, checks historical incidents, and records findings.

Key features

  1. 01Build timelines from deployments and PRs
  2. 02Correlate incidents with changes and events
  3. 03Check service dependencies and health
  4. 04Compare with historical incidents
  5. 05Record findings in the incident

Use cases

  1. 01Investigating a triaged production incident
  2. 02Tracing an issue to a recent deployment
  3. 03Comparing an incident with past patterns

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/revitalb-port/skills-registry-demo --skill investigate-incident

After installing, type/investigate-incidentin Claude Code to confirm it loaded.

Details

From the project README

Investigate Incident Skill

Perform systematic root cause analysis using Port's service catalog data.

When to Use

  • Incident has been triaged and needs investigation
  • Finding root cause of production issues
  • Correlating deployments with incidents

Investigation Process

Step 1: Timeline Construction

Query Port to build a timeline:

  1. Recent deployments (last 24h):

    list_entities(blueprint="deployment", query={
      service: "affected-service",
      deployed_at: ">24h ago"
    })
    
  2. Recent PRs merged:

    list_entities(blueprint="pull_request", query={
      service: "affected-service",
      merged_at: ">24h ago"
    })
    
  3. Config changes (if tracked):

    list_entities(blueprint="config_change", query={
      service: "affected-service"
    })
    
Step 2: Correlation Analysis

Check if incident timing correlates with:

  • Deploy time (most common cause)
  • Traffic spike
  • Dependency failure
  • Config change
Step 3: Dependency Check

Query service dependencies:

get_entity(blueprint="service", identifier="affected-service", include=["depends_on"])

For each dependency, check:

  • Health status
  • Recent incidents
  • Error rates
Step 4: Historical Pattern Matching

Find similar past incidents:

list_entities(blueprint="incident", query={
  primary_service: "affected-service",
  created_at: "<30d"
})

Look for:

  • Same error patterns
  • Same time of day
  • Same trigger conditions
Step 5: Root Cause Determination

Document:

  1. What changed: The specific change that caused the issue
  2. Why it failed: The mechanism of failure
  3. Why it wasn't caught: Gap in testing/review
Step 6: Update Incident

Call update_incident_investigation with:

  • root_cause_summary
  • related_deployment (if applicable)
  • related_pr (if applicable)
  • timeline_markdown
  • investigation_notes

Output Format

# Root Cause Analysis: [Incident ID]

## Summary
[One paragraph explanation]

## Timeline
| Time | Event |
|------|-------|
| 14:15 | PR #123 merged |
| 14:20 | Deployment v2.3.4 completed |
| 14:23 | First error alerts |

## Root Cause
[Detailed technical explanation]

## Related Changes
- PR: #123 - "Add currency field"
- Deployment: v2.3.4

## Recommendations
1. [Specific actionable item]
2. [Specific actionable item]

Quality Checklist

  • Built complete timeline
  • Checked all recent deployments
  • Analyzed dependencies
  • Found correlated change
  • Documented root cause clearly

Comments

Markdown supported