用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/harlan-zw/harlan-agent-kit --skill release-notes命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | release-notes |
| description | Write release notes, changelogs, announcements, and upgrade guides for major or minor releases. |
| user_invocable | true |
| context | fork |
| argument-hint | [version] |
| effort | high |
Generate Nuxt-style release notes with highlights, categorized changelog, and LLM upgrade prompts for breaking changes.
Before writing a repository file, follow the worktree isolation contract. It provides the atomic live-agent claim used below.
An existing worktree alone does not prove another agent is active.
wt is the only worktree tool. Never run git worktree add, and never use a harness worktree option such as EnterWorktree or isolation: "worktree". Those write to .claude/worktrees/, which is banned. wt places every worktree at <parent>/<repo>.<branch-slug>.
Keep the primary checkout read only. Before writing, run wt list --format=json. Reuse the task's worktree with wt switch <branch>, or create one with wt switch --create <branch> --base <base>. Read its absolute path from the JSON, then pass that path as workdir to every later command. Never share a mutation worktree between tasks.
gh repo view --json nameWithOwner --jq '.nameWithOwner' 2>/dev/null || echo 'unknown'git tag --sort=-v:refname | head -10 | tr '\n' ', 'cat package.json 2>/dev/null | jq -r '.version // "unknown"'gh release view --json body --jq '.body' 2>/dev/null | head -40 || echo 'no prior releases'git tag --sort=-v:refname may interleave v1.2.0-beta.1 with stable tags. Filter with grep -v '\-' when needed.feat:, fix:, perf:, etc. prefixes. If commits are freeform, infer category from the diff: new files/exports = Enhancement, changed test assertions = Fix, package.json dep changes = Chore, etc.! suffix (feat!:, fix!:) AND BREAKING CHANGE: in commit bodies, not just type prefixes; devs forget the ! constantly, so cross-reference with the export diff (Step 1b) to catch unlabeled ones.git log only shows the merge author. Use gh pr list --search to find actual PR authors.Track release note history:
echo "$(date -I) VERSION TAG" >> "${CLAUDE_PLUGIN_DATA}/release-notes-history.log"
From the preprocessed state above, determine:
$ARGUMENTS if provided, otherwise from current version, otherwise askPREV_TAG..HEADRun IN PARALLEL:
# Full commit log with bodies (for BREAKING CHANGE detection)
git log PREV_TAG..HEAD --format='%H|%s|%b' --no-merges
# Stat summary
git log PREV_TAG..HEAD --stat --no-merges
# All PRs merged since last tag
gh pr list --state merged --search "merged:>=PREV_TAG_DATE" --limit 100 --json number,title,body,author,labels
# Breaking changes (! suffix or BREAKING CHANGE in body)
git log PREV_TAG..HEAD --format='%H %s' --no-merges | grep -E '!:|BREAKING CHANGE'
Commit messages routinely miss breaking changes. Diff the actual exports to catch unlabeled ones:
# Compare exports between tags (adapt paths to project structure)
# For packages with src/index.ts or similar entry point:
git diff PREV_TAG..HEAD -- src/index.ts src/exports.ts src/public.ts index.ts
# For Nuxt modules, also check runtime/ and composables/:
git diff PREV_TAG..HEAD -- src/runtime/ src/module.ts
# Check for removed or renamed exports
git diff PREV_TAG..HEAD -- '*.d.ts' | grep -E '^\-export'
Flag any removed exports, renamed functions, changed type signatures, or removed config options as potential breaking changes even if commits don't label them.
Analyze docs changes to enrich highlights and catch migration notes already written:
# Docs changes since last tag
git diff PREV_TAG..HEAD --stat -- docs/ README.md MIGRATION.md UPGRADING.md '*.md'
# Read any migration or upgrade docs that were added/modified
git diff PREV_TAG..HEAD --name-only -- docs/ '*.md' | grep -iE 'migrat|upgrad|breaking|changelog'
Read any modified migration docs in full. These carry context that commit messages lack and should inform both the Highlights narrative and the upgrade prompt.
Major dependency upgrades routinely introduce transitive breaking changes:
# Diff package.json dependencies
git diff PREV_TAG..HEAD -- package.json | grep -E '^\+.*"(dependencies|peerDependencies)"' -A 50 | grep -E '^\+\s+"'
If any dependency had a major version bump, note it as a potential source of breaking changes and check that dep's own changelog for migration notes.
A mislabeled breaking change is the costliest error in a release note: a missed one strands users on broken upgrades, a false one scares them off a safe bump. After steps 1a-1d produce a candidate breaking-change list, verify each one against the actual diff before it reaches the notes.
For a handful of candidates, verify inline. For 10+ (large release, 10+ changed exports), spawn a verifier per candidate — drive it with the Workflow tool as a parallel verify stage; this skill's instructions are the opt-in. Each verifier gets the candidate plus the relevant diff hunk and answers:
exports map)?Drop candidates the verifier clears as non-breaking; keep a one-line note of why, in case the user disagrees.
Compare the target version against findings:
0.x.y): minor bumps can contain breaking changes per semver spec, but still note them clearlyParse conventional commit prefixes into changelog sections. See references/changelog-categories.md for the full mapping.
Select 3-7 changes that deserve narrative treatment in the Highlights section (fewer if the release genuinely has fewer; do not pad). Criteria:
feat:)perf:)For each highlight, fetch the full PR body if not already available:
gh pr view NUMBER --json body,title --jq '.title + "\n" + .body'
Check the preprocessed "Prior release style" above. If the repo has existing GitHub releases, match that structure and tone. If no prior releases exist (or user requests it), follow the Nuxt release format. See references/nuxt-release-format.md for the exact structure.
Structure:
# vX.Y.Z
## 👀 Highlights
[1-2 sentence intro: what this release focuses on, tone should be enthusiastic but not breathless]
### EMOJI Feature Title
[2-3 sentences explaining the feature, why it matters, what it enables]
[Code example if applicable]
... repeat for each highlight ...
## ⚠️ Breaking Changes
[Only if breaking changes exist. List each with migration steps.]
## ✅ Upgrading
[Package manager commands + brief notes]
## 👉 Changelog
> [Compare link: PREV_TAG...vX.Y.Z](REPO_URL/compare/PREV_TAG...vX.Y.Z)
### 🚀 Enhancements
- Description of change ([#NUMBER](REPO_URL/pull/NUMBER))
### 🔥 Performance
...
### 🩹 Fixes
...
### 💅 Refactors
...
### 📖 Documentation
...
### 🏡 Chore
...
### ❤️ Contributors
[List of contributors]
/humanize-writing. The biggest wins for release notes: cut the over-explained takeaway ("this means users can now...") and use specific version numbers, PR links, and real benchmark figures instead of vague claims.If breaking changes exist, generate an upgrade prompt that helps users migrate. Read the template at ${CLAUDE_SKILL_DIR}/templates/upgrade-prompt.md.
The upgrade prompt should be:
Write the upgrade prompt to a standalone file:
echo "PROMPT_CONTENT" > upgrade-prompt-vX.Y.Z.md
Also embed it in the release notes as a collapsible section after ⚠️ Breaking Changes:
<details>
<summary>🤖 LLM Upgrade Prompt — paste this into Claude, ChatGPT, etc. to migrate your codebase</summary>
UPGRADE_PROMPT_CONTENT
</details>
This way users discover the prompt directly in the GitHub release page.
Present the release notes in full. Then:
Ask if the user wants to create a GitHub release draft:
gh release create vX.Y.Z --draft --title "vX.Y.Z" --notes "$(cat <<'EOF'
RELEASE_NOTES
EOF
)"
Use --draft so the user can review before publishing.
Report the file path of the standalone upgrade prompt (if generated).
Log to history:
echo "$(date -I) vX.Y.Z PREV_TAG" >> "${CLAUDE_PLUGIN_DATA}/release-notes-history.log"