Agent skill

Perfetto Trace Analysis

by jameshnsears in jameshnsears/QuoteUnquote

Analyzes Perfetto traces to find the root cause of latency, memory, or jank issues in Android apps.

Apache-2.0Auto-check passedMobile

Install Perfetto Trace Analysis

skills CLI
$ npx skills add jameshnsears/QuoteUnquote --skill perfetto-trace-analysis -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jameshnsears/QuoteUnquote perfetto-trace-analysis --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jameshnsears/QuoteUnquote.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/perfetto-trace-analysis .claude/skills/perfetto-trace-analysis && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
perfetto-trace-analysis
GitHub stars
100
Used in
2 other repos
Token cost
~1.7k tokens
SKILL.md length
824 words
Files
9 (incl. references)
Skills in repo
4
Repo updated
First seen
Licence
Apache-2.0

At a glance

Analyzes Perfetto traces to find the root cause of latency, memory, or jank issues in Android apps.

  • Works in 4 steps: Formulate Hypothesis → Plan and Collect Data → Analyze and Drill Down (Depth-First) → …
  • The user provides a Perfetto trace file and asks any question
  • SKILL.md covers Resources, Setup Phase (Mandatory), Investigation Protocol and Final Report
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Perfetto Trace Analysis is an agent skill from jameshnsears/QuoteUnquote. Analyzes Perfetto traces to find the root cause of latency, memory, or jank issues in Android apps. Use when the user provides a Perfetto trace file and asks any question, ongoing investigation, or open-ended request to analyze its contents.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including reference files (for example `references/hints_cpu.md`, `references/hints_graphics.md` and `references/hints_io.md`).

It sits in Mobile, covering Android development, Mobile performance and Root cause analysis. It works with SQL. The repository describes itself as: A Quotations / Affirmations App Widget. The licence is Apache-2.0.

When your agent uses it

  • The user provides a Perfetto trace file and asks any question
  • Ongoing investigation
  • Open-ended request to analyze its contents

Example prompts

  • “Use the perfetto-trace-analysis skill to analyz Perfetto traces to find the root cause of latency, memory, or jank issues in Android apps”
  • “/perfetto-trace-analysis”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Formulate Hypothesis
  2. Plan and Collect Data
  3. Analyze and Drill Down (Depth-First)
  4. Exhaustive Investigation (Do Not Give Up Early)

What it can do on your machine

Read from SKILL.md and the folder at commit 1e3f3b0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Perfetto Trace Analysis loads about 1.7k tokens when it runs, and up to ~61k if it reads all its reference files. Until then it costs about 66 tokens; SKILL.md has 824 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~66
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~61k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jameshnsears/QuoteUnquote at commit 1e3f3b0, republished under its Apache-2.0 licence (© jameshnsears). 824 words, ~1,725 tokens.

Download SKILL.mdSave it as .claude/skills/perfetto-trace-analysis/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
name
perfetto-trace-analysis
description
Analyzes Perfetto traces to find the root cause of latency, memory, or jank issues in Android apps. Use when the user provides a Perfetto trace file and asks any question, ongoing investigation, or open-ended request to analyze its contents.
license
Complete terms in LICENSE.txt
metadata.author
Google LLC
metadata.last-updated
2026-05-14
metadata.keywords
Perfetto, trace analysis, Android performance, debugging, profiling, jank, bottleneck, SQL

Resources

  • Domain Hints: Reference files for specific performance areas: CPU, Graphics, I/O, IPC, Memory, Power. These files each contain multiple expert-vetted, powerful trace analysis techniques to steer and aid in the analysis.
  • Perfetto SQL Reference: Reference guidelines for translating intents into valid queries are located in the SQL reference. You must read this reference and follow its Execution Protocol for all SQL generation.

Setup Phase (Mandatory)

  1. Initialize Scratchpad (Chain of Evidence):
    • Maintain your working memory in a local scratchpad file located in the exact same directory as the target trace file.
    • Name the file using the trace's filename appended with _analysis.md (e.g., [trace_filename]_analysis.md). Before creating it, check if a file with that name already exists by listing the directory's contents---to avoid biasing your investigation, DO NOT read the file's contents to check for its existence. If it does, append an incrementing version number (e.g., _v2.md, _v3.md) until you find an available filename. You MUST hardcode this exact filename in all subsequent tool calls.
    • Use this scratchpad STRICTLY to log verified facts: timestamps, slice names, thread IDs (utid/tid), and thread states.
    • DO NOT write preliminary hypotheses or premature conclusions in the scratchpad. It is a strict Chain of Evidence.
  2. Review Domain Hints: Read the Domain Hints in each file to get a high-level overview of what techniques are possible. Make sure to use this baseline knowledge when researching and retrieving hints during the ongoing investigation.
  3. Review SQL Reference: Read the SQL reference in references/sql.md and follow its Execution Protocol for all SQL generation. Do not guess schemas.
  4. Target Resolution: If the user's request is broad (e.g., "why is the app slow?") and doesn't specify a package name:
    • Execute a query to identify the active application: sql INCLUDE PERFETTO MODULE android.startup.startups; SELECT package FROM android_startups;
    • If multiple packages are returned, ask the user to choose one. Save the chosen package_name to your scratchpad.

