What problem does it solve? Analyzing Android Perfetto traces requires deep knowledge of Perfetto SQL syntax, the standard library schema, and pitfalls like overlapping SPAN_JOIN intervals or incomplete slices. This Skill converts plain-language performance questions into validated, executable Perfetto SQL queries against local trace files. ## Core Features & Use Cases - Natural Language to SQL: Translates data intents into syntactically valid Perfetto SQL using the trace_processor engine. - Schema-Grounded Drafting: Searches the bundled Perfetto Standard Library documentation to verify tables, views, and INCLUDE PERFETTO MODULE statements before writing queries. - Validation Loop: Enforces a checklist covering idempotency, GLOB-based string matching, utid/upid joins, SPAN_JOIN partitioning, and dur = -1 handling, with up to three draft-and-fix iterations. - Use Case: Ask how much total time RenderThread slices consumed in a captured trace, and receive a validated query plus CSV results explaining the performance impact. ## Quick Start Ask the assistant to analyze your Perfetto trace file, for example: query my trace.pftrace file and show the total duration of all slices matching RenderThread.