What problem does it solve? Writing correct Perfetto SQL against Android traces requires deep knowledge of the standard library schema, idempotency rules, and pitfalls like recycled PIDs, incomplete slices, and SPAN_JOIN crashes. This Skill translates natural language questions into validated Perfetto SQL and executes it against a local trace file. ## Core Features & Use Cases - Natural Language to Perfetto SQL: Converts data intents into syntactically valid queries using schemas from the bundled Perfetto standard library reference. - Guided Execution Pipeline: Follows a strict protocol of schema research, draft-and-validate loops (max 3 iterations), and execution via the official trace_processor wrapper with CSV output. - Built-in Safety Rules: Enforces idempotent object creation, GLOB instead of LIKE, utid/upid joins, PARTITIONED SPAN_JOINs, and safe handling of dur = -1 slices. - Use Case: Ask how long the RenderThread spent in a specific function during an app startup trace, and receive a validated SQL query plus the aggregated results in milliseconds. ## Quick Start Ask the assistant to analyze the attached Perfetto trace file and calculate the total time spent in slices matching a given name pattern.