From epieczko-betty
**generate.docs** automatically generates or updates SKILL.md documentation from skill.yaml manifest files, ensuring consistent and comprehensive documentation across all Betty skills.
npx claudepluginhub joshuarweaver/cascade-code-general-misc-1 --plugin epieczko-bettyThis skill uses the workspace's default tool permissions.
**generate.docs** automatically generates or updates SKILL.md documentation from skill.yaml manifest files, ensuring consistent and comprehensive documentation across all Betty skills.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
generate.docs automatically generates or updates SKILL.md documentation from skill.yaml manifest files, ensuring consistent and comprehensive documentation across all Betty skills.
Eliminate manual documentation drift by:
This skill helps maintain high-quality documentation by:
python skills/generate.docs/generate_docs.py <manifest_path> [options]
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
manifest_path | string | Yes | - | Path to skill.yaml manifest file to generate documentation from |
--overwrite | boolean | No | false | Overwrite existing SKILL.md file if it exists |
--dry-run | boolean | No | false | Preview the generated documentation without writing to disk |
--output-path | string | No | - | Custom output path for SKILL.md (defaults to same directory as manifest) |
| Output | Type | Description |
|---|---|---|
doc_path | string | Path to generated or updated SKILL.md file |
doc_content | string | Generated documentation content |
dry_run_preview | string | Preview of documentation (when dry_run=true) |
python skills/generate.docs/generate_docs.py skills/api.define/skill.yaml
Output: Creates skills/api.define/SKILL.md with comprehensive documentation
Result:
{
"status": "success",
"data": {
"doc_path": "skills/api.define/SKILL.md",
"skill_name": "api.define",
"dry_run": false
}
}
python skills/generate.docs/generate_docs.py \
skills/hook.define/skill.yaml \
--dry-run=true
Result: Prints formatted documentation preview to console without creating any files
================================================================================
DRY RUN PREVIEW
================================================================================
# hook.define
## Overview
...
================================================================================
python skills/generate.docs/generate_docs.py \
skills/api.validate/skill.yaml \
--overwrite=true
Result: Replaces existing skills/api.validate/SKILL.md with newly generated version
python skills/generate.docs/generate_docs.py \
skills/workflow.compose/skill.yaml \
--output-path=docs/skills/workflow-compose.md
Result: Generates documentation at docs/skills/workflow-compose.md instead of default location
# Generate docs for all skills in the repository
for manifest in skills/*/skill.yaml; do
echo "Generating docs for $manifest..."
python skills/generate.docs/generate_docs.py "$manifest" --overwrite=true
done
Result: Updates documentation for all skills, ensuring consistency across the entire framework
The generated SKILL.md includes the following sections:
# workflows/maintain_docs.yaml
name: Documentation Maintenance
description: Keep all skill documentation up to date
steps:
- name: Update skill docs
skill: generate.docs
args:
- "${skill_manifest_path}"
- "--overwrite=true"
- name: Commit changes
command: git add ${doc_path} && git commit -m "docs: update skill documentation"
When creating a new skill, automatically generate its documentation:
# Create new skill
python skills/skill.create/skill_create.py my.new.skill
# Generate documentation
python skills/generate.docs/generate_docs.py \
skills/my.new.skill/skill.yaml
Add to your CI pipeline to ensure documentation stays in sync:
# .github/workflows/docs.yml
- name: Check documentation is up to date
run: |
for manifest in skills/*/skill.yaml; do
python skills/generate.docs/generate_docs.py "$manifest" --dry-run=true > /tmp/preview.md
skill_dir=$(dirname "$manifest")
if ! diff -q "$skill_dir/SKILL.md" /tmp/preview.md; then
echo "Documentation out of sync for $manifest"
exit 1
fi
done
Automatically regenerate docs when skill.yaml is modified:
python skills/hook.define/hook_define.py \
on_file_save \
"python skills/generate.docs/generate_docs.py {file_path} --overwrite=true" \
--pattern="*/skill.yaml" \
--blocking=false \
--description="Auto-regenerate SKILL.md when skill.yaml changes"
$ python skills/generate.docs/generate_docs.py nonexistent/skill.yaml
Error:
{
"status": "error",
"error": "Manifest file not found: nonexistent/skill.yaml"
}
$ python skills/generate.docs/generate_docs.py skills/api.define/skill.yaml
Error:
{
"status": "error",
"error": "SKILL.md already exists at skills/api.define/SKILL.md. Use --overwrite=true to replace it or --dry-run=true to preview."
}
$ python skills/generate.docs/generate_docs.py broken-skill.yaml
Error:
{
"status": "error",
"error": "Failed to parse YAML manifest: ..."
}
After generation, you can manually enhance the documentation:
Note: Manual changes will be overwritten if you regenerate with --overwrite=true. Consider adding custom sections to the generator or maintaining separate docs for detailed content.
PyYAML: Required for YAML manifest parsing
pip install pyyaml
context.schema: For validation rule definitions
SKILL.md - Generated skill documentation (in same directory as skill.yaml by default)0.1.0 - Initial implementation with manifest-to-markdown generation