agentleFS
different-ai-studiodifferent-ai-studio/teamclaw/.claude/skills/sentry-monitor/SKILL.md

sentry-monitor

Skill128 starsChanged 2 months agoMITView on GitHub

Use when the user wants to check Sentry issues, run a Sentry daily report, or monitor error trends. Triggers on "sentry 监控", "sentry 日报", "查看 sentry", "sentry report", "sentry monitor".

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. link2004/skills★ 17same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository4 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 7 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never report "全部正常" without clearing this check.

    line 36
  2. Very specific:

    Read the accepted and rate_limited series:

    line 42
  3. Distinctive:

    Run these in parallel, one per project:

    line 53
  4. Very specific:

    Use --period for the time window (24h / 48h / 14d), not a lastSeen: clause.

    line 62
  5. Distinctive:

    If no issues match and step 0 was clean, skip to step 4 with the "全部正常" message.

    line 74
  6. Distinctive:

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

    line 91
  7. Very specific:

    Prefer a sourcemapped frame: When several groups share a value, analyze the one whose culprit is a repo path (/src/...) rather than a …

    line 101
  8. Very specific:

    When there are more than ~4 issues to analyze, run them as parallel subagents via the Agent tool.

    line 105
  9. Distinctive:

    If analysis cannot determine a root cause, use the error title as-is and say the root cause is undetermined.

    line 110
  10. Distinctive:

    If no fatal/high issues exist anywhere and the quota gate was clean:

    line 156
  11. Distinctive:

    Do not attempt to fix issues.

    line 170
  12. Very specific:

    If sentry CLI is not authenticated, prompt the user to run sentry auth login.

    line 171
  13. Very specific:

    Never pipe a sentry command through tail/head when you care about success — the pipeline's exit code is the pager's, so a failed call reads …

    line 172

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Sentry Monitor — Daily Issue Report

Scan the TeamClu Sentry projects for unresolved fatal/high issues, analyze root causes, and report.

Projects

ProjectSentry SlugPlatform
Web / desktop frontenducar-inc/teamclu-reactJavaScript React
Desktop Rust processucar-inc/teamclu-rustRust
iOSucar-inc/teamclu-iosapple-ios
Expoucar-inc/teamclu-exporeact-native

ucar-inc/teamclu (the old Rust slug) does not exist — it was deleted, and sentry issue list 404s on it. teamclu-rust replaced it on 2026-09-04, so that project has no history before then; an empty result there is expected for a while rather than a signal. Re-verify with sentry project list ucar-inc/ --json if a scan errors on an unknown project.

Execution Steps

0. Quota gate — do this FIRST

The org is on Sentry's free tier: 5,000 errors/month, onDemandMaxSpend = 0, billing period resetting on the 19th. When the quota runs out Sentry drops every incoming event silently — from the issue list that looks identical to "no new errors." This has already happened twice (2026-08-17 and 2026-09-02), and the second time the projects sat blind for over two weeks.

Never report "全部正常" without clearing this check.

sentry api "/organizations/ucar-inc/stats_v2/?field=sum(quantity)&groupBy=outcome&category=error&statsPeriod=7d&interval=1d"

Read the accepted and rate_limited series:

  • accepted non-zero for the most recent day → ingestion is healthy, continue.
  • accepted at 0 with rate_limited climbing → quota exhausted. Stop the normal report. Lead with this instead, get the exact numbers from sentry api "/customers/ucar-inc/" (categories.errors: usage / reserved / usageExceeded, plus billingPeriodEnd), and say plainly that the issue list below is stale as of the last accepted event.

1. Scan Issues

Run these in parallel, one per project:

sentry issue list ucar-inc/teamclu-react --query "is:unresolved" --period 48h --json --fields shortId,title,priority,level,status --limit 30
sentry issue list ucar-inc/teamclu-rust  --query "is:unresolved" --period 48h --json --fields shortId,title,priority,level,status --limit 30
sentry issue list ucar-inc/teamclu-ios   --query "is:unresolved" --period 48h --json --fields shortId,title,priority,level,status --limit 30
sentry issue list ucar-inc/teamclu-expo  --query "is:unresolved" --period 48h --json --fields shortId,title,priority,level,status --limit 30