Investigation Protocol

Follow this iterative loop until you have isolated the definitive root cause(s):

1. Formulate Hypothesis
  • Prioritization: Form hypotheses using information from: user prompt > "Domain Hints" (CPU, Graphics, I/O, IPC, Memory, Power) > general knowledge. Be sure to leverage these "Domain Hints" as they are expert-vetted analysis techniques.
  • Source Attribution: Explicitly mention the source of your hypothesis (e.g., "Based on hints_io.md...").
  • Focus Constraint: Focus on the primary bottleneck. Avoid investigating deep into binder transactions unless the user explicitly asks for it or there is no other obvious bottleneck.
  • State Reasoning: Briefly state your reasoning based on previous findings before generating a new query.
2. Plan and Collect Data
  • Metrics First: Start with a high-level view using trace metrics before diving into custom SQL (e.g., ./trace_processor --run-metrics android_startup).
  • Broad to Narrow: Begin with broad queries using minimal filters. Favor fuzzy matching (e.g., GLOB '*abc*') over exact matching.
  • Overlapping Time: When filtering by time, you MUST check for events that overlap with the target time range (e.g., start1 < end2 AND start2 < end1) to ensure you don't miss slices that span across the boundaries.
Show full SKILL.md (328 more words)Show less
3. Analyze and Drill Down (Depth-First)
  • Evidentiary Rigor: Do not draw conclusions without explicit data.
  • Wall Time vs. CPU Time: Do not assume a long-running slice is actively computing. You MUST query the thread_state table for the exact timestamp window of suspicious slices to verify if the thread was Running, Runnable (waiting for CPU), or Sleeping/Uninterruptible Sleep (blocked).
  • Follow Dependencies: If a thread is blocked/waiting, you MUST find what it is waiting for (Binder, Lock, I/O, etc.). Cross process boundaries if necessary. You cannot conclude an investigation on a waiting thread without identifying the blocker.
4. Exhaustive Investigation (Do Not Give Up Early)
  • Multiple Bottlenecks: Complex performance issues rarely have a single cause. Do NOT stop your investigation after finding the first anomaly. Even if you find a major bottleneck (e.g., emulator graphics lag), you MUST continue searching for other independent system-wide issues (e.g., lock contention, I/O stalls). To find other bottlenecks, search through the content of the "Domain Hints" files (CPU, Graphics, I/O, IPC, Memory, Power) to retrieve and leverage expert-vetted, powerful trace analysis techniques. Investigate each relevant hint with depth.
  • Global Verification: Periodically perform a system-wide query for the longest running slices (ORDER BY slice.dur DESC) and most frequent D-states to ensure your local investigation hasn't missed a massive, unrelated system stall.
  • Persist Through Dead Ends: If a hypothesis is disproven or a query returns empty, do not conclude. Pivot your focus, broaden your search constraints (fuzzy matching, wider time windows), and continue the mission.

Final Report

Only when you have followed the entire chain of dependencies to the root cause(s) AND confirmed through exhaustive search that no other major bottlenecks exist: 1. Summarize your findings detailing the verified chain of evidence. 2. Conclude with: "This concludes the trace analysis. You can review the full chain of evidence in [scratchpad_filename]. Let me know if you would like me to drill down into any of these specific threads, or if you'd like help drafting a bug report."

© jameshnsears, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 8 other files (references) in .agents/skills/perfetto-trace-analysis of jameshnsears/QuoteUnquote.

  • SKILL.md
  • references/hints_cpu.md
  • references/hints_graphics.md
  • references/hints_io.md
  • references/hints_ipc.md
  • references/hints_memory.md
  • references/hints_power.md
  • references/perfetto-stdlib.md
  • references/sql.md

Open the folder on GitHubat commit 1e3f3b0

Used in 2 other repositories

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in jameshnsears/QuoteUnquote, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Perfetto Trace Analysis next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Perfetto Trace Analysis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Perfetto Trace Analysis this skilljameshnsears/QuoteUnquote1002 repos~1.7kAutomated safety check: PassApache-2.0
Deferring State ReadsrosuH/EasyWatermark1.9k1 repos~3.8kAutomated safety check: PassApache-2.0
Diagnosing Compose StabilityrosuH/EasyWatermark1.9k1 repos~3.3kAutomated safety check: PassApache-2.0
Generating Baseline ProfilesrosuH/EasyWatermark1.9k1 repos~5kAutomated safety check: PassApache-2.0
Compose Performance AuditModinMobileSTS/SlayTheAmethystModded406—~1.2kAutomated safety check: PassCustom licence
Android Debuggingrcosteira79/android-skills153—~2.6kAutomated safety check: PassMIT

