AgentSkillsCN

documentation-specialist

当需要从模板(新建项目)中创建专业的软件文档(如SRS、PRD、OpenAPI、用户手册、教程、操作指南),或从现有代码(如Spring Boot或FastAPI)中反向工程生成文档时,应使用此技能。此外,该技能还适用于文档审计与评审、格式转换(Markdown、DOCX、PDF)以及图表生成(C4、Mermaid、PlantUML、ER、序列图)。 当被要求“创建文档”、“为我的代码编写文档”、“撰写SRS”、“生成PRD”或担任“文档专家”时,可使用此技能。

SKILL.md
--- frontmatter
name: "documentation-specialist"
description: |
  This skill should be used when creating professional software documentation (SRS, PRD, OpenAPI,
  user manuals, tutorials, runbooks) from templates (greenfield) or reverse-engineering documentation
  from existing code like Spring Boot or FastAPI (brownfield). Also handles documentation audits/reviews,
  format conversion (Markdown, DOCX, PDF), and diagram generation (C4, Mermaid, PlantUML, ER, sequence).
  Use when asked to "create documentation", "document my code", "write SRS", "generate PRD", or "documentation specialist".
version: "3.0-PDA"
allowed-tools: ["Read", "Write", "Edit", "Glob", "Grep", "Bash", "Skill"]

Documentation Specialist Skill

Quick Start

Software documentation creation, extraction, conversion, and diagramming capabilities.

Capabilities:

  1. Greenfield - Create documentation from templates (SRS, PRD, OpenAPI, User Manuals, Tutorials, Runbooks)
  2. Brownfield - Reverse-engineer documentation from code (Spring Boot, FastAPI)
  3. Audit - Review and improve existing documentation
  4. Convert - Transform formats (MD → DOCX → PDF)
  5. Diagram - Generate visuals (Mermaid C4, PlantUML UML)

Example Requests:

code
Create an SRS for a billing system with PCI-DSS compliance
Document my Spring Boot application at ~/projects/customer-api
Create a user manual for my SaaS product
Write a database failover runbook
Audit my API documentation at docs/api/openapi.yaml
Convert docs/srs.md to Word format
Create a C4 container diagram for my microservices

Execution Flow:

  1. Classify intent → 2. Load workflow → 3. Execute steps → 4. Generate documentation → 5. Present post-processing options

Intent Classification

IntentKeywordsWorkflow
CREATE_NEW"create", "generate", "write" + doc typegreenfield-workflow.md
CODE_TO_DOCS"document", "extract", path referencebrownfield-workflow.md
AUDIT"audit", "review", "check", "improve"audit-workflow.md
CONVERT"convert", "to Word", "to PDF"convert-workflow.md
DIAGRAM"diagram", "C4", "sequence", "ER"diagram-workflow.md
USER_DOCS"user manual", "how-to", "getting started"user-docs-workflow.md
TUTORIAL"tutorial", "API guide", "CLI docs"tutorial-workflow.md
RUNBOOK"runbook", "procedure", "incident"runbook-workflow.md

CRITICAL: Load only the workflow needed for the current intent. Avoid loading multiple workflows.


Document Type → Template

Requirements & Design:

User Documentation:

TypeTemplate
User Manualuser-manual.md
How-To Guidehowto-guide.md
Getting Startedgetting-started.md

Developer & Operations:

TypeTemplate
Developer Tutorialdeveloper-tutorial.md
Runbookrunbook.md

Framework Detection (Brownfield)

FrameworkDetectionMapping
Spring Bootpom.xml, @SpringBootApplicationspring-boot-mapping.yaml
FastAPIrequirements.txt, from fastapi importfastapi-mapping.yaml

Process: Glob for detection files → Grep for patterns → Load mapping → Follow brownfield workflow


On-Demand Resources

Load only what is needed for the current task.

Workflows

Reference Guides

Examples


Skill Integration

SkillInvocation Trigger
docxRequest includes Word format
pdfRequest includes PDF format
plantumlUML diagrams (ER, sequence, component)
mermaid-architectC4 diagrams, flowcharts

Error Handling

ErrorResponse
Cannot detect frameworkAsk: "Is this Spring Boot, FastAPI, or another framework?"
Missing templateUse closest match, inform user
Skill not availableOffer markdown-only alternative
Ambiguous requestAsk: "Would you prefer SRS (formal) or PRD (agile)?"

End of SKILL.md (v3.0-PDA)