$npx -y skills add JimLiu/baoyu-design --skill release-skillsUniversal release workflow. Auto-detects version files and changelogs. Supports Node.js, Python, Rust, Claude Plugin, GitHub Releases, annotated tags, historical release backfill, and generic projects. Use when user says "release", "发布", "new version", "bump version", "push", "推送
| 1 | # Release Skills |
| 2 | |
| 3 | Universal release workflow supporting any project type with multi-language changelog. |
| 4 | |
| 5 | ## User Input Tools |
| 6 | |
| 7 | When this skill prompts the user, follow this tool-selection rule (priority order): |
| 8 | |
| 9 | 1. **Prefer built-in user-input tools** exposed by the current agent runtime — e.g., `AskUserQuestion`, `request_user_input`, `clarify`, `ask_user`, or any equivalent. |
| 10 | 2. **Fallback**: if no such tool exists, emit a numbered plain-text message and ask the user to reply with the chosen number/answer for each question. |
| 11 | 3. **Batching**: if the tool supports multiple questions per call, combine all applicable questions into a single call; if only single-question, ask them one at a time in priority order. |
| 12 | |
| 13 | Concrete `AskUserQuestion` references below are examples — substitute the local equivalent in other runtimes. |
| 14 | |
| 15 | ## Quick Start |
| 16 | |
| 17 | Just run `/release-skills` - auto-detects your project configuration. |
| 18 | |
| 19 | ## Supported Projects |
| 20 | |
| 21 | | Project Type | Version File | Auto-Detected | |
| 22 | |--------------|--------------|---------------| |
| 23 | | Node.js | package.json | ✓ | |
| 24 | | Python | pyproject.toml | ✓ | |
| 25 | | Rust | Cargo.toml | ✓ | |
| 26 | | Claude Plugin | marketplace.json | ✓ | |
| 27 | | Generic | VERSION / version.txt | ✓ | |
| 28 | |
| 29 | ## Options |
| 30 | |
| 31 | | Flag | Description | |
| 32 | |------|-------------| |
| 33 | | `--dry-run` | Preview changes without executing | |
| 34 | | `--major` | Force major version bump | |
| 35 | | `--minor` | Force minor version bump | |
| 36 | | `--patch` | Force patch version bump | |
| 37 | | `--backfill-releases` | Create missing GitHub Releases for existing tags from changelog sections | |
| 38 | |
| 39 | ## Workflow |
| 40 | |
| 41 | ### Step 1: Detect Project Configuration |
| 42 | |
| 43 | 1. Check for `.releaserc.yml` (optional config override) |
| 44 | - If present, inspect whether it defines release hooks |
| 45 | 2. Auto-detect version file by scanning (priority order): |
| 46 | - `package.json` (Node.js) |
| 47 | - `pyproject.toml` (Python) |
| 48 | - `Cargo.toml` (Rust) |
| 49 | - `marketplace.json` or `.claude-plugin/marketplace.json` (Claude Plugin) |
| 50 | - `VERSION` or `version.txt` (Generic) |
| 51 | 3. Scan for changelog files using glob patterns: |
| 52 | - `CHANGELOG*.md` |
| 53 | - `HISTORY*.md` |
| 54 | - `CHANGES*.md` |
| 55 | 4. Identify language of each changelog by filename suffix |
| 56 | 5. Detect GitHub release support: |
| 57 | - Check whether `origin` points to GitHub |
| 58 | - Check whether `gh` is installed and authenticated |
| 59 | - Check existing releases with `gh release list --limit 5` when available |
| 60 | 6. Display detected configuration |
| 61 | |
| 62 | **Project Hook Contract**: |
| 63 | |
| 64 | If `.releaserc.yml` defines `release.hooks`, keep the release workflow generic and delegate project-specific packaging/publishing to those hooks. |
| 65 | |
| 66 | Supported hooks: |
| 67 | |
| 68 | | Hook | Purpose | Expected Responsibility | |
| 69 | |------|---------|-------------------------| |
| 70 | | `prepare_artifact` | Make one target releasable | Validate the target is self-contained, sync/embed local dependencies, optionally stage extra files | |
| 71 | | `publish_artifact` | Publish one releasable target | Upload the prepared target (or a staged directory if the project uses one), attach version/changelog/tags | |
| 72 | |
| 73 | Supported placeholders: |
| 74 | |
| 75 | | Placeholder | Meaning | |
| 76 | |-------------|---------| |
| 77 | | `{project_root}` | Absolute path to repository root | |
| 78 | | `{target}` | Absolute path to the module/skill being released | |
| 79 | | `{artifact_dir}` | Absolute path to a temporary staging directory for this target, when the project uses one | |
| 80 | | `{version}` | Version selected by the release workflow | |
| 81 | | `{dry_run}` | `true` or `false` | |
| 82 | | `{release_notes_file}` | Absolute path to a UTF-8 file containing release notes/changelog text | |
| 83 | |
| 84 | Execution rules: |
| 85 | - Keep the skill generic: do not hardcode registry/package-manager/project layout details into this SKILL. |
| 86 | - If `prepare_artifact` exists, run it once per target before publish-related checks that need the final releasable target state. |
| 87 | - Write release notes to a temp file and pass that file path to `publish_artifact`; do not inline multiline changelog text into shell commands. |
| 88 | - If hooks are absent, fall back to the default project-agnostic release workflow. |
| 89 | |
| 90 | **Language Detection Rules**: |
| 91 | |
| 92 | Changelog files follow the pattern `CHANGELOG_{LANG}.md` or `CHANGELOG.{lang}.md`, where `{lang}` / `{LANG}` is a language or region code. |
| 93 | |
| 94 | | Pattern | Example | Language | |
| 95 | |---------|---------|----------| |
| 96 | | No suffix | `CHANGELOG.md` | en (default) | |
| 97 | | `_{LANG}` (uppercase) | `CHANGELOG_CN.md`, `CHANGELOG_JP.md` | Corresponding language | |
| 98 | | `.{lang}` (lowercase) | `CHANGELOG.zh.md`, `CHANGELOG.ja.md` | Corresponding language | |
| 99 | | `.{lang-region}` | `CHANGELOG.zh-CN.md` | Corresponding region variant | |
| 100 | |
| 101 | Common language codes: `zh` (Chinese), `ja` (Japanese), `ko` (Korean), `de` (German), `fr` (French), `es` (S |