perfetto-sql

Translate natural language intents into Perfetto SQL queries for Android trace analysis.

Updated Jul 6, 2026
One-click install
npx skills add https://github.com/shirulot/codex-skill --skill perfetto-sql-shirulot
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: perfetto-sql
Source: https://github.com/shirulot/codex-skill/tree/main/perfetto-sql
Command: npx skills add https://github.com/shirulot/codex-skill --skill perfetto-sql-shirulot

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill bridges the gap between complex Android performance trace data and actionable insights by translating natural language questions into precise Perfetto SQL queries.

Core Features & Use Cases

  • Automated Query Generation: Converts intent-based requests into syntactically correct SQL for trace_processor.
  • Performance Analysis: Facilitates deep dives into CPU scheduling, memory usage, and thread states using the Perfetto Standard Library.
  • Use Case: Quickly identify the root cause of app startup jank by querying thread slices and scheduling states without manually writing complex join logic.

Quick Start

Use the perfetto-sql skill to analyze the provided trace file and calculate the total duration of all slices matching the RenderThread name pattern.

Frequently Asked Questions about perfetto-sql

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write Perfetto SQL queries for Android trace analysis?

To write Perfetto SQL queries for Android trace analysis, you can translate natural language data intents into syntactically valid SQL using an automated query generation process. This approach leverages the trace_processor engine to handle complex performance profiling tasks.

Can I analyze app startup jank using Perfetto SQL without manual joins?

You can analyze app startup jank using Perfetto SQL by requesting thread slices and scheduling states through natural language. The translation mechanism handles the complex join logic automatically, enabling quick root cause identification without manual query construction.

What performance data can I extract from Android traces using natural language?

Using natural language, you can extract slice, thread, and memory data from Android traces. The system converts your requests into syntactically correct SQL that queries CPU scheduling, memory usage, and thread states via the Perfetto Standard Library.

Does generating Perfetto SQL from natural language require manual schema knowledge?

Generating Perfetto SQL from natural language does not require manual schema knowledge because the process ensures robust query execution through adherence to standard library schemas. It automatically maps your data intents to the correct trace_processor structures using idempotent SQL practices.

What is the best way to calculate total slice duration for a specific thread in Perfetto?

The best way to calculate total slice duration for a specific thread in Perfetto is to express your intent in natural language. The system translates this into a precise SQL query that matches the RenderThread name pattern and aggregates the duration data automatically.