用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/mozilla/media-skills --skill tech-doc命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| 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