Android Profiler
Android (Google)OfficialCreated by Google LLCDistributed by Android (Google)
- Skill
- Tool integration
- Software development
- Apache-2.0
- Low risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The android-profiler skill provides a structured approach to capturing and interpreting Android performance data. It acts as an orchestrator for recording system traces, heap dumps, and CPU profiles, and provides workflows for deep-dive analysis using Perfetto. The skill is designed to help developers identify the root causes of UI jank, memory leaks, battery drain, and system-level performance regressions by leveraging standardized trace analysis and SQL-based querying.
What it does
- Records system traces, CPU call stacks, and memory heap profiles.
- Analyzes Perfetto traces to identify UI jank, frame drops, and startup latency.
- Investigates system-level issues like IPC Binder storms and thread scheduling stalls.
- Diagnoses power-related issues including battery drain and kernel wake locks.
- Debugs memory pressure, LMK events, and native or Java heap leaks.
- Executes custom PerfettoSQL queries for advanced trace data exploration.
When to use it
- When you need to investigate app startup latency or intermittent UI jank.
- When diagnosing memory-related crashes like OOMs or excessive allocation churn.
- When analyzing system-wide performance regressions using A/B trace comparisons.
- When you need to profile power consumption or modem power rail activity.
- When you need to perform ad hoc analysis on complex Android system traces.
Advantages
- Provides a unified workflow for both recording and analyzing performance data.
- Reduces ambiguity by enforcing clear intent disambiguation before execution.
- Includes specialized reference hints for CPU, memory, graphics, and power analysis.
- Supports advanced data exploration via PerfettoSQL integration.
- Ensures consistent environment setup through standardized path management.
Usage examples
- “My app is stuttering during scrolling. Can you help me find the cause?”
- The agent will initiate a trace recording session focused on UI jank, then guide you through analyzing the resulting Perfetto trace for frame drops and thread stalls.
- “I suspect a memory leak in my application. How can I investigate?”
- The agent will help you capture a Java or native heap dump and provide steps to analyze the memory allocation patterns to identify potential leaks.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/android/android-profiler/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip android-profiler.zip -d .agents/skills
Documentation by Google LLC
Your primary role is to figure out what the user wants to do (disambiguation), find the right instructions for it (workflow discovery), and follow them step-by-step (following the execution plan). If the request is unclear, work with the user to finalize the execution plan before proceeding.
Prerequisites and Setup
Before executing any workflows, read references/env_setup.md. It defines
what to set $SKILL_ROOT to - the anchor every other path in this skill is
written against.
Intent Disambiguation
Do not guess the user's intent. If the user request is not clear, ask the user what they want to do before proceeding.
Recording
Route all recording requests through recording/recording_orchestrator. This defines guidelines and pre-flight checks or dependency checks that apply to all recording workflows, and ensures you have the necessary setup to proceed. Read the orchestrator and execute the plan it describes based on what the user wants to record (for example, a system trace or a heap dump).
Analysis
Route all analysis requests through analysis/analysis_orchestrator.
Files
- ATTRIBUTION.mdAdded by AutoGineer965 B
- LICENSELicence file added by AutoGineer11.1 KiB
- SKILL.md2.2 KiB
- analysis/analysis_orchestrator.md1.5 KiB
- analysis/workflows/perfetto-sql/perfetto_sql.md969 B
- analysis/workflows/perfetto-trace-analysis/perfetto_trace_analysis.md4.2 KiB
- analysis/workflows/perfetto-trace-analysis/references/hints/hints_cpu.md2.6 KiB
- analysis/workflows/perfetto-trace-analysis/references/hints/hints_graphics.md2.1 KiB
- analysis/workflows/perfetto-trace-analysis/references/hints/hints_io.md1.8 KiB
- analysis/workflows/perfetto-trace-analysis/references/hints/hints_ipc.md1.7 KiB
- analysis/workflows/perfetto-trace-analysis/references/hints/hints_memory.md2.2 KiB
- analysis/workflows/perfetto-trace-analysis/references/hints/hints_power.md1.2 KiB
- analysis/workflows/perfetto-trace-analysis/references/per_candidate_analysis.md8.8 KiB
- analysis/workflows/perfetto-trace-analysis/references/triage.md3.9 KiB
- recording/recording_orchestrator.md1.5 KiB
- recording/workflows/perfetto-trace-recording/perfetto_trace_recording.md4.7 KiB
- recording/workflows/perfetto-trace-recording/references/example-configs/app_jank.pftxt1.0 KiB
- recording/workflows/perfetto-trace-recording/references/example-configs/cpu_profile.pftxt773 B
- recording/workflows/perfetto-trace-recording/references/example-configs/java_heap_dump.pftxt566 B
- recording/workflows/perfetto-trace-recording/references/example-configs/long_background.pftxt1006 B
- recording/workflows/perfetto-trace-recording/references/example-configs/memory_counters.pftxt1.0 KiB
- recording/workflows/perfetto-trace-recording/references/example-configs/native_heap.pftxt589 B
- recording/workflows/perfetto-trace-recording/references/example-configs/sched_cpu.pftxt836 B
- recording/workflows/perfetto-trace-recording/references/trace_config_reference.md4.9 KiB
- references/env_setup.md513 B
- references/perfetto/bin/trace_processorScript10.8 KiB
- references/perfetto/setup.md1.3 KiB
- references/perfetto/sql.md15.8 KiB
analysis/workflows/perfetto-trace-analysis/perfetto_trace_analysis.md
Analyzes Perfetto traces to find the root cause of performance issues in user or system Android apps (for example, janks, app startup, memory, or latency stalls). keywords:
perfetto
trace
jank
startup
latency
stall
thread
- bottleneck
Use this workflow to diagnose general Android performance issues: jank, app startup delays, latency spikes, or thread stalls.
Follow these steps in order:
Step 1: Identify Symptom and Target
Clarify the following with the user (ask questions, present options):
What is the symptom: Do they want to investigate frame drops, jank, startup latency, ANR, app crash, system crash, or memory pressure?
Who is the victim: Where did they observe the symptom? For example, "a frame drop in
com.example.sample".Baseline trace: If multiple trace files are provided (A/B trace comparison), identify which is the baseline. You will pass both to the sub-agents in Step 3, which use the baseline trace to establish expected behavior.
Input Trace Required: Confirm that the user has provided a trace file path or URL (for example,
.pftrace,.perfetto-trace, or a Perfetto UI link). If none is provided, pause and ask the user to provide one before proceeding. Rules:
If the symptom is not known, pause and work with the user for clarification.
If the symptom is known but the victim/timestamp is unknown, proceed to Step 2 (Triage) to discover candidates.
Step 2: System-Wide Triage
Launch a sub-agent to run triage using the following prompt template:
Trace Path: [path of the trace with the issue]
Goal: Identify all candidate bottlenecks for [symptom] in
[package or entire system]
Execution: Read
`$SKILL_ROOT/analysis/workflows/perfetto-trace-analysis/references/triage.md`
and follow its instructions.From the triage output:
If no candidates are found, ask the user for specific timestamps or symptoms.
If multiple candidates exist, present the top 3 most severe instances to the user and confirm which one(s) to investigate. The user may select one or more.
Step 3: Investigate Candidates in Parallel
For every confirmed candidate, launch dedicated sub-agents in parallel with this prompt:
Trace path: [path]
Baseline Trace Path: [path, if provided, else "None"]
Candidate Info: [package_name, `utid`, `upid`, render_thread_utid,
process_name, thread_name]
Symptom Window: [start_ts, end_ts, duration]
Expanded Symptom Window: [expanded_start_ts to end_ts, if applicable]
System Vitals: [payload from Step 2]
Execution Protocol: Read
`$SKILL_ROOT/analysis/workflows/perfetto-trace-analysis/references/per_candidate_analysis.md`
and follow it end-to-end.AWAIT completion of all agents before proceeding to Step 4.
Step 4: Final Consolidation and Report
Consolidate the sub-agent findings into a final report containing:
Summary and Classification: Classify root cause (hardware, software/code, scheduling policy, system exhaustion, external dependency).
Dependency Chain: Full causal path from symptom to root cause with thread names,
UTID/UPIDs, blocking states, and timestamps.Evidence Tags: Tag every statement with
[SQL](backed by trace data),[INFERRED](logical deduction), or[GAP](untraced or missing data).Platform Context: Cite observed slice names, values and timestamps for explaining the platform behavior. What's bad: "SurfaceFlinger does X around vsync" What's a good explanation: "
SurfaceFlinger's composition slice atts=142.3msran4msafter the vsync signal atts=138.1ms, consistent with X".Partial Suspects: Secondary branches or unverified paths that were investigated but did not reach a terminal root cause, ranked by evidence strength. Report partial suspects even if a terminal root cause was found.
If evidence is evenly split between multiple potential causes, report each suspicion with its supporting data so that engineers can evaluate probabilities without false certainty. Do not arbitrarily pick a winner.
Recommended Next Steps: Scan the frontmatter of workflows in
$SKILL_ROOT/analysis/workflows/and recommend specialized matching workflows, if applicable, based on the findings.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
What our scanner noticed· Low risk
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Google LLC
- Publisher
- Android (Google) (Official)
- Distributed by
- Android (Google)
- Source
- android/skills · profilers/android-profiler · commit bf68e2d
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE.txt)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Google LLC or Android (Google).
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download android-profiler.zip