skill-publish
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill Publish
技能发布
Publish Claude Code plugins and standalone Agent Skills with proper versioning, changelog management, and git workflow.
通过规范的版本控制、变更日志管理和Git工作流,发布Claude Code插件和独立Agent Skills。
Determine Publish Type
确定发布类型
Before starting, identify the publish type based on project structure:
| Indicator | Type |
|---|---|
| Claude Code Plugin |
Standalone | Standalone Agent Skill |
Claude Code plugins publish by pushing to GitHub — the marketplace picks up the latest commit on the default branch automatically. No registry upload or OTP is needed.
Standalone Agent Skills follow the agentskills.io specification and distribute as directories containing .
SKILL.md开始前,请根据项目结构确定发布类型:
| 判定指标 | 类型 |
|---|---|
存在 | Claude Code 插件 |
独立的 | 独立Agent Skill |
Claude Code插件通过推送到GitHub发布——市场会自动获取默认分支的最新提交。无需注册上传或一次性密码(OTP)。
独立Agent Skills遵循agentskills.io规范,以包含的目录形式分发。
SKILL.mdClaude Code Plugin Workflow
Claude Code插件工作流
1. Check Current State
1. 检查当前状态
bash
undefinedbash
undefinedRead current version from manifest
Read current version from manifest
cat .claude-plugin/plugin.json | grep '"version"'
cat .claude-plugin/plugin.json | grep '"version"'
Check git is clean and up to date
Check git is clean and up to date
git fetch origin && git status
git fetch origin && git status
Review commits since last version bump
Review commits since last version bump
git log --oneline $(git describe --tags --abbrev=0 2>/dev/null || echo HEAD~10)..HEAD
undefinedgit log --oneline $(git describe --tags --abbrev=0 2>/dev/null || echo HEAD~10)..HEAD
undefined2. Bump Version in plugin.json
2. 升级plugin.json中的版本
Edit to increment the version field. For early-stage plugins (0.x.x or 1.0.x), bump the patch version unless the user requests otherwise:
.claude-plugin/plugin.json0.1.6 → 0.1.7
1.0.23 → 1.0.24编辑以递增版本号。对于早期阶段的插件(0.x.x或1.0.x版本),除非用户另有要求,否则升级补丁版本:
.claude-plugin/plugin.json0.1.6 → 0.1.7
1.0.23 → 1.0.243. Update CHANGELOG.md
3. 更新CHANGELOG.md
If a changelog exists, add an entry following the existing format:
markdown
undefined如果存在变更日志,请按照现有格式添加条目:
markdown
undefined[X.X.X] - YYYY-MM-DD
[X.X.X] - YYYY-MM-DD
Added
Added
- New features
- New features
Changed
Changed
- Changes to existing functionality
- Changes to existing functionality
Fixed
Fixed
- Bug fixes
Summarize commits since the last release into appropriate categories.- Bug fixes
将上次发布以来的提交总结到相应类别中。4. Validate Plugin Structure
4. 验证插件结构
Before publishing, verify the plugin is well-formed:
- has required
.claude-plugin/plugin.jsonfieldname - Component directories (commands/, agents/, skills/, hooks/) contain valid files
- Skills have with valid YAML frontmatter (name + description)
SKILL.md - Agents and commands have files with YAML frontmatter
.md - Referenced files and scripts exist
发布前,请验证插件格式正确:
- 包含必填的
.claude-plugin/plugin.json字段name - 组件目录(commands/, agents/, skills/, hooks/)包含有效文件
- 技能包含带有有效YAML前置元数据(名称+描述)的
SKILL.md - Agent和命令包含带有YAML前置元数据的文件
.md - 引用的文件和脚本均存在
5. Commit and Push
5. 提交并推送
Critical: Pushing to the default branch IS publishing. The Claude Code plugin marketplace automatically picks up the latest commit.
bash
git add .claude-plugin/plugin.json CHANGELOG.md关键注意:推送到默认分支即完成发布。 Claude Code插件市场会自动获取最新提交。
bash
git add .claude-plugin/plugin.json CHANGELOG.mdAlso stage any changed skill/agent/command files
Also stage any changed skill/agent/command files
git add -A
git commit -m "Release vX.X.X"
git push origin <default-branch>
undefinedgit add -A
git commit -m "Release vX.X.X"
git push origin <default-branch>
undefined6. Verify Publication
6. 验证发布结果
After pushing, verify the plugin update is available:
bash
CLAUDECODE= claude plugin update <plugin-name>@<publisher>The prefix is required to avoid nested session errors when running from within Claude Code.
CLAUDECODE=Note: The marketplace may take a few minutes to reflect the new version.
推送完成后,验证插件更新是否可用:
bash
CLAUDECODE= claude plugin update <plugin-name>@<publisher>从Claude Code内部运行时,必须加上前缀以避免嵌套会话错误。
CLAUDECODE=注意: 市场可能需要几分钟时间来同步新版本。
7. Update Downstream References
7. 更新下游引用
If the plugin version is tracked elsewhere (e.g., a marketplace page, documentation, or ), update those references to match the new version.
lib/plugins.ts如果插件版本在其他地方被跟踪(例如市场页面、文档或),请更新这些引用以匹配新版本。
lib/plugins.tsStandalone Agent Skill Workflow
独立Agent Skill工作流
For skills not bundled in a Claude Code plugin, follow the agentskills.io specification.
对于未捆绑在Claude Code插件中的技能,请遵循agentskills.io规范。
1. Validate SKILL.md
1. 验证SKILL.md
Verify frontmatter meets the spec. For details, consult .
references/agentskills-spec.mdRequired fields:
- : 1-64 chars, lowercase alphanumeric + hyphens, must match directory name
name - : 1-1024 chars, describes what and when
description
Optional fields:
- ,
license,compatibility,metadataallowed-tools
验证前置元数据是否符合规范。详情请参考。
references/agentskills-spec.md必填字段:
- :1-64字符,小写字母数字+连字符,必须与目录名称匹配
name - :1-1024字符,描述技能用途和适用场景
description
可选字段:
- 、
license、compatibility、metadataallowed-tools
2. Validate Structure
2. 验证结构
skill-name/
├── SKILL.md # Required
├── scripts/ # Optional executables
├── references/ # Optional docs loaded on demand
└── assets/ # Optional static resourcesskill-name/
├── SKILL.md # Required
├── scripts/ # Optional executables
├── references/ # Optional docs loaded on demand
└── assets/ # Optional static resources3. Version via Metadata
3. 通过元数据管理版本
Track version in the frontmatter field:
metadatayaml
metadata:
author: org-name
version: "1.1.0"在前置元数据的字段中跟踪版本:
metadatayaml
metadata:
author: org-name
version: "1.1.0"4. Distribute
4. 分发
Standalone skills distribute as directories. Common methods:
- Git repository (push to GitHub)
- Archive (zip the skill directory)
- Package registry (if applicable)
独立技能以目录形式分发。常见方式:
- Git仓库(推送到GitHub)
- 压缩包(将技能目录打包为ZIP)
- 包注册表(如适用)
Common Issues
常见问题
Plugin Not Updating
插件未更新
If does not pick up changes:
claude plugin update- Verify the push landed on the default branch (usually or
main)master - Check that is valid JSON
.claude-plugin/plugin.json - Wait a few minutes for marketplace propagation
如果未检测到变更:
claude plugin update- 验证推送是否已到达默认分支(通常为或
main)master - 检查是否为有效的JSON格式
.claude-plugin/plugin.json - 等待几分钟,给市场同步时间
Version Already Exists
版本已存在
If the version string was already used in a previous commit, bump again to the next patch before pushing.
如果版本字符串已在之前的提交中使用,请先升级到下一个补丁版本再推送。
Nested Session Error
嵌套会话错误
Always prefix CLI commands with when running from within an active Claude Code session to avoid the "nested session" error.
CLAUDECODE=从活跃的Claude Code会话中运行CLI命令时,必须始终添加前缀以避免“嵌套会话”错误。
CLAUDECODE=Additional Resources
额外资源
Reference Files
参考文件
- — Complete agentskills.io specification summary for standalone skills
references/agentskills-spec.md
- — 独立技能的完整agentskills.io规范摘要
references/agentskills-spec.md