Use --period for the time window (24h / 48h / 14d), not a lastSeen: clause. Default is 90 days, which is far wider than a daily report wants.

Filter results: keep only issues where level is fatal OR priority is high.

--fields gotcha (CLI 0.26.1): count, userCount, firstSeen and lastSeen are listed in --help but are silently dropped from issue list output — you get the key omitted, not an error. Volume and recency have to come from sentry issue view <shortId> --json, which does return them. Do not report event counts sourced from issue list.

If no issues match and step 0 was clean, skip to step 4 with the "全部正常" message. If step 0 was not clean, say so instead — an empty list under an exhausted quota means nothing.

2. Analyze Root Causes (Local)

For each filtered issue (max 10 total), perform local root cause analysis:

  1. Fetch issue details with stack trace, which also carries the volume numbers:
sentry issue view <shortId> --json
  1. From the stack trace / error message, identify the relevant source files and functions in the codebase.
  2. Read those source files to understand the code context around the error site.
  3. Produce a one-sentence root cause summary based on the stack trace + source.

Two things worth checking before writing the summary:

  • Group splits. The same defect often appears as several issues — a sourcemapped build and a minified one group separately. Compare metadata.value across the filtered set and treat identical values as one root cause rather than reporting the same bug three times.
  • Prefer a sourcemapped frame. When several groups share a value, analyze the one whose culprit is a repo path (/src/...) rather than a bundle (assets/index-*.js) — it names the file directly.

When there are more than ~4 issues to analyze, run them as parallel subagents via the Agent tool; each runs sentry issue view, reads the relevant sources, and returns one sentence. For fewer than that, just do it inline — spawning agents costs more than it saves.

If analysis cannot determine a root cause, use the error title as-is and say the root cause is undetermined. Do not guess.

3. Format Report

Sentry 日报 <YYYY-MM-DD>

【Web / 桌面】N 个高优 issue
• <shortId> [<level>] <title> — 根因:<root cause summary>
• ...

【桌面 Rust】N 个高优 issue
• ...

【iOS】N 个高优 issue
• ...

【Expo】N 个高优 issue
• ...

修复命令:/sentry-fix <top-issue-id>

Omit any project section with zero matching issues. When step 0 found the quota exhausted, put that first, above every section:

⚠️ Sentry 配额已耗尽(<usage>/<reserved>),<date> 起事件全部被丢弃,<billingPeriodEnd> 重置。
以下列表停留在最后一条被接收的事件,不代表当前状态。

4. Report Out

Present the report in the conversation.

Pushing to WeCom is a separate step that needs the user's go-ahead, unless this run is the scheduled daily report (/loop 24h /sentry-monitor), where pushing is the whole point. When the user asked for an analysis rather than a daily report, show the report and offer to push — do not push unasked, since it posts to a group chat.

wecom-cli msg send_message '{"chat_type": 2, "chatid": "wrOOClYgAA5gMJijxEUfWC6M0RAjwlWQ", "msgtype": "text", "text": {"content": "<report text>"}}'

If no fatal/high issues exist anywhere and the quota gate was clean:

Sentry 日报 <YYYY-MM-DD> — 全部正常,无高优 issue

Usage

  • One-time: /sentry-monitor
  • Recurring: /loop 24h /sentry-monitor

Constraints

  • This skill is READ-ONLY. Never modify any code files.
  • Do not attempt to fix issues. Only report them.
  • If sentry CLI is not authenticated, prompt the user to run sentry auth login.
  • Never pipe a sentry command through tail/head when you care about success — the pipeline's exit code is the pager's, so a failed call reads as exit 0. Redirect to a file and check $?.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.