Analyze a Firefox log file (MOZ_LOG output, console or test log) for problems: crashes, assertions, IPC errors and subsystem failures, with a timeline across processes. Bundled knowledge files add the signals of specific areas.
Run printenv GECKO_AGENT_MODE before anything else. If it prints hackbot, you run unattended in the Hackbot cloud container, and these rules override the steps below. Otherwise skip this section: the skill runs as written.
mcp__attachments__fetch_attachment and read the returned files of kind log or text. Fetch no file in another way.mcp__attachments__fetch_attachment returned, with any suffix or name (for example .moz_log, or the generated name of an extracted archive member). Keep the other checks: no .., under /tmp, no sensitive directory.searchfox-cli: use mcp__searchfox__find_definition, mcp__searchfox__search_identifier and mcp__searchfox__search_text.You are analyzing a Firefox log file for problems. The log file is given as the skill argument; if the user didn't specify one, ask which file to analyze.
This skill is read-only: it never writes a file, and it never edits the bundled
knowledge/*.md files.
It runs only these shell commands: printenv GECKO_AGENT_MODE, wc -l and
searchfox-cli. Use the Grep, Glob and Read tools for everything else. Run each command as its own Bash
call, with literal values: do not join commands with ;, && or |, do not set
shell variables, and do not cd. A joined command does not match the skill's
allowed-tools rules, so it needs approval.
Each file in knowledge/ holds the signals, codes and failure patterns of one area.
The table lists each file and the signals that route a log to it. After step 2, read
every file whose signals you found, and only those. If no row matches, the generic
steps below are enough.
To add an area, add a file to knowledge/ and a row to this table.
| Area | Signal found | Read |
|---|---|---|
| Media Foundation, EME/CDM | MFMediaEngine, CDM, PlayReady, EME, hardware reset, MFCDMProxy | knowledge/mf-media-engine.md |
| Windows HRESULT codes | Any hr=0x... or HRESULT code | knowledge/hresult-table.md |
| GPU and graphics | D3D, GL context, device lost, device removed, GLContextProvider | knowledge/gpu-graphics.md |
.., paths outside ~//tmp//var/log, or that point at sensitive directories (.ssh, .claude, etc.).MediaDecoderStateMachine #N is a thread name, and the decoder identity is Decoder=<address>, which changes every run. Do not use thread names to correlate events across runs.TEST-START. A process in a bad state from the prior test can cause the next test to fail.Before reading any file, validate the path:
.txt, .log, .out or .moz_log, or be a rotated MOZ_LOG file such as log.moz_log.0~, /tmp, or /var/log..)$, ;, | or a newline.ssh, .gnupg, .aws, .config, .claude, /proc, /etc, /sys)If the path fails any of these checks, refuse to read it and ask the user to provide a valid log file path.
Read the log file. If it is large (> 2000 lines), use the Grep tool to extract relevant lines first:
wc -l <log-file>Firefox log line format:
TIMESTAMP UTC - [PROCESS PID: THREAD]: LOG_LEVEL/MODULE messageExamples:
[Parent 35044: Main Thread] — parent/browser process[Child 5084: Main Thread] — content process[MF Media Engine CDM 36936: MediaSupervisor #1] — CDM utility process[GPU 13948: Renderer] — GPU processLog levels: V/ = verbose, D/ = debug, I/ = info, W/ = warning, E/ = error.
Each process writes its own file, and the name of a child process file has child
in it. For example, with MOZ_LOG_FILE=log.txt the parent writes log.txt.moz_log
and a child writes log.txt.child-1.moz_log. Ask for the files of the other
processes when the error crosses a process boundary.
Search for these generic critical signals first:
remote process has crashed — a Firefox subprocess crashedNS_ENSURE_SUCCESS.*failed with non-trivial HRESULTABORT / MOZ_CRASH / AssertionIPC channel error / channel closedNS_ERROR_* results, such as NS_ERROR_FAILUREThen scan for subsystem-specific keywords from the Knowledge Files table above. For each match, read the corresponding knowledge file before continuing analysis.
Extract the relevant events in chronological order. Format:
HH:MM:SS.mmm [Process] Event descriptionFocus on the sequence leading to any crash or error. Look for:
Firefox uses multiple processes. Track events by process type and PID:
Output a concise analysis with:
One paragraph: what happened, which subsystem failed, root cause if identifiable.
Chronological list of key events with timestamps and process context.
Table of each distinct error/signal found, with count and first occurrence.
Only if the log has HRESULTs: list each unique HRESULT with its decoded meaning (use knowledge/hresult-table.md).
To confirm a cause, find the code that writes the key log line or error with
searchfox-cli -q '<exact log text>', then read that function with
searchfox-cli --define '<function>'. Say what the code shows, not only what the log
says.
mozilla/firefox-aidev-plugins
0edd81f
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.