docs-specialist
Specialized documentation writer and reviewer with code-to-docs generation and drift detection
What this skill does
# Documentation Specialist Skill ## Overview This skill provides specialized expertise in technical documentation: generating docs from code, detecting drift between docs and implementation, validating quality, and applying consistent templates. ## Documentation Reference **CRITICAL:** Before working on documentation tasks, consult: - `docs-specialist/skills/docs-specialist/references/documentation-patterns.md` ## Expertise Areas ### 1. Code-to-Docs Generation Analyze source code and generate documentation automatically: **Process:** 1. Scan code files (routes, models, components, services) 2. Extract structure (classes, functions, signatures) 3. Parse existing comments (JSDoc, docstrings) 4. Apply appropriate template 5. Generate formatted documentation ### 2. Docs-to-Code Sync Detection Compare documentation against code to find discrepancies: | Status | Symbol | Meaning | |--------|--------|---------| | **Implemented** | ✅ | Code matches documentation exactly | | **Partial** | ⚠️ | Code exists but differs from docs | | **Not Implemented** | ❌ | Documented but missing in code | | **Undocumented** | 📝 | In code but not documented | ### 3. Documentation Validation Check quality, accuracy, and completeness: - Link integrity (internal and external) - Code example accuracy - Structure and formatting - Completeness by doc type - Technical accuracy against code ### 4. Template System Apply consistent templates for different documentation types: | Template | Use For | |----------|---------| | `readme` | Project README | | `api-endpoint` | REST API endpoint | | `component` | UI component | | `model` | Database model | | `service` | Service class | | `guide` | How-to guide | | `architecture` | Architecture decision record | | `changelog` | Release changelog | ## Commands | Command | Purpose | |---------|---------| | `/docs-specialist:docs` | Validate, generate, update, and check status | | `/docs-specialist:sync` | Detect and fix drift between docs and code | | `/docs-specialist:template` | List, view, and apply documentation templates | | `/docs-specialist:init` | Create documentation folder structure | | `/docs-specialist:doctor` | Diagnose and fix documentation issues | See each command's file for full syntax and options. ## Working Principles ### Accuracy First - Always verify against source code - Test code examples before documenting - Flag assumptions or uncertainties - Update immediately when code changes ### Code Analysis Approach When analyzing code for documentation: 1. Parse file structure (AST when possible) 2. Extract public interfaces first 3. Include type information 4. Find usage examples in tests 5. Respect existing documentation comments ### Sync Detection Approach When comparing docs to code: 1. Build inventory of documented items 2. Build inventory of code items 3. Match by name/path/signature 4. Categorize matches (exact, partial, missing) 5. Detail differences for partial matches ## Documentation Standards ### File Organization ``` docs/ ├── README.md # Documentation hub ├── api/ # API reference ├── guides/ # User guides ├── architecture/ # System design └── development/ # Developer docs ``` ### Markdown Conventions - ATX-style headers (`#`) - Code blocks with language specification - Relative links for internal references - One sentence per line (for diffs) ### Code Examples - Complete, runnable examples - Include imports/setup - Show expected output - Highlight key lines ### Tool-Specific Files Keep these in their original locations (DO NOT move to /docs): - `CLAUDE.md` - Root directory - `.claude/commands/*.md` - Command definitions - `.claude/agents/*.md` - Agent definitions - `.cursorrules` - Cursor AI configuration ### Version Control - Use conventional commits: `docs: description` - Link doc commits to code commits when related - Group related documentation updates ## Quality Checklist Before considering documentation complete: - [ ] All code examples tested and working - [ ] Technical accuracy confirmed against code - [ ] Links valid and correct - [ ] Formatting consistent - [ ] Procedures complete and actionable - [ ] Sync check passes - [ ] Validation score above threshold ## Common Workflows ### "I wrote new code, need docs" ```bash /docs-specialist:docs generate <path> ``` ### "I changed code, update docs" ```bash /docs-specialist:sync check /docs-specialist:sync fix ``` ### "Audit documentation quality" ```bash /docs-specialist:docs validate /docs-specialist:sync check ``` ### "Set up docs for new project" ```bash /docs-specialist:init /docs-specialist:docs generate all ``` ### "Pre-release check" ```bash /docs-specialist:doctor --check /docs-specialist:sync check /docs-specialist:docs validate ``` ## Success Metrics Excellent documentation is: - **Accurate** - Reflects current code reality - **Complete** - Covers all necessary topics - **In Sync** - No drift from implementation - **Clear** - Easy to understand - **Maintainable** - Easy to update - **Actionable** - Readers can accomplish goals
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.