[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6998JC43B651BG29XVXW62C":3,"skill-same:01M6998JC43B651BG29XVXW62C":70},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":32,"linkOnly":33,"markdownContent":34,"markdownBody":35,"frontMatter":36,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":17,"ownerHtmlUrl":42,"ownerBlogUrl":43,"ownerDescription":44,"updatedAt":45,"install":46,"resources":59},"01M6998JC43B651BG29XVXW62C","torq","Torq 性能追踪采集","Capture a perfetto or simpleperf trace using the Torq CLI.","使用 Torq CLI 捕获 perfetto 或 simpleperf 跟踪（trace）。","google\u002Ftorq","google","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1342004?v=4","01M698VYEFDM0VJBZDYYJ2T83S","Google","01M6998GD7JTG33X570G1323RT",14,"Apache-2.0",null,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftorq\u002Fblob\u002Fmain\u002Fai\u002Fskills\u002Ftorq\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRSRYQ3M8N5063NNQPF2B1","调试与故障排查","SCENARIO","使用场景",[5,31],"cli","2026-11-10 10:12:30",false,"---\nname: torq\ndescription: Capture a perfetto or simpleperf trace using the Torq CLI.\n---\n\n# Torq Skill\n\nThis skill allows capturing performance traces using the Torq CLI tool.\n\n## Prerequisites\n\n- Ensure you have a device connected and authorized via ADB.\n- Ensure that the torq CLI is available (e.g `which torq`).\n\n## 1. Capturing a Trace\n\nYou can capture either a Perfetto trace (default) or a Simpleperf trace. This is specified via the\n`-p`\u002F`--profiler` flag. By default perfetto is selected and the `-p` flag doesn't need to be specified.\n\nThe next step is to specify the trace duration, which needs to be expressed in milliseconds, via the\n`-d`\u002F`--duration` flag. Setting an explicit duration is optional. If no `--duration` flag is passed, \nthen the trace will continue indefinitely until `Ctrl+C` is pressed to stop the trace collection.\n\n> [!Note]\n> In the case that Ctrl+C doesn't kill the torq process (might be running in the background), then\n> you can run `ps aux | grep torq` to get the PID for the torq process and send a SIGINT to it.\n\nBy default the trace files are opened in the browser, given it is almost always the desired behavior.\nIn the case you don't want the files to be opened in the browser, you can specify `--no-ui` to skip\nthis.\n\n> [!Note]\n> But always prefer to launch the trace files in the browser, only use `--no-ui` if it\n> is intentionally mentioned.\n\nThe trace files will be saved in the current directory (or the directory specified by\n`-o`\u002F`--out-dir` flag) with a default prefix (e.g., `trace-...`).\n\nHere are some examples of how to capture traces with torq:\n\n```bash\n# Capture a Perfetto trace for 20 seconds\ntorq -d 20000\n\n# Run an indefinite trace (make sure to press Ctrl+C to cancel trace session)\ntorq\n\n# Skip opening the trace in the browser\ntorq -d 20000 --no-ui\n\n# Capture a simpleperf profile for 10 seconds\ntorq -p simpleperf -d 10000\n\n# Store trace in \u002Ftmp\u002Fperfetto-traces\ntorq -d 5000 -o \u002Ftmp\u002Fperfetto-traces\n```\n\n### Trigger System Events\n\nWith torq it is possible to trigger different system events while capturing a trace. One can specify\nthe event via the `-e`\u002F`--event` flag. You can see the supported events via `torq profiler --help`\ncommand.\n\nHere are some examples on how to do this:\n\n```bash\n# Capture a boottime trace\ntorq -d 60000 -e boot\n\n# Capture a user switch trace\ntorq -d 10000 -e user-switch --from-user 11 --to-user 12\n\n# Capture an app startup in the trace\ntorq -d 4000 -e app-startup -a com.google.android.apps.maps\n```\n\n### Help\n\nTo better understand all the alternatives of the `profiler` subcommand in torq, you can always\nrun:\n\n```bash\ntorq profiler --help\n```\n","# Torq Skill\n\nThis skill allows capturing performance traces using the Torq CLI tool.\n\n## Prerequisites\n\n- Ensure you have a device connected and authorized via ADB.\n- Ensure that the torq CLI is available (e.g `which torq`).\n\n## 1. Capturing a Trace\n\nYou can capture either a Perfetto trace (default) or a Simpleperf trace. This is specified via the\n`-p`\u002F`--profiler` flag. By default perfetto is selected and the `-p` flag doesn't need to be specified.\n\nThe next step is to specify the trace duration, which needs to be expressed in milliseconds, via the\n`-d`\u002F`--duration` flag. Setting an explicit duration is optional. If no `--duration` flag is passed, \nthen the trace will continue indefinitely until `Ctrl+C` is pressed to stop the trace collection.\n\n> [!Note]\n> In the case that Ctrl+C doesn't kill the torq process (might be running in the background), then\n> you can run `ps aux | grep torq` to get the PID for the torq process and send a SIGINT to it.\n\nBy default the trace files are opened in the browser, given it is almost always the desired behavior.\nIn the case you don't want the files to be opened in the browser, you can specify `--no-ui` to skip\nthis.\n\n> [!Note]\n> But always prefer to launch the trace files in the browser, only use `--no-ui` if it\n> is intentionally mentioned.\n\nThe trace files will be saved in the current directory (or the directory specified by\n`-o`\u002F`--out-dir` flag) with a default prefix (e.g., `trace-...`).\n\nHere are some examples of how to capture traces with torq:\n\n```bash\n# Capture a Perfetto trace for 20 seconds\ntorq -d 20000\n\n# Run an indefinite trace (make sure to press Ctrl+C to cancel trace session)\ntorq\n\n# Skip opening the trace in the browser\ntorq -d 20000 --no-ui\n\n# Capture a simpleperf profile for 10 seconds\ntorq -p simpleperf -d 10000\n\n# Store trace in \u002Ftmp\u002Fperfetto-traces\ntorq -d 5000 -o \u002Ftmp\u002Fperfetto-traces\n```\n\n### Trigger System Events\n\nWith torq it is possible to trigger different system events while capturing a trace. One can specify\nthe event via the `-e`\u002F`--event` flag. You can see the supported events via `torq profiler --help`\ncommand.\n\nHere are some examples on how to do this:\n\n```bash\n# Capture a boottime trace\ntorq -d 60000 -e boot\n\n# Capture a user switch trace\ntorq -d 10000 -e user-switch --from-user 11 --to-user 12\n\n# Capture an app startup in the trace\ntorq -d 4000 -e app-startup -a com.google.android.apps.maps\n```\n\n### Help\n\nTo better understand all the alternatives of the `profiler` subcommand in torq, you can always\nrun:\n\n```bash\ntorq profiler --help\n```\n",{"name":5,"description":7},"main","83fd27b0a27b9824216cdf60582ddbfaf6bf62e5","ai\u002Fskills\u002Ftorq",7,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftorq","https:\u002F\u002Fgithub.com\u002Fgoogle","https:\u002F\u002Fopensource.google\u002F","Google ❤️ Open Source","2026-11-13 10:10:05",{"source":9,"skillName":5,"commands":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add google\u002Ftorq --skill torq",{"tool":52,"command":53},"bunx","bunx skills add google\u002Ftorq --skill torq",{"tool":55,"command":56},"pnpm","pnpm dlx skills add google\u002Ftorq --skill torq","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftorq\u002Fblob\u002Fmain\u002Fai\u002Fskills\u002Ftorq\u002FSKILL.md",true,[60,66],{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},"checklist.md","REFERENCE","参考文档",4389,"https:\u002F\u002Fgithub.com\u002Fsherryswift1019-gif\u002FAI-DZHT\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbmad-dev-story\u002Fchecklist.md",{"path":67,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":68,"sourceHtmlUrl":69},"workflow.md",25857,"https:\u002F\u002Fgithub.com\u002Fsherryswift1019-gif\u002FAI-DZHT\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbmad-dev-story\u002Fworkflow.md",[]]