ワンクリックで
fix-sentry-issue
// Investigates the most actionable open Sentry issue for force-production, locates the root cause in source code, and opens a fix PR. Use when asked to look at Sentry, fix a Sentry issue, or investigate production errors.
// Investigates the most actionable open Sentry issue for force-production, locates the root cause in source code, and opens a fix PR. Use when asked to look at Sentry, fix a Sentry issue, or investigate production errors.
Fully wires up a new route with required boilerplate, following this repo's conventions for subapps. Use when user wants to add a new route or app or subapp or page or screen.
Play a system beep. Use when asked to beep, play a beep, issue a system beep etc.
| name | fix-sentry-issue |
| description | Investigates the most actionable open Sentry issue for force-production, locates the root cause in source code, and opens a fix PR. Use when asked to look at Sentry, fix a Sentry issue, or investigate production errors. |
You need the Sentry MCP server connected to Claude Code. Run this once:
claude mcp add --transport http sentry https://mcp.sentry.dev/mcp
Then authenticate when prompted.
Sentry org: artsynet — project: force-production
Before doing anything else, verify the Sentry MCP tools are accessible by attempting to call mcp__sentry__whoami. If the call fails or the tool is not available, stop immediately and tell the user:
The Sentry MCP server is not connected. Use
/mcpto reconnect it, or runclaude mcp add --transport http sentry https://mcp.sentry.dev/mcpif it hasn't been added yet. Then start a new session and try again.
Do not attempt to work around this using the REST API, environment variables, or subagents.
Use this checklist to track progress:
Query mcp__sentry__search_issues with:
organizationSlug: artsynetprojectSlugOrId: force-productionquery: is:unresolvedsort: freqPick the issue that best matches all of these criteria. The best candidate will match most of them:
src/ (TypeScript filenames, not minified bundle references); issues where every frame is inside react-dom or node_modules are usually not fixable hereremoveChild / hydration crashes on routes other than a known-bad one are often caused by users running old cached JS with no source maps; these don't have a code fixIf a specific issue ID was provided by the user, skip this step and use that instead.
Present the chosen issue (title, event count, Sentry URL) and use AskUserQuestion to ask whether to proceed with it or pick the next candidate. This prevents the skill from duplicating work when a fix is already in flight but not yet merged.
mcp__sentry__get_sentry_resource on the issue URL to get full details including the stack tracemcp__sentry__search_events or mcp__sentry__search_issue_events — prefer events where the stack trace resolves to TypeScript filenames (source maps present)src/) — that is the bug site, not the deepest React internals frameCommon patterns seen in this codebase:
dispatch / setState inside a render prop callback (e.g., SystemQueryRenderer's render prop runs during React's render phase — any state update there causes hydration crashes)return.toString() or similar on a value that can be undefined at runtimeUse the file path and line number from the stack trace to read the relevant source files. Understand:
git checkout -b <your-name>/fix/<short-description>mainRun all three checks and fix any issues before committing:
yarn type-check
yarn jest $(git ls-files --modified --others --exclude-standard)
yarn lint $(git ls-files --modified --others --exclude-standard)
Open a PR with:
fix: ...)https://artsynet.sentry.io/issues/FORCE-PRODUCTION-XXXX) and noting whether this fully fixes or only reduces the issueIMPORTANT — do not auto-resolve the Sentry issue prematurely. Never use
Fixes FORCE-PRODUCTION-XXXXorCloses FORCE-PRODUCTION-XXXXin a commit message. Sentry's GitHub integration treats these as trigger keywords and will resolve the issue immediately when the branch is pushed — before the fix is deployed. Reference the Sentry issue only as a URL in the PR body, never as a keyword in a commit message.
Indicate you are done with a /beep