Analyze Firefox performance profiles using the profiler-cli CLI tool. Trigger when given a profiler.firefox.com or share.firefox.dev link, a local profile path, or when the user wants to investigate an issue in a Firefox profile. Always use this skill instead of WebFetch for Firefox profiler URLs; WebFetch only retrieves the profiler UI's HTML shell and cannot access profile data, whereas profiler-cli downloads and parses the actual profile into a local daemon that supports structured queries over stacks, markers, threads, and samples.
You are helping a Mozilla Firefox engineer analyze a Firefox performance profile using the profiler-cli CLI tool. The user works on Firefox and has familiarity with the browser's internals, so you can use Firefox-specific terminology freely (e.g. Gecko, SpiderMonkey, Necko, content/parent process split, PBackground, etc.) without explaining it.
When invoked:
profiler-cli guide first and read the entire output. It is approximately 400 lines. The Bash tool may silently truncate long output, causing you to miss the command reference and analysis patterns that appear later in the guide, so read all of it before proceeding.$ARGUMENTS contains a profile path or URL, load it with profiler-cli load.If the URL is a profiler.firefox.com/from-file/... or profiler.firefox.com/from-browser/... link, stop and tell the user it cannot be loaded. These URLs store the profile data locally in the browser tab and are not accessible to anyone else. Ask the user to either upload the profile using the share button in the Firefox Profiler UI (which produces a share.firefox.dev or profiler.firefox.com/public/... link), or pass a local file path to the profile JSON directly.
Do not print commands for the user to run, execute them and interpret the results.
If profiler-cli is not available, stop and tell the user to install it (npm install -g @firefox-devtools/profiler-cli@latest) and restart the agent.
Before giving the user a result or summary, always run profiler-cli stop to shut down the background daemon process (it persists beyond individual commands and must be explicitly stopped to free the port and memory), then present the findings.
The references/ directory in this skill contains real profiling investigations. Each scenario has two files:
macos-extensions-hang-infinite-recursion.md): first-person walkthrough explaining the reasoning and what was found.macos-extensions-hang-infinite-recursion-cli.md): step-by-step profiler-cli commands with real output and annotations. These are the most useful for calibrating your approach.Before starting an analysis, use Glob to list available case studies, then read the -cli.md file that most closely matches the current scenario:
firefox-macos-startup-font-initialization-cli.mdmacos-extensions-hang-infinite-recursion-cli.mdmacos-ipc-blob-url-accumulation-cli.mdsimpleperf-non-rooted-firefox-startup-cli.mdsimpleperf-non-rooted-fenix-sync-history-fetch-cli.mdresource-usage-linux-fat-aar-build-cli.mdmacos-network-pr-bad-descriptor-error-cli.mdmacos-network-nss-doh-deadlock-cli.mdwindows-broken-stackwalk-jpeg-avx2-cli.mdIf the scenario is unclear, read firefox-macos-startup-font-initialization-cli.md as a general-purpose baseline.
The list above is for calibration only. The actual problem may be novel or not covered by any case study. Use the examples to understand the investigation approach, not to constrain what you look for.
31bc07f
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.