agentleFS
mozillamozilla/media-skills/tech-doc/SKILL.md

tech-doc

Skill1 starsChanged 8 months agoMITView on GitHub

Generate technical documentation for a specified technology domain with optional customization.

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 12 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ask the user for the target technology domain if not already specified

    line 14
  2. Distinctive:

    If user wants to customize: let them provide modifications

    line 16
  3. Distinctive:

    Ask the user where to save the generated documentation

    line 17
  4. Distinctive:

    When this skill is invoked:

    line 22
  5. Distinctive:

    If the user has not specified a domain, use AskUserQuestion to ask them to choose one.

    line 26
  6. Distinctive:

    If the user chooses to customize, ask them what they'd like to change:

    line 51
  7. Distinctive:

    Before generating, use AskUserQuestion to ask where to save the documentation:

    line 59
  8. Distinctive:

    If the user chooses a custom path, ask them to provide the full file path.

    line 65
  9. Distinctive:

    After the prompt is finalized and destination is determined, generate the actual technical documentation by:

    line 69
  10. Very specific:

    Use searchfox-cli and file reads to explore the codebase for the specified domain

    line 71
  11. Distinctive:

    Write the comprehensive technical document following the structure in the prompt

    line 73
  12. Distinctive:

    IMPORTANT: Do NOT just output the prompt template.

    line 76
  13. Distinctive:

    Use this template internally to guide documentation generation.

    line 82

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Overview

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.

Workflow

  1. Ask the user for the target technology domain if not already specified
  2. Show the pre-filled prompt and ask if the user wants to customize it
  3. If user wants to customize: let them provide modifications
  4. Ask the user where to save the generated documentation
  5. Generate the technical documentation based on the finalized prompt and save to specified location

Instructions

When this skill is invoked:

Step 1: Check if domain is specified

If the user has not specified a domain, use AskUserQuestion to ask them to choose one. Common domains include:

  • WebCodecs
  • Media Playback (HTMLMediaElement)
  • Media Source Extensions (MSE)
  • MediaRecorder
  • MediaSession
  • WebRTC
  • WebAudio
  • Graphics (WebGL, WebGPU, Canvas)
  • DOM Events
  • Layout Engine
  • Networking (Necko)
  • IPC/IPDL
  • Or any other Firefox subsystem

Step 2: Show pre-filled prompt and offer customization

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

Step 3: Handle customization (if requested)

If the user chooses to customize, ask them what they'd like to change:

  • Additional context or focus areas
  • Specific sections to emphasize or skip
  • Additional directories to analyze
  • Any other modifications

Step 4: Ask for storage destination

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.

Step 5: Generate the technical documentation

After the prompt is finalized and destination is determined, generate the actual technical documentation by:

  1. Use searchfox-cli and file reads to explore the codebase for the specified domain
  2. Analyze the architecture, key classes, data flows, and interactions
  3. Write the comprehensive technical document following the structure in the prompt
  4. Save the document to the specified location in Markdown format

IMPORTANT: Do NOT just output the prompt template. Actually generate the technical documentation by researching the codebase.


Prompt Template

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 Reference

DomainPrimary DirectoriesRelated Specs
WebCodecsdom/media/webcodecs/, media/ffvpx/W3C WebCodecs API, Codec Registry
Media Playbackdom/media/, dom/html/WHATWG HTML Media Element
MSEdom/media/mediasource/W3C Media Source Extensions
MediaRecorderdom/media/mediarecorder/W3C MediaStream Recording
WebRTCdom/media/webrtc/, media/webrtc/W3C WebRTC, IETF RFCs
WebAudiodom/media/webaudio/W3C Web Audio API
Graphicsgfx/, dom/canvas/WHATWG Canvas, WebGL, WebGPU
IPCipc/, dom/ipc/Mozilla IPDL
Networkingnetwerk/HTTP specs, Fetch API
Layoutlayout/CSS specs, WHATWG

Example Invocations

  • /tech-doc WebCodecs - Generate WebCodecs documentation
  • /tech-doc for MSE - Generate MSE documentation
  • /tech-doc - Will prompt for domain selection

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.