sentry-java: Skill for Claude Code

.claude/skills/btrace-perfetto/SKILL.md

btrace-perfetto is a skill for Claude Code from getsentry/sentry-java. It costs 72 tokens per session (3,174 once invoked), scanned C, original, MIT.

A workflow for capturing and comparing Android performance traces with Perfetto using a connected device. A trace is a recorded timeline of system and application activity used to find slow operations.

In plain words
What is it for?
Use it to record traces, compare two branches, inspect touch events, and calculate performance differences with trace queries.
Why use it?
It provides evidence for whether an SDK change affects performance instead of relying on guesswork.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

This is getsentry/sentry-java's own configuration. It tells Claude Code how to work on sentry-java itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything sentry-java configures →

About the project

getsentry/sentry-java is a Java and Android software development kit for sending application errors, events, and diagnostic information to Sentry. It is used by developers working with Java, Android, Kotlin, and other JVM-based applications to monitor software behavior. The catalogue rules, skills, instructions, and setting support workflows around this SDK.

getsentry/sentry-java · 1,357 stars · on GitHub · docs.sentry.io

Reuse

Borrowing it

Nothing to install: this file belongs to getsentry/sentry-java. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/getsentry/sentry-java/main/.claude/skills/btrace-perfetto/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/getsentry/sentry-java

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for btrace-perfetto

README.md
[![agentmods](https://agentmods.dev/badge/skills/getsentry/sentry-java/btrace-perfetto/github.svg)](https://agentmods.dev/skills/getsentry/sentry-java/btrace-perfetto)
Your own site
<a href="https://agentmods.dev/skills/getsentry/sentry-java/btrace-perfetto"><img src="https://agentmods.dev/badge/skills/getsentry/sentry-java/btrace-perfetto/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for btrace-perfetto

Your own site · 80×15
<a href="https://agentmods.dev/skills/getsentry/sentry-java/btrace-perfetto"><img src="https://agentmods.dev/badge/skills/getsentry/sentry-java/btrace-perfetto.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,174 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 8 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 38
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • high Tool Misuse · line 133
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • high Tool Misuse · line 302
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • high Tool Misuse · line 133
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • high Tool Misuse · line 133
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • high Tool Misuse · line 302
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • high Tool Misuse · line 302
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • medium analysis-evasion · line 1
    Suspicious Unicode normalization or mixed-script content
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00072 $0.03174
Opus 5.5 $0.00029 $0.01270
Sonnet 5.5 $0.00014 $0.00635
Haiku 4.5 $0.00007 $0.00317

Measured 1mo ago against content hash 2fea16d212fa, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

btrace-perfetto scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

adb shell "rm -rf /storage/emulated/0/Android/data/io.sentry.samples.android/files/rhea-port"

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -sL "https://repo1.maven.org/maven2/com/bytedance/btrace/rhea-trace-processor/3.0.0/rhea-trace-processor-3.0.0.jar" \
.claude/skills/btrace-perfetto/SKILL.md · 304 lines

How it starts

The opening of the file, as written. The whole thing — 304 lines — stays where its author put it; the contents beside it link to each section on GitHub.

btrace Perfetto Trace Capture

Capture Perfetto traces with btrace 3.0 on a connected Android device, optionally comparing two branches. Opens results in Perfetto UI with a prefilled SQL query. After capture, query traces locally with trace_processor to compute comparison stats.

Prerequisites

Before starting, verify:

  1. Connected device: adb devices shows a device (Android 8.0+, 64-bit)
  2. btrace CLI jar: Check if tools/btrace/rhea-trace-shell.jar exists. If not, download it:
    mkdir -p tools/btrace/traces
    curl -sL "https://repo1.maven.org/maven2/com/bytedance/btrace/rhea-trace-processor/3.0.0/rhea-trace-processor-3.0.0.jar" \
      -o tools/btrace/rhea-trace-shell.jar
    
  3. Perfetto trace_processor: Check if /tmp/trace_processor exists. If not, download it:
    # Download trace_processor (--fail ensures HTTP errors don't leave a file behind)
    curl -sSL --fail "https://get.perfetto.dev/trace_processor" -o /tmp/trace_processor
    
    # Verify magic bytes directly — file(1) output is too inconsistent across
    # versions/platforms to rely on for scripts or PIE binaries.
    magic=$(head -c 4 /tmp/trace_processor 2>/dev/null | od -An -vtx1 -N4 | tr -d ' \n')
    case "$magic" in
      2321*)                               ;; # #! shebang (script)
      7f454c46)                            ;; # ELF (Linux)
      cffaedfe|cefaedfe|feedfacf|feedface) ;; # Mach-O (macOS)
      cafebabe)                            ;; # Mach-O universal
      *)
        echo "Error: Downloaded file is not a valid script or executable (magic: ${magic:-empty})"
        rm -f /tmp/trace_processor
        exit 1
        ;;
    esac
    
    # Make executable only after verification
    chmod +x /tmp/trace_processor
    
  4. Device ABI: Run adb shell getprop ro.product.cpu.abi — btrace only supports arm64-v8a and armeabi-v7a (no x86/x86_64)

Step 1: Parse Arguments

Argument Default Description
branch1 current branch First branch to trace
branch2 main Second branch to compare against
duration 30 Trace duration in seconds
sql-query see below SQL query to prefill in Perfetto UI

Read the full file on GitHub · 304 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 304 lines · 72 tokens per session scan C 2fea16d212fa

Subscribe to this mod's changes

btrace-perfetto is a skill published in the GitHub repository getsentry/sentry-java (1,357 stars, last pushed today), licensed MIT. It adds 72 tokens to every session and 3,174 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

kmp-lsp

Kotlin/Java/Swift LSP server for code navigation in Android and iOS codebases. Use when navigating Kotlin, Java, or Swift source files: finding class definitions, listing symbols, jumping to implementations, finding all usages, checking type signatures, or switching workspace between projects. Triggers for: "find this…

Hessesian/kmp-lsp · 114 tokens

java-kotlin

Java and Kotlin programming patterns.

miles990/claude-software-skills · 9 tokens

gradle-groovy

Expert guidance on writing and maintaining Android Gradle build files in Groovy DSL for a Java project — product flavors, signing configs, build types, and dependency management. Use this when configuring build.gradle for new modules or flavors.

almasumdev/awesome-java-android-agent-skills · 51 tokens

java-mvvm

Expert guidance on implementing MVVM in Java using Jetpack ViewModel and LiveData with unidirectional data flow. Use this when building screens, wiring Fragments/Activities to state holders, or reviewing MVVM code in Java.

almasumdev/awesome-java-android-agent-skills · 51 tokens

java-executors

Expert guidance on using java.util.concurrent (ExecutorService, ThreadPoolExecutor, Futures, ListenableFuture) on Android from Java. Use this when designing background work, custom thread pools, or cancellation-aware pipelines.

almasumdev/awesome-java-android-agent-skills · 47 tokens

rxjava3

Expert guidance on RxJava 3 for Android — Observable, Single, Flowable, schedulers, disposables, and error handling. Use this when building reactive pipelines or maintaining existing RxJava code in Java.

almasumdev/awesome-java-android-agent-skills · 46 tokens