← スキル一覧に戻る

generate-docstrings
by mvillmow
Training framework written in Mojo
⭐ 11🍴 4📅 2026年1月24日
SKILL.md
name: generate-docstrings description: "Create docstrings for functions and classes. Use when documenting code APIs." mcp_fallback: none category: generation tier: 2 user-invocable: false
Generate Docstrings
Write comprehensive docstrings for functions and classes following standard formats (Google, NumPy, reStructuredText).
When to Use
- Adding documentation to undocumented functions
- Improving code documentation completeness
- Ensuring consistent docstring format
- Supporting API documentation generation
Quick Reference
# Google-style docstring format
def matrix_multiply(a: ExTensor, b: ExTensor) -> ExTensor:
"""Multiply two matrices using optimized Mojo kernels.
Args:
a: First matrix (shape: m x n)
b: Second matrix (shape: n x k)
Returns:
Product matrix (shape: m x k)
Raises:
ValueError: If matrix dimensions don't align for multiplication
Example:
```mojo
>> a = ExTensor([[1, 2], [3, 4]], DType.float32)
>>> b = ExTensor([[1, 0], [0, 1]], DType.float32)
>>> c = matrix_multiply(a, b)
```
"""
...
Workflow
- Analyze function: Understand purpose, parameters, return value
- Choose format: Select docstring style (Google is recommended)
- Write summary: Clear one-line description
- Document parameters: Type, description, constraints
- Document return: Type and description of return value
- Add examples: Practical usage examples
Output Format
Docstring structure:
- One-line summary
- Extended description (if needed)
- Args section (parameter documentation)
- Returns section (return value documentation)
- Raises section (exceptions)
- Examples section (usage examples)
References
- See
generate-api-docsskill for API documentation generation - See Google Python Style Guide for docstring conventions
- See PEP 257 for Python docstring conventions
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です