Similar skills

  • Deferring State Reads

    rosuH/EasyWatermark

    A skill your agent uses to push frequently-changing Jetpack Compose state reads (scroll position, animation values, drag offsets) out of the Composition phase and down into Layout or Draw using…

    1.9k GitHub starsUsed in 1 repo~3.8k tokens
    MobileAuto-check passed
  • Diagnosing Compose Stability

    rosuH/EasyWatermark

    A skill your agent uses to diagnose Jetpack Compose stability problems by enabling and reading the Compose Compiler Reports (classes.txt, composables.txt, composables.csv, module.json).

    1.9k GitHub starsUsed in 1 repo~3.3k tokens
    MobileAuto-check passed
  • Generating Baseline Profiles

    rosuH/EasyWatermark

    A skill your agent uses to generate and measure Jetpack Compose Baseline Profiles end-to-end with the AGP 8.2+ Baseline Profile Generator module and the Macrobenchmark harness.

    1.9k GitHub starsUsed in 1 repo~5k tokens
    MobileAuto-check passed
  • Compose Performance Audit

    ModinMobileSTS/SlayTheAmethystModded

    Audits Jetpack Compose screens for performance problems, from recomposition scope and stability to lazy list keys and effects, and proposes minimal fixes with ways to verify them.

    406 GitHub stars~1.2k tokensUpdated 3 days ago
    MobileAuto-check passed
  • Android Debugging

    rcosteira79/android-skills

    Android and KMP debugging techniques for crashes, ANRs, memory leaks, R8 traces, Gradle failures and Compose recomposition, built on finding the root cause first.

    153 GitHub stars~2.6k tokensUpdated 22 days ago
    MobileAuto-check passed
  • React Native Expert

    Jeffallan/claude-skills

    Builds React Native and Expo apps for iOS and Android: Expo Router navigation, FlatList tuning, platform-specific code and build error recovery.

    12k GitHub stars~1.7k tokensUpdated 7 days ago
    MobileAuto-check passed

More from jameshnsears/QuoteUnquote

  • Wear Compose M3

    jameshnsears/QuoteUnquote

    Expert guidance for working with Wear OS Compose Material3. An agent skill from jameshnsears/QuoteUnquote.

    100 GitHub starsUsed in 1 repo~3.2k tokens
    Auto-check passed
  • Perfetto SQL

    jameshnsears/QuoteUnquote

    Translates natural language data intents into syntactically valid Perfetto SQL queries and executes them against a local trace file.

    100 GitHub starsUsed in 2 repos~2.7k tokens
    Auto-check passed
  • Camera1 To Camerax

    jameshnsears/QuoteUnquote

    A skill your agent uses to migrate legacy Android camera implementations (Camera1 or raw Camera2 APIs) to CameraX.

    100 GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed

Works with

Categories

Questions about Perfetto Trace Analysis

What does Perfetto Trace Analysis do?

Analyzes Perfetto traces to find the root cause of latency, memory, or jank issues in Android apps. Perfetto Trace Analysis is an agent skill from jameshnsears/QuoteUnquote. Analyzes Perfetto traces to find the root cause of latency, memory, or jank issues in Android apps.

When should I use Perfetto Trace Analysis?

Perfetto Trace Analysis fits situations like: the user provides a Perfetto trace file and asks any question; ongoing investigation; open-ended request to analyze its contents.

How do I install Perfetto Trace Analysis in Claude Code?

Run `npx skills add jameshnsears/QuoteUnquote --skill perfetto-trace-analysis -a claude-code`. Or copy the skill folder (.agents/skills/perfetto-trace-analysis in jameshnsears/QuoteUnquote) into .claude/skills/perfetto-trace-analysis in your project. Claude Code loads it when a task matches its description.

How do I install Perfetto Trace Analysis in Codex?

Run `npx skills add jameshnsears/QuoteUnquote --skill perfetto-trace-analysis -a codex`. Or copy the skill folder (.agents/skills/perfetto-trace-analysis in jameshnsears/QuoteUnquote) into .agents/skills/perfetto-trace-analysis in your project. Codex loads it when a task matches its description.

Can I use Perfetto Trace Analysis in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jameshnsears/QuoteUnquote --skill perfetto-trace-analysis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/perfetto-trace-analysis, .gemini/skills/perfetto-trace-analysis, .github/skills/perfetto-trace-analysis and .opencode/skills/perfetto-trace-analysis in your project.

What does Perfetto Trace Analysis need to run?

SKILL.md names no scripts, command-line tools or credentials: Perfetto Trace Analysis is instructions for the agent only.

Does Perfetto Trace Analysis access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Perfetto Trace Analysis safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Perfetto Trace Analysis use?

Perfetto Trace Analysis is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Perfetto Trace Analysis use?

About 1.7k tokens (SKILL.md is roughly 6.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 59k tokens, read only when the agent opens those files.

What are the alternatives to Perfetto Trace Analysis?

Skills that share tags, products or a category with Perfetto Trace Analysis: Deferring State Reads (rosuH/EasyWatermark, 1.9k stars), Diagnosing Compose Stability (rosuH/EasyWatermark, 1.9k stars), Generating Baseline Profiles (rosuH/EasyWatermark, 1.9k stars) and Compose Performance Audit (ModinMobileSTS/SlayTheAmethystModded, 406 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Perfetto Trace Analysis?

jameshnsears (a GitHub user) maintains it in jameshnsears/QuoteUnquote, which has 100 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on August 27, 2026.

Source: jameshnsears/QuoteUnquote on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.