Perfetto Skills

July 16, 2026 · View on GitHub

简体中文

Portable Agent Skill for evidence-driven Android, Linux, and Chromium Perfetto performance analysis. It packages SmartPerfetto's domain workflows, SQL, capability gates, identity/evidence rules, and deterministic Skill runner without requiring the SmartPerfetto backend, UI, provider runtime, or MCP server.

Android performance ecosystem

The Android Performance Ecosystem brings its navigation Hub and seven core projects into an optional path from instrumentation and capture to analysis, system knowledge, and reproducible cases.

StageProjectPurposeAddress
NavigateAndroid Performance EcosystemMaintain the shared project map, handoff metadata, generated README navigation, and drift checks.GitHub
InstrumentTraceFixInject app-side android.os.Trace sections at build time so method work is visible at runtime.GitHub
Capture and measurePerfetto ToolsCapture repeatable Perfetto traces and collect FPS or Simpleperf measurements.GitHub
AnalyzeSmartPerfettoInvestigate traces with an AI-assisted Web UI, CLI, reports, sessions, comparisons, and evidence workflow.GitHub
Agent analysisPerfetto SkillsGive agents a portable Perfetto analysis Skill for Android, Linux, and Chromium, with selected assets synchronized through pinned workflows.GitHub
LearnAndroid Performance BlogTeach Perfetto and Systrace analysis through articles, system explanations, and case studies.AndroidPerformance.com · GitHub
System knowledgeAndroid Internal WikiAn alpha knowledge base for Android mechanisms from App to Framework, Native, and Kernel.Coming soon
ReproduceTrace for Blog (SystraceForBlog)Provide the Perfetto, Systrace, and related case files used by articles for hands-on reproduction.GitHub

Choose the right Perfetto project

These projects are complementary. Pick the smallest surface that matches how you want to work; none is a prerequisite for another.

ProjectFormBest forMain boundaryChoose it when
SmartPerfettoFull Web UI, CLI, and backendEnd-to-end interactive Android investigationsManaged Skill runtime, reports, sessions, comparisons, and provider integrationYou want a complete analysis product
Perfetto SkillsPortable standard Agent SkillLocal agents with filesystem and terminal accessDeterministic local runner, evidence contracts, and broad analysis workflowsYou want trace analysis inside Codex, Claude Code, or OpenCode
Google official Perfetto SkillOfficial upstream Agent Skill bundleUpstream-first trace recording and analysisOfficial recording, memory, GPU, and ad-hoc PerfettoSQL guidanceYou want the smallest upstream-maintained starting point

See Google's official Perfetto AI usage guide for the upstream Skill installation and release model.

Is this a standard Agent Skill?

Yes. skills/perfetto-performance-analysis/SKILL.md follows the Agent Skills specification, including standard frontmatter and progressive references. The specification defines the Skill directory and metadata; it does not prescribe an installer.

The commands below use Vercel Labs' ecosystem skills CLI as the recommended convenience installer. tools/install.py remains an offline/release-archive fallback. The official Perfetto Skill is used only as a gap-checking reference; it is neither an install nor runtime dependency.

Install

The verified CLI version is 1.5.16. Project installs are visible only in the current project; add -g for a user-level install.

Inspect the repository without installing:

npx skills@1.5.16 add Gracker/Perfetto-Skills --list

Install for Codex, Claude Code, and OpenCode in the current project:

npx skills@1.5.16 add Gracker/Perfetto-Skills \
  --skill perfetto-performance-analysis \
  -a codex -a claude-code -a opencode -y

Install globally:

npx skills@1.5.16 add Gracker/Perfetto-Skills \
  --skill perfetto-performance-analysis \
  -a codex -a claude-code -a opencode -g -y

Verify, update, or remove:

npx skills@1.5.16 list --json
npx skills@1.5.16 update perfetto-performance-analysis
npx skills@1.5.16 remove perfetto-performance-analysis -y

For an extracted release archive, run one of:

python3 tools/install.py --client codex
python3 tools/install.py --client claude-code
python3 tools/install.py --client opencode

The fallback never overwrites an install unless --force is explicit. After installation, refresh the client and ask it to use $perfetto-performance-analysis on a local .pftrace file.

What is included

  • One standard perfetto-performance-analysis router and 14 workflows.
  • 230 SmartPerfetto definitions: 198 deterministic executable Skills and 32 knowledge-only pipeline/comparison contracts.
  • 637 SmartPerfetto-authored SQL queries, each with source/hash/license, module/fragment dependencies, Android API 28–37 status, and four independent validation axes.
  • A safe expression runtime for all authored conditions, child-Skill calls, bounded iterators, diagnostics, explicit AI handoffs, evidence sidecars, and report validation.
  • Three SQL fragments, eight advisory-only OEM startup overrides, 65 strategy sources, and 32 rendering-pipeline documents.
  • A checksum-pinned cross-platform trace processor bootstrap.
  • A project-owned real-trace fixture pack with immutable provenance, privacy scan evidence, per-file hashes, and a committed offline smoke trace.

The SQL is not described as "official Perfetto SQL." It is SmartPerfetto SQL executed against a locked official Perfetto runtime. Queries without exact fixtures remain capability-gated or unverified, and cannot support a verified causal conclusion merely because they parse.

Development

Requirements: Python 3.11+ and uv. Normal development downloads the immutable Perfetto Skills fixture pack and does not require a SmartPerfetto checkout.

uv sync --extra dev
uv run python tools/verify.py

Use uv run python tools/verify.py --offline for the committed real smoke trace. SmartPerfetto is needed only for an explicit pinned import review; the three upstream sync procedures and local SQL red-green workflow are documented in upstream synchronization.

Generated runtime indexes are sharded by Skill so agents load only the selected workflow/query. See architecture, compatibility, and migration coverage.

Releases and license

Tagged releases contain reproducible .zip and .tar.gz bundles plus SHA256SUMS. Trace processor executables and trace fixtures are not bundled. The separately versioned fixture pack is a test asset, not an install/runtime dependency of the Skill archive. SmartPerfetto-derived work is AGPL-3.0-or-later; upstream Perfetto material retains Apache-2.0. See LICENSE and NOTICE.