Loading...
Loading...
Enhanced docs generation with AI-powered features. Enhanced with Context7 MCP for up-to-date documentation.
npx skill4agent add jg-chalk-io/nora-livekit moai-docs-generationPrimary Agent: doc-syncer
Secondary Agents: alfred
Version: 4.0.0
Keywords: docs, generation, test, api, spec
skill_id: moai-docs-generation
skill_name: Documentation Generation & Template Management
version: 1.0.0
created_date: 2025-11-10
updated_date: 2025-11-10
language: english
word_count: 1400
triggers:
- keywords: [documentation generation, doc template, scaffold, generate docs, api documentation, readme generation]
- contexts: [docs-generation, @docs:generate, documentation-template, doc-scaffold]
agents:
- docs-manager
- spec-builder
- frontend-expert
- backend-expert
freedom_level: high
context7_references:
- url: "https://www.typescriptlang.org/docs/handbook/"
topic: "TypeScript Documentation Pattern"
- url: "https://github.com/prettier/prettier"
topic: "Code Formatting Standards"code-example| Name | Type | Description |
|---|---|---|
| param1 | Type1 | What it does |
### Section 3: Scaffold Generation
**Directory Structure Generation**:
```python
class DocumentationScaffold:
def __init__(self, project_name: str):
self.project_name = project_name
def create_guide_structure(self, guide_name: str) -> None:
"""Create guide directory and template files"""
guide_dir = Path(f"docs/guides/{guide_name}")
guide_dir.mkdir(parents=True, exist_ok=True)
# Create index.md with guide template
index_path = guide_dir / "index.md"
index_path.write_text(GUIDE_TEMPLATE)
# Create subdirectories
(guide_dir / "examples").mkdir(exist_ok=True)
(guide_dir / "images").mkdir(exist_ok=True)
(guide_dir / "code-samples").mkdir(exist_ok=True)
def create_api_docs(self, module_name: str) -> None:
"""Generate API documentation structure"""
api_dir = Path(f"docs/api/{module_name}")
api_dir.mkdir(parents=True, exist_ok=True)
# Create main API doc
api_path = api_dir / "index.md"
api_path.write_text(API_TEMPLATE)
def create_multilingual_structure(self, doc_name: str) -> None:
"""Create docs in ko/, en/, ja/, zh/"""
for lang in ["ko", "en", "ja", "zh"]:
doc_dir = Path(f"docs/src/{lang}/{doc_name}")
doc_dir.mkdir(parents=True, exist_ok=True)
doc_path = doc_dir / "index.md"
doc_path.write_text(self._get_template_for_lang(lang))/**
* Calculate sum of two numbers
* @param a First number
* @param b Second number
* @returns Sum of a and b
* @example
* const result = sum(2, 3); // Returns 5
*/
function sum(a: number, b: number): number {
return a + b;
}### Function: sum
Calculate sum of two numbers
**Signature**:
```typescript
function sum(a: number, b: number): numberabconst result = sum(2, 3); // Returns 5
**Python**:
```python
def calculate_mean(numbers: List[float]) -> float:
"""
Calculate arithmetic mean of numbers.
Args:
numbers: List of numerical values
Returns:
Arithmetic mean of the values
Raises:
ValueError: If list is empty
Example:
>>> calculate_mean([1, 2, 3])
2.0
"""
if not numbers:
raise ValueError("Cannot calculate mean of empty list")
return sum(numbers) / len(numbers)# Generate README for each module
/docs:generate --type readme --scope all
# Generate API documentation from code
/docs:generate --type api --language typescript
# Create guides for new features
/docs:generate --type guide --feature-spec SPEC-001
# Generate multilingual structure
/docs:generate --type i18n --languages ko,en,ja,zhNote: Advanced patterns for complex scenarios.
# Fetch latest documentation
from moai_adk.integrations import Context7Helper
helper = Context7Helper()
docs = await helper.get_docs(
library_id="/org/library",
topic="docs",
tokens=5000
)| Library | Context7 ID | Use Case |
|---|---|---|
| [Library 1] | | [When to use] |
Start
├─ Need docs?
│ ├─ YES → Use this skill
│ └─ NO → Consider alternatives
└─ Complex scenario?
├─ YES → See Level 3
└─ NO → Start with Level 1skill_id: moai-docs-generation
skill_name: Documentation Generation & Template Management
version: 1.0.0
created_date: 2025-11-10
updated_date: 2025-11-10
language: english
word_count: 1400
triggers:
- keywords: [documentation generation, doc template, scaffold, generate docs, api documentation, readme generation]
- contexts: [docs-generation, @docs:generate, documentation-template, doc-scaffold]
agents:
- docs-manager
- spec-builder
- frontend-expert
- backend-expert
freedom_level: high
context7_references:
- url: "https://www.typescriptlang.org/docs/handbook/"
topic: "TypeScript Documentation Pattern"
- url: "https://github.com/prettier/prettier"
topic: "Code Formatting Standards"