Agent skill

Prepare Release

by fetch-rewards in fetch-rewards/swift-mocking

Analyze merged PRs since the last release, determine the next version, update the changelog, open the PR, and populate the draft GitHub release notes for a new swift-mocking release.

MITAuto-check passedDevelopment

Install Prepare Release

skills CLI
$ npx skills add fetch-rewards/swift-mocking --skill prepare-release -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install fetch-rewards/swift-mocking prepare-release --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/fetch-rewards/swift-mocking.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/prepare-release .claude/skills/prepare-release && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
prepare-release
GitHub stars
100
Token cost
~2k tokens
SKILL.md length
965 words
Files
2 (incl. scripts)
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Analyze merged PRs since the last release, determine the next version, update the changelog, open the PR, and populate the draft GitHub release notes for a new swift-mocking release.

  • Works in 10 steps: Sync with main → Run generate-release-info → Resolve unlabeled PRs → …
  • Tasks that involve Changelog and release notes
  • SKILL.md covers 1. Sync with main, 2. Run generate-release-info, 3. Resolve unlabeled PRs and 4. Review output for changelog…, plus 6 more sections
  • Calls git and gh

What it does

Prepare Release is an agent skill from fetch-rewards/swift-mocking. Analyze merged PRs since the last release, determine the next version, update the changelog, open the PR, and populate the draft GitHub release notes for a new swift-mocking release.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts.

It sits in Development, covering Changelog and release notes and iOS development. It works with GitHub. The repository describes itself as: Swift macros for generating mocks. The licence is MIT.

When your agent uses it

  • Tasks that involve Changelog and release notes
  • Tasks that involve iOS development

Example prompts

  • “/prepare-release”

Workflow steps

10 steps, taken from the step headings in SKILL.md.

  1. Sync with main
  2. Run generate-release-info
  3. Resolve unlabeled PRs
  4. Review output for changelog PRs
  5. Determine the version to release
  6. Create a branch from origin/main
  7. Update CHANGELOG.md
  8. Commit and push
  9. Create the PR
  10. Create or update the draft GitHub release notes

What it can do on your machine

Read from SKILL.md and the folder at commit 762fdd1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/, which the agent can run.

    Shell commands in SKILL.md call:

    • git
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Prepare Release loads about 2k tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 965 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~50
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from fetch-rewards/swift-mocking at commit 762fdd1, republished under its MIT licence (© fetch-rewards). 965 words, ~2,024 tokens.

Download SKILL.mdSave it as .claude/skills/prepare-release/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
prepare-release
description
Analyze merged PRs since the last release, determine the next version, update the changelog, open the PR, and populate the draft GitHub release notes for a new swift-mocking release.

Prepare Release

Runs generate-release-info to collect PR data and compute the next version, then creates the changelog branch, updates CHANGELOG.md, opens a documentation PR, and populates the draft GitHub release notes.

The computed version is a default, not a mandate: if the user asks for a specific target version when invoking the skill (e.g. "bump to 1.0.0"), that overrides the computed value — see step 5.

When done, report the PR URL and tell the user to invoke /publish-release once the PR is merged.

1. Sync with main

Fetch origin — including tags — and hard-reset to origin/main. Do not use git pull — it can produce merge commits that the repo's branch protection rules reject on push.

Fetch tags explicitly with --tags: generate-release-info derives last_version from local tags, and publish-release creates each release tag on GitHub (via gh release edit --draft=false), so a just-published tag exists remotely but not locally until fetched. A bare git fetch only follows tags reachable from fetched branches; --tags guarantees every release tag is present, so last_version is never computed from a stale local tag.

sh
git fetch origin --tags
git checkout main
git reset --hard origin/main

2. Run generate-release-info

sh
.claude/skills/prepare-release/scripts/generate-release-info

This outputs one of two things:

  • Unlabeled PRs (exit 1): Only a ### ⚠️ Needs Label section — no version or changelog sections. Handle this in step 3 before proceeding.
  • Success (exit 0): last_version and next_version on the first line(s), followed by pre-formatted changelog sections ready to paste directly into CHANGELOG.md and the release notes. When the current version is pre-1.0 and the release contains a breaking change, two extra lines appear after next_version (breaking_change_pre_1_0: true and major_version_option: 1.0.0) — resolve them in step 5 before using next_version.

PRs labeled breaking changes appear in their categorization section with a ⚠️ **[BREAKING]** prefix. A breaking change bumps the major version (e.g. 1.4.2 → 2.0.0) — except when the current version is pre-1.0 (0.x.y), where the public API is considered unstable and a breaking change is only a minor bump by default (e.g. 0.3.0 → 0.4.0). See step 5.

3. Resolve unlabeled PRs

If the script exited with ### ⚠️ Needs Label, those PRs had no categorization label. The script produces no version number or changelog output until this is resolved — do not proceed to later steps.

