Publish Claude Code Skills to GitHub with proper structure, privacy checks, and bilingual documentation. Use when user wants to "publish a skill", "share a skill", "release a skill to GitHub", or asks about skill distribution.
/plugin marketplace add wshuyi/skill-publisher-skill/plugin install wshuyi-skill-publisher@wshuyi/skill-publisher-skillThis skill inherits all available tools. When active, it can use any tool Claude has access to.
scripts/check_privacy.pytemplates/LICENSE-MIT.templatetemplates/README.md.templatetemplates/README_CN.md.templatetemplates/gitignore.templatetemplates/plugin.json.template帮助用户将 Claude Code Skill 发布到 GitHub,支持 Git Clone 和插件市场两种安装方式。
[1] 定位 Skill 源文件
↓
[2] 隐私安全检查(关键!)
↓
[3] 收集用户信息(GitHub 用户名、许可证等)
↓
[4] 创建项目结构
↓
[5] 生成配置文件和文档
↓
[6] 初始化 Git 并推送
↓
[7] 输出安装说明
用户可能提供:
~/.claude/skills/ 下查找# 列出用户的所有 Skills
ls -la ~/.claude/skills/
确认 Skill 包含必要文件:
SKILL.md(必须)scripts/(可选)发布前必须检查所有文件,查找以下敏感信息:
python ~/.claude/skills/skill-publisher/scripts/check_privacy.py /path/to/skill
| 类型 | 示例 | 处理方式 |
|---|---|---|
| API 密钥 | sk-xxx, api_key=xxx | 删除或用占位符替换 |
| OAuth Token | oauth_token: xxx | 删除,绝对不能提交 |
| 个人路径 | /Users/username/ | 替换为 ~/ 或 /path/to/ |
| 邮箱地址 | user@example.com | 确认是否需要公开 |
| 用户名 | 硬编码的用户名 | 使用通用占位符 |
| 密码 | 任何明文密码 | 删除 |
教训:曾经在读取 ~/.config/gh/hosts.yml 时暴露了 GitHub token。任何配置文件都要先检查内容再决定是否读取!
通过 AskUserQuestion 收集:
~/Projects、~/Developer 或其他{skill-name}/
├── .claude-plugin/
│ └── plugin.json # 插件配置(支持市场安装)
├── skills/
│ └── {skill-name}/
│ ├── SKILL.md # 核心指令(从源复制)
│ └── scripts/ # 脚本文件(如有)
├── docs/
│ └── GUIDE.md # 详细使用指南(可选)
├── .gitignore
├── LICENSE
├── README.md # 英文说明
└── README_CN.md # 中文说明
# 创建目录结构
mkdir -p /path/to/project/.claude-plugin
mkdir -p /path/to/project/skills/{skill-name}/scripts
mkdir -p /path/to/project/docs
# 复制 Skill 文件
cp -r ~/.claude/skills/{skill-name}/* /path/to/project/skills/{skill-name}/
使用模板 ~/.claude/skills/skill-publisher/templates/plugin.json.template:
{
"name": "{skill-name}",
"version": "1.0.0",
"description": "{description}",
"author": {
"name": "{github-username}"
},
"repository": "https://github.com/{github-username}/{repo-name}",
"license": "{license}",
"keywords": ["{keyword1}", "{keyword2}"],
"platforms": ["macos"]
}
必须包含以下章节:
使用模板:~/.claude/skills/skill-publisher/templates/README.md.template
与英文版结构相同,内容翻译为中文。
顶部添加语言切换链接:
[English](README.md) | [中文](README_CN.md)
根据用户选择生成:
~/.claude/skills/skill-publisher/templates/LICENSE-MIT.template~/.claude/skills/skill-publisher/templates/LICENSE-APACHE.template~/.claude/skills/skill-publisher/templates/LICENSE-GPL.template# Python
__pycache__/
*.py[cod]
.venv/
venv/
# macOS
.DS_Store
# Temp
*.tmp
/tmp/
which gh || echo "gh not installed"
如未安装,提示用户:
brew install gh
gh auth status
如未登录,提示用户:
gh auth login
cd /path/to/project
# 初始化 Git
git init
git branch -m main # 使用 main 而非 master
# 添加所有文件
git add .
# 提交(使用 HEREDOC 保证格式)
git commit -m "$(cat <<'EOF'
Initial release: {Skill Name}
Features:
- Feature 1
- Feature 2
- Feature 3
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
EOF
)"
# 创建 GitHub 仓库并推送
gh repo create {repo-name} --public --source=. --remote=origin --push \
--description "{short description}"
发布完成后,输出以下信息:
✅ Skill 发布成功!
📦 仓库地址:https://github.com/{username}/{repo-name}
📥 安装方式:
方式 1:Git Clone
git clone https://github.com/{username}/{repo-name}.git
cp -r {repo-name}/skills/{skill-name} ~/.claude/skills/
方式 2:插件市场
/plugin marketplace add {username}/{repo-name}
/plugin install {skill-name}@{username}/{repo-name}
/Users/wsy/ 应替换为 ~/main 而非 master# 检查隐私
python ~/.claude/skills/skill-publisher/scripts/check_privacy.py /path/to/skill
# 一键发布(需要先收集信息)
# 使用本 Skill 的交互式流程
~/.claude/skills/skill-publisher/templates/~/.claude/skills/skill-publisher/scripts/check_privacy.pyCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.