Skip to content

chore: add Sentry triage and fix automation skills [skip size]#4870

Draft
andresmr wants to merge 8 commits into
developfrom
feature/sentry-autofix
Draft

chore: add Sentry triage and fix automation skills [skip size]#4870
andresmr wants to merge 8 commits into
developfrom
feature/sentry-autofix

Conversation

@andresmr
Copy link
Copy Markdown
Collaborator

@andresmr andresmr commented May 19, 2026

Summary

Adds two Claude Code skills that automate Sentry error triage and remediation for the dhis2-android-capture project.

The Sentry MCP plugin is not enabled at project level — each developer installs it locally in their own ~/.claude/settings.json. Both skills detect when the plugin is missing and guide the user through the local install.


/sentry-triage — Prioritized issue report

Fetches the top unresolved issues for the latest production release and scores each one on Impact (1–5) and Effort (1–5), producing a quadrant report:

Quadrant Condition Label
Q1 Impact ≥ 4, Effort ≤ 2 Fix ASAP
Q2 Impact ≥ 4, Effort ≥ 3 Plan carefully
Q3 Impact ≤ 3, Effort ≤ 2 Quick wins
Q4 Impact ≤ 3, Effort ≥ 3 Defer

How to use:

/sentry-triage

The report includes a ready-to-run /sentry-fix <issue-id> command for each issue.


/sentry-fix <issue-id> — Automated fix workflow

Given a Sentry issue ID (from the triage report or directly), the skill:

  1. Fetches the full event, stack trace, and breadcrumbs from Sentry
  2. Maps frames to source files using the project's package→path conventions
  3. Diagnoses the root cause and plans the fix
  4. Implements the fix following AGENTS.md guidelines (KMP placement, no RxJava in new code, ktlint style)
  5. Writes unit tests for the fixed path
  6. Runs ktlintFormat, ktlintCheck, and the relevant test task
  7. Creates a fix branch from the current branch (never from main/develop directly)
  8. Opens a PR targeting the branch where the skill was triggered, with:
    • Fixes <SENTRY-SHORT-ID> — triggers Sentry's GitHub auto-linking
    • A direct clickable link to the Sentry issue

How to use:

/sentry-fix DHIS2-ANDROID-CAPTURE-83MK

Installing the Sentry plugin locally

Add the following to ~/.claude/settings.json (user-level, not committed to the repo):

{
  "enabledPlugins": {
    "sentry@claude-plugins-official": true
  }
}

Or via /configExtensions → Plugins → Sentry.


Files changed

  • .claude/skills/sentry-triage/SKILL.md — triage skill definition
  • .claude/skills/sentry-fix/SKILL.md — fix skill definition

🤖 Generated with Claude Code

andresmr and others added 5 commits May 19, 2026 06:50
* Add `sentry-triage` skill to prioritize production issues based on impact and effort scoring.
* Add `sentry-fix` skill to automate root cause diagnosis, fix implementation, and unit testing for Sentry issues.
* Update `AGENTS.md` with documentation and guidelines for using the new Sentry-related workflows.
… PRs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… body

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@andresmr andresmr marked this pull request as draft May 19, 2026 10:16
andresmr and others added 3 commits May 19, 2026 12:20
…nstructions to skills

The sentry@claude-plugins-official plugin should be installed per-user
in ~/.claude/settings.json, not committed to the repo. Both skills now
detect when the plugin is missing and guide the user to install it locally.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…d AGENTS.md

Org slug, project slug, and Sentry subdomain are now resolved dynamically
at runtime via find_organizations + find_projects, keeping the skills
portable and free of org-specific identifiers in the repo.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@andresmr andresmr changed the title chore: add Sentry triage and fix automation skills chore: add Sentry triage and fix automation skills [skip size] May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants