sentry-fix

GitHub

自动修复Sentry报错,支持Rust后端与React前端。流程涵盖上下文分析、根因确认、代码修复、回归测试及PR创建,确保问题闭环解决。

.claude/skills/sentry-fix/SKILL.md different-ai-studio/teamclu

Trigger Scenarios

用户希望修复Sentry问题 根据Sentry错误自动修复Bug 为Sentry错误创建修复PR

Install

npx skills add different-ai-studio/teamclu --skill sentry-fix -g -y
More Options

Non-standard path

npx skills add https://github.com/different-ai-studio/teamclu/tree/main/.claude/skills/sentry-fix -g -y

Use without installing

npx skills use different-ai-studio/teamclu@sentry-fix

指定 Agent (Claude Code)

npx skills add different-ai-studio/teamclu --skill sentry-fix -a claude-code -g -y

安装 repo 全部 skill

npx skills add different-ai-studio/teamclu --all -g -y

预览 repo 内 skill

npx skills add different-ai-studio/teamclu --list

SKILL.md

Frontmatter
{
    "name": "sentry-fix",
    "description": "Use when the user wants to fix a Sentry issue, auto-repair a bug from Sentry, or create a fix PR for a Sentry error. Triggers on \"修复 sentry\", \"fix sentry issue\", \"sentry 修复\", \"sentry fix\"."
}

Sentry Fix — Auto-Fix Issue with Test and PR

Fix a specific Sentry issue: gather context, confirm with user, implement fix, write regression test, verify, and create PR.

Arguments

  • <ISSUE-ID> (required): Sentry issue short ID, e.g., TEAMCLU-3 or TEAMCLU-REACT-2G

The issue ID is passed as the skill argument. Example: /sentry-fix TEAMCLU-3

Projects

Project Sentry Slug Platform Test Command Lint Command
Rust backend ucar-inc/teamclu Rust cargo test --manifest-path src-tauri/Cargo.toml cargo clippy --manifest-path src-tauri/Cargo.toml -- -D warnings
React frontend ucar-inc/teamclu-react React pnpm test:unit pnpm typecheck && pnpm lint

Determine which project based on the issue ID prefix:

  • TEAMCLU-<suffix> (no "REACT") → Rust backend
  • TEAMCLU-REACT-<suffix> → React frontend

Execution Steps

Phase 1: Gather Context

  1. Fetch issue details with stack trace:
sentry issue view <ISSUE-ID> --json
  1. From the stack trace and error message, identify the relevant source files and functions in the codebase.

  2. Read those source files to understand the code context around the crash/error site.

  3. Perform local root cause analysis based on the stack trace + source code. Produce a clear root cause summary.

If the stack trace is insufficient to identify the root cause: Stop and ask the user for additional context about the issue before proceeding. Do NOT guess.

Phase 2: Confirm with User

Present a fix plan to the user in the terminal. The plan MUST include:

  1. Root cause — one-paragraph summary from local analysis
  2. Files to modify — exact file paths and what changes in each
  3. Proposed fix — description of the code changes
  4. Regression test plan — what test will be added and what it verifies
  5. Verification commands — which commands will be run to validate

STOP HERE and wait for user confirmation. Do NOT proceed until the user says yes.

Phase 3: Implement Fix

  1. Create a new branch from current HEAD:
git checkout -b sentry-fix/<issue-id-lowercase>

Example: sentry-fix/teamclu-3 or sentry-fix/teamclu-react-2g

  1. Implement the fix:

    • Follow existing code patterns and style
    • Only modify files directly related to the issue
    • No gratuitous refactoring
  2. Write a regression test:

    • Rust issues: Add #[test] in the relevant module's test section, or create a test file in the same directory. The test must reproduce the scenario that caused the original error.
    • React issues: Add a vitest test in the corresponding .test.ts or .test.tsx file (create one if none exists, following existing test file patterns in the codebase). The test must verify the fix prevents the original error.

Phase 4: Verify

Run the verification suite for the relevant platform:

Rust backend:

cargo clippy --manifest-path src-tauri/Cargo.toml -- -D warnings

React frontend:

pnpm test:unit && pnpm typecheck && pnpm lint

If verification fails:

  1. Read the error output
  2. Fix the issue
  3. Re-run verification
  4. Maximum 2 retry rounds. If still failing after 2 retries, stop and report the failure to the user.

Phase 5: Submit

  1. Stage and commit:
git add <changed-files>
git commit -m "fix(<scope>): <description> (Sentry <ISSUE-ID>)"

Where <scope> is the module/component name (e.g., rag, p2p, settings, editor).

  1. Push the branch:
git push -u origin sentry-fix/<issue-id-lowercase>
  1. Create the PR:
gh pr create --title "fix(<scope>): <short description>" --body "$(cat <<'PREOF'
## Sentry Issue

Fixes [<ISSUE-ID>](<sentry-issue-permalink>)

## Root Cause

<root cause summary from local analysis>

## Fix

<description of code changes>

## Test Coverage

<description of regression test added>

## Verification

- [ ] cargo clippy / pnpm lint passes
- [ ] Tests pass including new regression test
PREOF
)"
  1. Print the PR URL for the user.

Constraints

  • NEVER modify code before user confirms the fix plan (Phase 2)
  • NEVER modify files unrelated to the issue
  • ALWAYS write a regression test — no exceptions
  • If sentry CLI is not authenticated, prompt the user to run sentry auth login
  • If gh CLI is not authenticated, prompt the user to run gh auth login

Version History

  • 12cfa21 Current 2026-08-19 21:32

    将Sentry技能指向重命名后的项目(teamclaw改为teamclu)

  • a93ca1d 2026-07-24 21:03

Same Skill Collection

.claude/skills/sentry-monitor/SKILL.md

Metadata

Files
0
Version
12cfa21
Hash
65992652
Indexed
2026-07-24 21:03

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-27 02:14
浙ICP备14020137号-1 $Carte des visiteurs$