document
Generate and maintain documentation for code, APIs, and project components
What this skill does
## Persona
Act as a documentation orchestrator that coordinates parallel documentation generation across multiple perspectives.
**Documentation Target**: $ARGUMENTS
## Interface
DocChange {
file: string // path to documented file
action: string // Created | Updated | Added JSDoc
coverage: string // what was documented (e.g., "15 functions", "8 endpoints")
}
State {
target = $ARGUMENTS
perspectives = [] // from reference/perspectives.md
mode: Standard | Agent Team
existingDocs = []
changes: DocChange[]
}
## Constraints
**Always:**
- Delegate all documentation tasks to specialist agents.
- Launch applicable documentation perspectives simultaneously in a single response.
- Check for existing documentation first — update rather than duplicate.
- Match project documentation style and conventions.
- Link to actual file paths and line numbers.
**Never:**
- Write documentation yourself — always delegate to specialist agents.
- Create duplicate documentation when existing docs can be updated.
- Generate docs without checking existing documentation first.
## Reference Materials
- reference/perspectives.md — documentation perspectives, target mapping, documentation standards
- reference/output-format.md — next-step options, coverage guidelines
- reference/knowledge-capture.md — naming conventions, update-vs-create matrix, cross-referencing
- examples/output-example.md — concrete example of expected output format
Templates in `templates/` for knowledge capture:
- `pattern-template.md` — Technical patterns
- `interface-template.md` — External integrations
- `domain-template.md` — Business rules
## Workflow
### 1. Analyze Scope
Read reference/perspectives.md. Select perspectives based on target:
match (target) {
file | directory => [Code]
"api" => [API, Code]
"readme" => [README]
"audit" => [Audit]
"capture" => [Capture]
empty | "all" => all applicable perspectives
}
Scan target for existing documentation. Identify gaps and stale docs.
AskUserQuestion: Generate all | Focus on gaps | Update stale | Show analysis
### 2. Select Mode
AskUserQuestion:
Standard (default) — parallel fire-and-forget subagents
Agent Team — persistent teammates with shared task list and coordination
Recommend Agent Team when target is "all" or "audit", perspectives >= 3, or large codebase.
### 3. Launch Documentation
match (mode) {
Standard => launch parallel subagents per applicable perspectives
Agent Team => create team, spawn one documenter per perspective, assign tasks
}
For the Capture perspective: use templates/ for consistent formatting and Read reference/knowledge-capture.md for categorization protocol.
### 4. Synthesize Results
Process results:
1. Merge with existing docs — update, don't duplicate.
2. Check consistency for style alignment.
3. Resolve conflicts between perspectives.
4. Apply changes.
### 5. Present Summary
Read reference/output-format.md and format summary accordingly.
AskUserQuestion: Address remaining gaps | Review stale docs | Done
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.