agentsclimarketplace

Perfetto performance analysis

Skill Gracker/Perfetto-Skills/skills/perfetto-performance-analysis

Analyze Android, Linux, and Chromium Perfetto traces with local trace_processor_shell evidence. Use for startup, scrolling or jank, input latency, ANR, CPU scheduling, memory or GC, Binder or IO, GPU or SurfaceFlinger, power or thermal, rendering-pipeline identification, trace capture guidance, scene reconstruction, and single- or multi-trace performance comparison.From its SKILL.md

Install
npx -y skills add Gracker/Perfetto-Skills --skill perfetto-performance-analysis

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 18 stars18 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as AGPL-3.0-or-later. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

7.7 KB, ~1.6k tokens by cl100k_base, as published. Nobody here has run it

Perfetto Performance Analysis

Analyze traces from evidence instead of guessing from symptom names. Use the bundled scripts for deterministic queries and load only the references needed for the selected workflow.

Operating contract

  1. Resolve the Skill root as the directory containing this SKILL.md. Convert script and reference paths to absolute paths before executing them; do not assume a client-specific environment variable exists.
  2. Record every input trace path, SHA-256, requested process/thread, time range, and trace side before analysis.
  3. Run scripts/perfetto_probe.py before domain queries. Treat unavailable tables, modules, tracks, or trace signals as limitations, not negative evidence.
  4. Select one primary workflow below. Load its Markdown file directly, then follow its availability gate and evidence sequence.
  5. Execute a complete exported Skill through scripts/perfetto_skill.py run, or one manifest query through scripts/perfetto_query.py --query-id. Keep query source, parameters, trace identity, timestamps, durations, units, and returned row bounds with every saved result.
  6. Separate observations, correlations, mechanisms, and verified root causes. Do not promote a hypothesis without evidence that supports the claimed process, thread, time window, and trace.
  7. For comparisons, analyze each trace independently before computing deltas. Never use a missing metric on one side as proof that the other side regressed.
  8. Emit the structure in assets/report-schema.json. List missing evidence and unresolved alternatives under limitations.

Read the evidence contract, then use identity rules, missing-data rules, and claim verification before writing conclusions.

Workflow routing

Use the machine-readable workflow index when selecting or validating workflow IDs.

Runtime commands

List or run a deterministic portable Skill graph:

python3 <skill-root>/scripts/perfetto_skill.py list
python3 <skill-root>/scripts/perfetto_skill.py run /absolute/trace.pftrace \
  --skill startup_analysis --param 'package="com.example"' \
  --output-dir /absolute/output/run

Complete Skill runs and --query-id runs verify the selected processor's v57.2 commit, RPC API, platform, and SHA-256 before executing SQL. Inspect that identity independently with:

python3 <skill-root>/scripts/perfetto_doctor.py

Use --allow-unsupported-processor only for an explicitly labeled canary; it does not turn the result into verified evidence. A capability-gated query runs only after an automatic probe for the same trace proves its required schema; the gate result remains in the evidence sidecar. --allow-unverified is a separate opt-in only for a query explicitly classified as unverified and never bypasses a missing capability.

Probe a trace:

python3 <skill-root>/scripts/perfetto_probe.py /absolute/path/to/trace.pftrace \
  --output /absolute/path/to/output/probe.json

Run a referenced SQL asset:

python3 <skill-root>/scripts/perfetto_query.py /absolute/path/to/trace.pftrace \
  --sql-file <skill-root>/references/generated/sql/<query>.sql \
  --format json --output /absolute/path/to/output/query.json

Bind SmartPerfetto DSL placeholders through the public wrapper instead of editing SQL text. --param NAME=JSON safely binds scalar inputs and JSON arrays (rendered as SQL literal lists for IN (...)), --module android.example.module loads declared prerequisites, and --result NAME=/path/prior.json exposes a non-empty saved row array as a relation for a dependent step. Pipeline expressions such as ${prior_step.data[0].upid} select a scalar field from those rows:

python3 <skill-root>/scripts/perfetto_query.py /absolute/trace.pftrace \
  --sql-file <skill-root>/references/generated/sql/<skill>/<step>.sql \
  --module android.frames.timeline \
  --param 'package="com.example"' --param start_ts=123 \
  --result prior_step=/absolute/output/prior-step.json \
  --output /absolute/output/current-step.json

The runtime rejects unresolved placeholders and caps trace-processor stdout and stderr at 16 MiB by default. Lower the bound with --max-output-bytes; increase it only for a reviewed, explicitly bounded query.

For comparison, first write one side-summary file per independently analyzed trace using assets/comparison-input-schema.json, then run scripts/perfetto_compare.py --side baseline=a.json --side candidate=b.json --baseline baseline.

If trace_processor_shell is unavailable, run scripts/bootstrap_trace_processor.py or provide a locked executable through --trace-processor or PERFETTO_TRACE_PROCESSOR.

Reference discovery

Generated references are numerous. Find a SmartPerfetto Skill, SQL step, table, or signal without loading the whole catalog:

rg -n "<skill-id|table|signal>" <skill-root>/references/generated

Load the directly linked result and its source provenance. Do not infer step semantics from a filename alone.

Compatibility

Require Python 3.11+, filesystem access, terminal execution, and a compatible Perfetto trace_processor_shell. The portable instructions work in Codex, Claude Code, OpenCode, and other clients that implement Agent Skills and expose those capabilities. Cloud-only agents without local file or terminal access can use the methodology references but cannot execute trace queries.

What ships with it: 1726 files

8061.1 KB alongside SKILL.md, 15 of them executable

agents/

references/

1686 more files not listed here. See all 1726 in the repository.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.