---
name: release
description: oh-my-claudecode 的自动化发布工作流
level: 3
---

# Release Skill

自动化执行 oh-my-claudecode 的发布流程。

## Usage

```
/oh-my-claudecode:release <version>
```

示例：`/oh-my-claudecode:release 2.4.0`、`/oh-my-claudecode:release patch` 或 `/oh-my-claudecode:release minor`

## Release Checklist

按顺序执行以下步骤：

### 1. Version Bump
更新以下所有位置中的版本号：
- `package.json`
- `src/installer/index.ts`（`VERSION` 常量）
- `src/__tests__/installer.test.ts`（预期版本）
- `.claude-plugin/plugin.json`
- `.claude-plugin/marketplace.json`（`plugins[0].version` 和根级 `version`）
- `docs/CLAUDE.md`（`<!-- OMC:VERSION:X.Y.Z -->` 标记）
- `README.md`（版本徽章和标题）

### 2. Run Tests
```bash
npm run test:run
```
继续之前，必须确保全部 231+ 个测试通过。

### 3. Commit Version Bump
```bash
git add -A
git commit -m "chore: Bump version to <version>"
```

### 4. Create & Push Tag
```bash
git tag v<version>
git push origin main
git push origin v<version>
```

### 5. Publish to npm
```bash
npm publish --access public
```

### 6. Create GitHub Release
```bash
gh release create v<version> --title "v<version> - <title>" --notes "<release notes>"
```

### 7. Verify
- [ ] npm: https://www.npmjs.com/package/oh-my-claudecode
- [ ] GitHub: https://github.com/Yeachan-Heo/oh-my-claudecode/releases

## Version Files Reference

| File | Field/Line |
|------|------------|
| `package.json` | `"version": "X.Y.Z"` |
| `src/installer/index.ts` | `export const VERSION = 'X.Y.Z'` |
| `src/__tests__/installer.test.ts` | `expect(VERSION).toBe('X.Y.Z')` |
| `.claude-plugin/plugin.json` | `"version": "X.Y.Z"` |
| `.claude-plugin/marketplace.json` | `plugins[0].version` + 根级 `version` |
| `docs/CLAUDE.md` | `<!-- OMC:VERSION:X.Y.Z -->` |
| `README.md` | 标题 + 版本徽章 |

## Semantic Versioning

- **patch** (X.Y.Z+1)：错误修复、小幅改进
- **minor** (X.Y+1.0)：新功能，向后兼容
- **major** (X+1.0.0)：破坏性变更

## Notes

- 发布前始终先运行测试
- 创建用于总结变更的发布说明
- 插件市场会从 GitHub Releases 自动同步
