documentation-update by geoffjay/claude-plugins
npx skills add https://github.com/geoffjay/claude-plugins --skill documentation-update此技能通过读取市场目录并应用 Jinja2 模板,自动重新生成 docs/ 目录中的文档文件。
通过以下方式维护同步的文档:
在以下情况下使用此技能:
此技能生成四个主要的文档文件:
所有插件中所有智能体的完整参考:
所有技能的目录,包含渐进式披露细节:
市场中所有插件的目录:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
使用指南和命令参考:
模板使用 Jinja2 语法存储在 assets/ 中:
assets/
├── agents.md.j2
├── agent-skills.md.j2
├── plugins.md.j2
└── usage.md.j2
所有模板接收以下上下文:
{
"marketplace": {
"name": "marketplace-name",
"owner": {...},
"metadata": {...},
"plugins": [...]
},
"plugins_by_category": {
"category-name": [plugin1, plugin2, ...]
},
"all_agents": [
{
"plugin": "plugin-name",
"name": "agent-name",
"file": "agent-file.md",
"description": "...",
"model": "..."
}
],
"all_skills": [
{
"plugin": "plugin-name",
"name": "skill-name",
"path": "skill-path",
"description": "..."
}
],
"all_commands": [
{
"plugin": "plugin-name",
"name": "command-name",
"file": "command-file.md",
"description": "..."
}
],
"stats": {
"total_plugins": 10,
"total_agents": 25,
"total_commands": 15,
"total_skills": 30
}
}
该技能包含一个 Python 脚本 doc_generator.py,它:
加载 marketplace.json
扫描插件文件
准备模板上下文
渲染模板
# 生成所有文档文件
python doc_generator.py
# 仅生成特定文件
python doc_generator.py --file agents
# 试运行(显示输出但不写入)
python doc_generator.py --dry-run
# 指定自定义路径
python doc_generator.py \
--marketplace .claude-plugin/marketplace.json \
--templates plugins/claude-plugin/skills/documentation-update/assets \
--output docs
/claude-plugin:create 和 /claude-plugin:update 命令应在市场更新后自动调用此技能:
1. 插件操作完成(添加/更新/移除)
2. Marketplace.json 被更新
3. 调用 documentation-update 技能
4. 文档文件重新生成
5. 更改准备提交
# 创建/更新插件后
print("更新文档...")
# 运行文档生成器
import subprocess
result = subprocess.run(
["python", "plugins/claude-plugin/skills/documentation-update/doc_generator.py"],
capture_output=True,
text=True
)
if result.returncode == 0:
print("✓ 文档已更新")
else:
print(f"❌ 文档更新失败: {result.stderr}")
# Agent Reference
This document lists all agents available across plugins in the marketplace.
{% for category, plugins in plugins_by_category.items() %}
## {{ category|title }}
{% for plugin in plugins %}
### {{ plugin.name }}
{{ plugin.description }}
**Agents:**
{% for agent in all_agents %}
{% if agent.plugin == plugin.name %}
- **{{ agent.name }}** (`{{ agent.model }}`)
- {{ agent.description }}
- File: `plugins/{{ plugin.name }}/agents/{{ agent.file }}`
{% endif %}
{% endfor %}
{% endfor %}
{% endfor %}
---
*Last updated: {{ now }}*
*Total agents: {{ stats.total_agents }}*
# Agent Skills Reference
This document catalogs all skills with progressive disclosure patterns.
{% for plugin in marketplace.plugins %}
## {{ plugin.name }}
{{ plugin.description }}
**Skills:**
{% for skill in all_skills %}
{% if skill.plugin == plugin.name %}
### {{ skill.name }}
{{ skill.description }}
- **Location:** `plugins/{{ plugin.name }}/skills/{{ skill.path }}/`
- **Structure:** SKILL.md + assets/ + references/
{% endif %}
{% endfor %}
{% endfor %}
---
*Last updated: {{ now }}*
*Total skills: {{ stats.total_skills }}*
Error: Marketplace file not found: .claude-plugin/marketplace.json
Suggestion: Ensure marketplace.json exists
Error: Template file not found: assets/agents.md.j2
Suggestion: Ensure all template files exist in assets/
Warning: Plugin 'plugin-name' missing components
Suggestion: Verify plugin has agents or commands
Warning: Could not parse frontmatter in agents/agent-name.md
Suggestion: Check YAML frontmatter syntax
变更后始终重新生成
生成前验证
审查生成的输出
模板维护
版本控制
要向模板添加新部分:
修改模板
## New Section
{% for plugin in marketplace.plugins %}
### {{ plugin.name }}
[Your content here]
{% endfor %}
更新上下文(如果需要)
测试输出
要添加新的文档文件:
创建模板
assets/newdoc.md.j2更新脚本
测试生成
plugins/claude-plugin/skills/documentation-update/
├── SKILL.md # This file
├── doc_generator.py # Python implementation
├── assets/ # Jinja2 templates
│ ├── agents.md.j2
│ ├── agent-skills.md.j2
│ ├── plugins.md.j2
│ └── usage.md.j2
└── references/ # Optional examples
└── template-examples.md
.claude-plugin/marketplace.jsondocs/ 目录的写入权限运行此技能后:
当市场结构变更时:
评估影响
更新模板
更新脚本
验证输出
该技能生成全面、格式良好的文档:
所有文件包括:
每周安装量
1.4K
仓库
GitHub 星标数
7
首次出现
Jan 24, 2026
安全审计
安装于
opencode1.2K
gemini-cli1.2K
codex1.2K
github-copilot1.2K
kimi-cli1.1K
amp1.1K
This skill automatically regenerates documentation files in the docs/ directory by reading the marketplace catalog and applying Jinja2 templates.
Maintain synchronized documentation by:
Use this skill when:
This skill generates four main documentation files:
Complete reference of all agents across all plugins:
Catalog of all skills with progressive disclosure details:
Directory of all plugins in the marketplace:
Usage guide and command reference:
Templates are stored in assets/ using Jinja2 syntax:
assets/
├── agents.md.j2
├── agent-skills.md.j2
├── plugins.md.j2
└── usage.md.j2
All templates receive the following context:
{
"marketplace": {
"name": "marketplace-name",
"owner": {...},
"metadata": {...},
"plugins": [...]
},
"plugins_by_category": {
"category-name": [plugin1, plugin2, ...]
},
"all_agents": [
{
"plugin": "plugin-name",
"name": "agent-name",
"file": "agent-file.md",
"description": "...",
"model": "..."
}
],
"all_skills": [
{
"plugin": "plugin-name",
"name": "skill-name",
"path": "skill-path",
"description": "..."
}
],
"all_commands": [
{
"plugin": "plugin-name",
"name": "command-name",
"file": "command-file.md",
"description": "..."
}
],
"stats": {
"total_plugins": 10,
"total_agents": 25,
"total_commands": 15,
"total_skills": 30
}
}
The skill includes a Python script doc_generator.py that:
Loads marketplace.json
Scans Plugin Files
Prepares Template Context
Renders Templates
# Generate all documentation files
python doc_generator.py
# Generate specific file only
python doc_generator.py --file agents
# Dry run (show output without writing)
python doc_generator.py --dry-run
# Specify custom paths
python doc_generator.py \
--marketplace .claude-plugin/marketplace.json \
--templates plugins/claude-plugin/skills/documentation-update/assets \
--output docs
The /claude-plugin:create and /claude-plugin:update commands should invoke this skill automatically after marketplace updates:
1. Plugin operation completes (add/update/remove)
2. Marketplace.json is updated
3. Invoke documentation-update skill
4. Documentation files regenerated
5. Changes ready to commit
# After creating/updating plugin
print("Updating documentation...")
# Run doc generator
import subprocess
result = subprocess.run(
["python", "plugins/claude-plugin/skills/documentation-update/doc_generator.py"],
capture_output=True,
text=True
)
if result.returncode == 0:
print("✓ Documentation updated")
else:
print(f"❌ Documentation update failed: {result.stderr}")
# Agent Reference
This document lists all agents available across plugins in the marketplace.
{% for category, plugins in plugins_by_category.items() %}
## {{ category|title }}
{% for plugin in plugins %}
### {{ plugin.name }}
{{ plugin.description }}
**Agents:**
{% for agent in all_agents %}
{% if agent.plugin == plugin.name %}
- **{{ agent.name }}** (`{{ agent.model }}`)
- {{ agent.description }}
- File: `plugins/{{ plugin.name }}/agents/{{ agent.file }}`
{% endif %}
{% endfor %}
{% endfor %}
{% endfor %}
---
*Last updated: {{ now }}*
*Total agents: {{ stats.total_agents }}*
# Agent Skills Reference
This document catalogs all skills with progressive disclosure patterns.
{% for plugin in marketplace.plugins %}
## {{ plugin.name }}
{{ plugin.description }}
**Skills:**
{% for skill in all_skills %}
{% if skill.plugin == plugin.name %}
### {{ skill.name }}
{{ skill.description }}
- **Location:** `plugins/{{ plugin.name }}/skills/{{ skill.path }}/`
- **Structure:** SKILL.md + assets/ + references/
{% endif %}
{% endfor %}
{% endfor %}
---
*Last updated: {{ now }}*
*Total skills: {{ stats.total_skills }}*
Error: Marketplace file not found: .claude-plugin/marketplace.json
Suggestion: Ensure marketplace.json exists
Error: Template file not found: assets/agents.md.j2
Suggestion: Ensure all template files exist in assets/
Warning: Plugin 'plugin-name' missing components
Suggestion: Verify plugin has agents or commands
Warning: Could not parse frontmatter in agents/agent-name.md
Suggestion: Check YAML frontmatter syntax
Always Regenerate After Changes
Validate Before Generation
Review Generated Output
Template Maintenance
Version Control
To add a new section to a template:
Modify Template
## New Section
{% for plugin in marketplace.plugins %}
### {{ plugin.name }}
[Your content here]
{% endfor %}
Update Context (if needed)
Test Output
To add a new documentation file:
Create Template
assets/newdoc.md.j2Update Script
Test Generation
plugins/claude-plugin/skills/documentation-update/
├── SKILL.md # This file
├── doc_generator.py # Python implementation
├── assets/ # Jinja2 templates
│ ├── agents.md.j2
│ ├── agent-skills.md.j2
│ ├── plugins.md.j2
│ └── usage.md.j2
└── references/ # Optional examples
└── template-examples.md
.claude-plugin/marketplace.jsondocs/ directoryAfter running this skill:
When marketplace structure changes:
Assess Impact
Update Templates
Update Script
Validate Output
The skill generates comprehensive, well-formatted documentation:
All files include:
Weekly Installs
1.4K
Repository
GitHub Stars
7
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode1.2K
gemini-cli1.2K
codex1.2K
github-copilot1.2K
kimi-cli1.1K
amp1.1K
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
102,200 周安装