sentry:investigate-errors - Investigate recent errors and exceptions in your Sentry projects
Synopsis
/investigate-errors [arguments]
Description
Investigate recent errors and exceptions in your Sentry projects to identify issues, patterns, and root causes.
Implementation
This command helps you quickly triage and investigate errors captured by Sentry across your projects.
Usage
/investigate-errors [project-name] [timeframe]
What This Command Does
Asks for the Sentry project name (or lists available projects)
Requests timeframe (e.g., last 24h, last 7d, custom)
Fetches recent error issues using Sentry MCP tools
Analyzes error patterns and trends
Provides insights on:
Most frequent errors
Recent error spikes
Affected users/sessions
Error distribution by release/environment
Stack traces and context
Suggests next steps for investigation
Prerequisites
Sentry MCP server must be installed and configured
OAuth authentication with Sentry must be completed
Access to the target Sentry project(s)
Example Interaction
User: /investigate-errors my-web-app 24h
Claude: Investigating errors in my-web-app for the last 24 hours...
## Error Investigation Report
### Overview
- **Total Issues**: 12 error issues
- **Total Events**: 347 error events
- **Affected Users**: 89 unique users
- **Time Range**: Last 24 hours
### Top Issues
1. **TypeError: Cannot read property 'id' of undefined**
- Events: 156
- Users: 45
- First Seen: 23h ago
- Last Seen: 12m ago
- Environment: production
- Release: v2.3.1
- Trend: Increasing (spike in last 6 hours)
2. **NetworkError: Failed to fetch user data**
- Events: 89
- Users: 23
- First Seen: 18h ago
- Last Seen: 1h ago
- Environment: production
- Release: v2.3.1
3. **ReferenceError: localStorage is not defined**
- Events: 67
- Users: 34
- First Seen: 22h ago
- Last Seen: 3h ago
- Environment: production, staging
### Key Patterns
- 45% of errors correlate with v2.3.1 deployment 23h ago
- TypeError spike began 6 hours after deployment
- NetworkError appears to be intermittent (API flakiness?)
- localStorage errors isolated to server-side rendering context
### Recommendations
1. **Immediate**: Investigate TypeError in v2.3.1 - likely regression in user data handling
2. **High Priority**: Check API stability for fetch failures
3. **Medium Priority**: Add server-side rendering guards for localStorage access
Would you like me to dive deeper into any specific error?
Arguments
project-name (optional): Sentry project slug
timeframe (optional): Time range (1h, 24h, 7d, 30d, or custom)
Tips
Start with shorter timeframes for faster investigation
Look for error spikes that correlate with deployments
Use error grouping to identify patterns
Check release and environment tags for correlation
1---2name: investigate-errors3description: Investigate recent errors and exceptions in your Sentry projects4---56# Investigate Recent Errors
78## Name
910sentry:investigate-errors - Investigate recent errors and exceptions in your Sentry projects
1112## Synopsis
1314```
15/investigate-errors [arguments]
16```
1718## Description
1920Investigate recent errors and exceptions in your Sentry projects to identify issues, patterns, and root causes.
2122## Implementation
2324This command helps you quickly triage and investigate errors captured by Sentry across your projects.
2526## Usage
2728```
29/investigate-errors [project-name] [timeframe]
30```
3132## What This Command Does
33341. Asks for the Sentry project name (or lists available projects)
352. Requests timeframe (e.g., last 24h, last 7d, custom)
363. Fetches recent error issues using Sentry MCP tools
374. Analyzes error patterns and trends
385. Provides insights on:
39 - Most frequent errors
40 - Recent error spikes
41 - Affected users/sessions
42 - Error distribution by release/environment
43 - Stack traces and context
446. Suggests next steps for investigation
4546## Prerequisites
4748- Sentry MCP server must be installed and configured
49- OAuth authentication with Sentry must be completed
50- Access to the target Sentry project(s)
5152## Example Interaction
5354```
55User: /investigate-errors my-web-app 24h
5657Claude: Investigating errors in my-web-app for the last 24 hours...
5859## Error Investigation Report
6061### Overview
62- **Total Issues**: 12 error issues
63- **Total Events**: 347 error events
64- **Affected Users**: 89 unique users
65- **Time Range**: Last 24 hours
6667### Top Issues
68691. **TypeError: Cannot read property 'id' of undefined**
70 - Events: 156
71 - Users: 45
72 - First Seen: 23h ago
73 - Last Seen: 12m ago
74 - Environment: production
75 - Release: v2.3.1
76 - Trend: Increasing (spike in last 6 hours)
77782. **NetworkError: Failed to fetch user data**
79 - Events: 89
80 - Users: 23
81 - First Seen: 18h ago
82 - Last Seen: 1h ago
83 - Environment: production
84 - Release: v2.3.1
85863. **ReferenceError: localStorage is not defined**
87 - Events: 67
88 - Users: 34
89 - First Seen: 22h ago
90 - Last Seen: 3h ago
91 - Environment: production, staging
9293### Key Patterns
9495- 45% of errors correlate with v2.3.1 deployment 23h ago
96- TypeError spike began 6 hours after deployment
97- NetworkError appears to be intermittent (API flakiness?)
98- localStorage errors isolated to server-side rendering context
99100### Recommendations
1011021. **Immediate**: Investigate TypeError in v2.3.1 - likely regression in user data handling
1032. **High Priority**: Check API stability for fetch failures
1043. **Medium Priority**: Add server-side rendering guards for localStorage access
105106Would you like me to dive deeper into any specific error?
107```
108109## Arguments
110111- `project-name` (optional): Sentry project slug
112- `timeframe` (optional): Time range (1h, 24h, 7d, 30d, or custom)
113114## Tips
115116- Start with shorter timeframes for faster investigation
117- Look for error spikes that correlate with deployments
118- Use error grouping to identify patterns
119- Check release and environment tags for correlation
120- Review stack traces for common code paths
121- Use Seer AI for automated root cause analysis
122123## Related Commands
124125- `/analyze-performance`: Investigate performance issues
126- `/check-releases`: Review recent release health
127- `/query-events`: Run custom Sentry queries
Run npx skillmds add thebushidocollective/investigate-errors in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Investigate recent errors and exceptions in your Sentry projects It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: makes network calls. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
thebushidocollective (@thebushidocollective) published this skill. Their other Agent Skills are listed on their SkillMD profile.