From Sentry Workflows
Find one Sentry issue you are confident you can fix in the current repository and open a draft pull request that fixes it. Use when the user says "fix something from Sentry", "find a Sentry issue to fix", "auto-fix a Sentry bug", or when invoked autonomously from a Claude routine. Requires the Sentry MCP and `gh` CLI to be available.
How this skill is triggered — by the user, by Claude, or both
Slash command
/sentry-workflows:fix-issueThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
End-to-end: pick one fixable Sentry issue, write the patch, push to a `claude/`-prefixed branch, and open a draft PR.
End-to-end: pick one fixable Sentry issue, write the patch, push to a claude/-prefixed branch, and open a draft PR.
The plugin already configured these via userConfig; read them from the environment as CLAUDE_PLUGIN_OPTION_*:
SENTRY_ORG_SLUG — requiredSENTRY_DEFAULT_PROJECT_SLUG — optional; if set, scope the issue search to itAuth is handled by the remote MCP at mcp.sentry.dev via OAuth — on first use Claude Code opens a browser to authorize. Do not prompt the user for tokens.
If the user passed $ARGUMENTS, treat it as a free-form Sentry query filter to append (e.g. "javascript stacktrace.module:checkout/").
gh auth status must succeed. If not, stop and tell the user to run gh auth login.git status must show a clean working tree. If dirty, stop and ask the user to stash.owner/repo via gh repo view --json nameWithOwner -q .nameWithOwner.Call the Sentry MCP search_issues tool with:
organizationSlug: SENTRY_ORG_SLUGprojectSlugOrId: SENTRY_DEFAULT_PROJECT_SLUG (omit if unset)query: is:unresolved is:unassigned has:stack sort:freq ${ARGUMENTS} — literal Sentry-syntax filter; append any user filterlimit: 10(search_issues accepts either a query field with literal Sentry syntax OR a naturalLanguageQuery field. Always pass query here — it works whether or not the server has an EMBEDDED_AGENT_PROVIDER configured.)
If the call fails with an auth error, tell the user: "The Sentry MCP isn't authorized. Re-run /plugin enable sentry-workflows and complete the browser OAuth flow when it opens." and stop.
For each candidate, spawn the issue-scorer agent (one Agent call per candidate, all in one assistant message so they run in parallel). Each scorer call gets:
get_sentry_resource result for the issue (so the agent sees the top stack frames and breadcrumbs without re-fetching). Pass the issue short_id as resourceId and SENTRY_ORG_SLUG as organizationSlug.Each scorer returns JSON {score: 1-5, fixable: bool, reasoning: string, suspected_files: string[]}.
Filter for fixable: true and score >= 4 AND at least one suspected_files entry that exists in the current repo (ls or test -f). If none qualify, post a one-paragraph summary explaining why each was skipped and exit cleanly. Never widen the criteria silently.
Hand off to the fix-implementer agent with:
suspected_files and reasoningclaude/sentry-fix-<issue-short-id-lowercased>owner/repoThe agent implements, runs the project's tests if it can identify them, commits, pushes, and opens a draft PR. The PR body must include:
https://sentry.io/organizations/<org>/issues/<short-id>/)Closes <issue-short-id> line (informational; Sentry's GitHub integration links it)Call the Sentry MCP update_issue tool to assign the issue to the whoami result (the authenticated user). Do not resolve the issue — wait for the PR to merge.
Print a one-line summary: <issue-short-id> → <PR URL> (branch: <branch>).
main, master, or any branch that does not start with claude/. Routines enforce this server-side; respect it locally too.git push --force or --no-verify.update_issue to assign. Resolution happens when the PR merges.suspected_files, abort and report — do not refactor broadly to make the fix work.If after step 3 every candidate scored 3 or below and the user invoked the skill with --use-seer in $ARGUMENTS, call analyze_issue_with_seer on the top-frequency issue, then re-run the scorer with Seer's suspected files added to the input. Seer takes 2–5 minutes; warn the user before calling it.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub jshchnz/sentry-workflows-plugin --plugin sentry-workflows