For each unlabeled PR, present its title and number, then ask the user to pick a label:

1. enhancement
2. bug
3. documentation
4. testing
5. refactoring
6. formatting
7. dependencies
8. ci
9. chore

Apply the chosen label:

sh
gh pr edit <number> --repo fetch-rewards/swift-mocking --add-label <label>

Once all unlabeled PRs have been labeled, re-run the script. Repeat until the script exits successfully, then continue to the next step.

4. Review output for changelog PRs

Scan the most recent script output for any entry whose title contains "changelog" (case-insensitive). The script already filters PRs from documentation/changelog-* branches, but one may slip through if the branch was named differently.

For each flagged entry, ask the user: "PR #NNN ('title') looks like a changelog update — exclude it?" Do not proceed until the user has confirmed or dismissed each one. Remove any confirmed changelog PRs from the output before using it in subsequent steps. If no entries are flagged, continue immediately to step 5.

Show full SKILL.md (497 more words)Show less

5. Determine the version to release

The script's computed next_version is the default, but it can be superseded. Resolve the final version in this priority order, then use it as next_version for every subsequent step. The changelog sections are identical regardless of the version chosen — only the version number changes.

a. Explicit user override (highest priority). If the user requested a specific target version when invoking the skill (e.g. "bump to 1.0.0", "release 0.5.0"), honor it — this overrides both the computed next_version and the pre-1.0 prompt below. Validate it first:

  • It must be a valid X.Y.Z version and strictly greater than last_version. If it is equal to or less than last_version, or not a valid version, tell the user and ask for a valid target instead of proceeding.
  • Graduating to 1.0.0 is valid even with no breaking change label — it is a deliberate stability commitment. Likewise a version that skips numbers (e.g. 0.3.0 → 0.5.0) is allowed since it was explicitly requested; if the jump looks unintentional, confirm with the user before continuing.

Once validated, use the requested version and skip the rest of this step.

b. Pre-1.0 breaking change. Only when there was no explicit override and the script output includes breaking_change_pre_1_0: true: the release contains a breaking change but the current version is pre-1.0 (0.x.y). By SemVer convention the default is a minor bump (the printed next_version, e.g. 0.4.0), but the user may instead choose to graduate to the major_version_option (1.0.0) to signal a stable public API. Prompt the user to choose:

  • Minor bump (default): use the printed next_version (e.g. 0.4.0).
  • Major bump: use the major_version_option (1.0.0).

c. Default. Otherwise, use the printed next_version as-is.

6. Create a branch from origin/main

Branch name convention: documentation/changelog-<next_version>

sh
git checkout -b documentation/changelog-<next_version> origin/main

7. Update CHANGELOG.md

Insert a new section above the previous version entry. The version header format is:

markdown
## 🚀 [Version <next_version>](https://github.com/fetch-rewards/swift-mocking/releases/tag/<next_version>) - <Month Day, Year> ([Full Changelog](https://github.com/fetch-rewards/swift-mocking/compare/<last_version>...<next_version>))

Paste the sections from the script output (with any entries removed per step 4) beneath it verbatim.

8. Commit and push

sh
git add CHANGELOG.md
git commit -m "Update changelog for Version <next_version>"
git push -u origin documentation/changelog-<next_version>

9. Create the PR

  • Title: Update changelog
  • Base branch: main
  • Label: documentation
  • Assignee: graycampbell

Use the repo's PR template at .github/pull_request_template.md. Set the summary to "Updated CHANGELOG.md for Version <next_version>.", check the Documentation checkbox, and check all Checklist items. Write the body to a temp file and pass it via --body-file to avoid multiline escaping issues.

10. Create or update the draft GitHub release notes

Assemble the notes body: the script's section output (no version header line, with any entries removed per step 4), followed by the full-changelog link. The script output already ends with a blank line, so append the link directly. The assembled body looks like:

markdown
### ✨ Features

