一键导入
tech-doc
// Generate technical documentation for a specified technology domain with optional customization.
// Generate technical documentation for a specified technology domain with optional customization.
Help prepare a Firefox security approval request by analyzing local commits/changes and drafting answers to the sec-approval questionnaire. Use when setting sec-approval? on a Bugzilla bug.
Help prepare a Firefox uplift approval request (Beta, Release, and/or ESR) by checking whether patches are already on the bug, auditing sanitization once for sec-* bugs, and drafting the approval comment per https://wiki.mozilla.org/Release_Management/Uplift_rules. Use after a fix is ready and needs to ride into a stabilization branch. May or may not follow sec-approval (sec-moderate typically skips sec-approval but may still need uplift).
Firefox bug triage assistant for media, web conferencing, and graphics related issues.
Generate or modify Firefox mozconfig build configuration files. Use when the user asks to create a mozconfig, configure a build, set up ASan/TSan/debug builds, or match try server configurations.
Firefox bug triage assistant for determining if a bug severity rating of S1 or S2 is warranted, and to gather information for triaging and prioritization.
Launch a local web server and open a browser page listing all bug triage reports in ./reports, with live JS text filtering.
| name | tech-doc |
| description | Generate technical documentation for a specified technology domain with optional customization. |
This skill generates technical documentation for a specified technology domain (e.g., WebCodecs, WebRTC, Media Playback, WebAudio, Graphics) in the Firefox/Gecko codebase.
The generated document serves as context input for AI coding assistants in scenarios such as feature planning, spec implementation, debugging, or code tracing.
When this skill is invoked:
If the user has not specified a domain, use AskUserQuestion to ask them to choose one. Common domains include:
Once you have the domain, look up the primary directories and specs from the Domain Reference table below. Then show the user the pre-filled prompt (see Prompt Template section) and use AskUserQuestion to ask:
"Here's the documentation request I'll use. Would you like to customize it?"
- Generate now - Proceed with the default prompt
- Customize - Let me modify the prompt first
If the user chooses to customize, ask them what they'd like to change:
Before generating, use AskUserQuestion to ask where to save the documentation:
"Where would you like to save the generated documentation?"
- Default location - Save to
.claude/skills/tech-doc/{domain}.md- Custom path - Let me specify a different location
If the user chooses a custom path, ask them to provide the full file path.
After the prompt is finalized and destination is determined, generate the actual technical documentation by:
searchfox-cli and file reads to explore the codebase for the specified domainIMPORTANT: Do NOT just output the prompt template. Actually generate the technical documentation by researching the codebase.
Use this template internally to guide documentation generation. Replace placeholders with actual values from the Domain Reference table.
# Technical Documentation: {{DOMAIN}}
**Generated Date**: {{CURRENT_DATE}}
**Scope**: Comprehensive technical documentation for {{DOMAIN}} in Firefox/Gecko, covering architecture, key modules, data flows, and cross-boundary interactions.
## Target Codebase
- **Repository**: Mozilla Firefox (Gecko engine)
- **Primary directories**: {{PRIMARY_DIRECTORIES}}
- **Related specifications**: {{RELEVANT_SPECS}}
## Document Sections to Generate
1. **High-Level Architecture**
- Primary modules/components
- Inter-module dependencies
- Process hosting (parent, content, GPU, etc.)
- Architecture diagram (ASCII/text)
2. **Core Modules Deep Dive**
- Purpose and responsibilities
- Key classes/structures
- Lifetime/lifecycle management
- Process/thread model
- Task queue dynamics
3. **Architectural Control Points**
- Orchestration components
- State management
- Data flow drivers
- External API entry points
4. **Key Data Flows**
- Input sources
- Transformations/processing
- Output destinations
- Sequence descriptions
5. **Key Event Flows**
- Event types and meanings
- Dispatch mechanisms
- State machine transitions
- Error handling paths
6. **Action-to-Behavior Mappings**
- User action triggers
- System triggers
- Internal method call chains
- Cross-process communication
7. **Critical Cross-Boundary Interactions**
- Process boundaries (IPC/IPDL)
- Thread boundaries
- Module boundaries
- Tech stack boundaries (C++/Rust/JS, WebIDL)
## Additional Context
{{ADDITIONAL_CONTEXT}}
| Domain | Primary Directories | Related Specs |
|---|---|---|
| WebCodecs | dom/media/webcodecs/, media/ffvpx/ | W3C WebCodecs API, Codec Registry |
| Media Playback | dom/media/, dom/html/ | WHATWG HTML Media Element |
| MSE | dom/media/mediasource/ | W3C Media Source Extensions |
| MediaRecorder | dom/media/mediarecorder/ | W3C MediaStream Recording |
| WebRTC | dom/media/webrtc/, media/webrtc/ | W3C WebRTC, IETF RFCs |
| WebAudio | dom/media/webaudio/ | W3C Web Audio API |
| Graphics | gfx/, dom/canvas/ | WHATWG Canvas, WebGL, WebGPU |
| IPC | ipc/, dom/ipc/ | Mozilla IPDL |
| Networking | netwerk/ | HTTP specs, Fetch API |
| Layout | layout/ | CSS specs, WHATWG |
/tech-doc WebCodecs - Generate WebCodecs documentation/tech-doc for MSE - Generate MSE documentation/tech-doc - Will prompt for domain selection