- Example entry ([#NNN](https://github.com/fetch-rewards/swift-mocking/pull/NNN))

[Full Changelog](https://github.com/fetch-rewards/swift-mocking/compare/<last_version>...<next_version>)

Write the assembled body to a temp file, then check whether a release already exists for <next_version>:

sh
gh release list --repo fetch-rewards/swift-mocking
  • Listed as Draft: update it:
    sh
    gh release edit <next_version> --repo fetch-rewards/swift-mocking --notes-file <path>
  • Listed but not a draft (already published): warn the user — do not overwrite a published release.
  • Not listed: create a draft:
    sh
    gh release create <next_version> --repo fetch-rewards/swift-mocking --draft --title "Version <next_version>" --notes-file <path>

© fetch-rewards, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (scripts) in .claude/skills/prepare-release of fetch-rewards/swift-mocking.

  • SKILL.md
  • scripts/generate-release-info

Open the folder on GitHubat commit 762fdd1

Compare with similar skills

Prepare Release next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Prepare Release compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Prepare Release this skillfetch-rewards/swift-mocking100—~2kAutomated safety check: PassMIT
Release Swiftrobinebers/openusage4.3k—~1.6kAutomated safety check: PassMIT
Releasef-is-h/Usage4Claude400—~1.9kAutomated safety check: PassMIT
Cutting A ReleaseTriliumNext/Trilium38k—~3.2kAutomated safety check: PassAGPL-3.0
Mole CLI Release Flowtw93/Mole70k—~2.5kAutomated safety check: PassGPL-3.0
Draft Release Notesjamiepine/voicebox57k—~941Automated safety check: PassMIT

Similar skills

  • Release Swift

    robinebers/openusage

    Cut a release of OpenUsage (Swift menu-bar app): pick a version, generate a categorized changelog, tag from main, and publish the GitHub Release with notes.

    4.3k GitHub stars~1.6k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Release

    f-is-h/Usage4Claude

    发布 Usage4Claude 新版本时使用。当用户说“发布新版本 / 发版 / 出新版 / release / 打 tag 发布 / 准备发版材料”等,用本 skill 引导完成从收集变更、编写 CHANGELOG 与 RELEASENOTES、更新版本号、编译验证,到发版 commit、CI 自动发布的完整流程。

    400 GitHub stars~1.9k tokensUpdated 9 days ago
    DevelopmentAuto-check passed
  • Cutting A Release

    TriliumNext/Trilium

    A skill your agent uses when cutting, preparing, or debugging a Trilium release — bumping the monorepo version, tagging, or diagnosing a failed "Release" workflow run.

    38k GitHub stars~3.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Runbook for assessing and executing a Mole CLI release: distribution channels, pre-flight checks, capital-V tags, build artifacts and the handoff to curated release notes.

    70k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Draft Release Notes

    jamiepine/voicebox

    Writes or refreshes the Unreleased section of CHANGELOG.md as a themed narrative built from the commits, PRs and diff since the last version tag.

    57k GitHub stars~941 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Publishes curated, bilingual release notes for an existing Mole version tag with gh release edit, including contributor thanks and reactions, after the release workflow finishes.

    70k GitHub stars~1.9k tokensUpdated today
    DevelopmentAuto-check passed

More from fetch-rewards/swift-mocking

  • Publish Release

    fetch-rewards/swift-mocking

    Publish the draft GitHub release for swift-mocking after the changelog PR has been merged.

    100 GitHub stars~671 tokensUpdated 2 mo ago
    Auto-check passed

Works with

Categories

Questions about Prepare Release

What does Prepare Release do?

Analyze merged PRs since the last release, determine the next version, update the changelog, open the PR, and populate the draft GitHub release notes for a new swift-mocking release. Prepare Release is an agent skill from fetch-rewards/swift-mocking. Analyze merged PRs since the last release, determine the next version, update the changelog, open the PR, and populate the draft GitHub release notes for a new swift-mocking release.

When should I use Prepare Release?

Prepare Release fits situations like: tasks that involve Changelog and release notes; tasks that involve iOS development.

How do I install Prepare Release in Claude Code?

Run `npx skills add fetch-rewards/swift-mocking --skill prepare-release -a claude-code`. Or copy the skill folder (.claude/skills/prepare-release in fetch-rewards/swift-mocking) into .claude/skills/prepare-release in your project. Claude Code loads it when a task matches its description.

How do I install Prepare Release in Codex?

Run `npx skills add fetch-rewards/swift-mocking --skill prepare-release -a codex`. Or copy the skill folder (.claude/skills/prepare-release in fetch-rewards/swift-mocking) into .agents/skills/prepare-release in your project. Codex loads it when a task matches its description.

Can I use Prepare Release in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add fetch-rewards/swift-mocking --skill prepare-release -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/prepare-release, .gemini/skills/prepare-release, .github/skills/prepare-release and .opencode/skills/prepare-release in your project.

What does Prepare Release need to run?

Going by SKILL.md and its folder, Prepare Release needs the command-line tools its instructions call (git and gh).

Does Prepare Release access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Prepare Release safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Prepare Release use?

Prepare Release is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Prepare Release use?

About 2k tokens (SKILL.md is roughly 8.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Prepare Release?

Skills that share tags, products or a category with Prepare Release: Release Swift (robinebers/openusage, 4.3k stars), Release (f-is-h/Usage4Claude, 400 stars), Cutting A Release (TriliumNext/Trilium, 38k stars) and Mole CLI Release Flow (tw93/Mole, 70k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Prepare Release?

fetch-rewards (a GitHub organization) maintains it in fetch-rewards/swift-mocking, which has 100 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on July 14, 2026.

Source: fetch-rewards/swift-mocking on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.