update-release
БесплатноБез исполняемых скриптовНе проверенAutomates the release process for the ts-oauth2-server project.
Об этом скилле
Release Creator Skill
Purpose
Automates the release process for the ts-oauth2-server project by:
- Bumping version numbers in both
package.jsonandjsr.json - Generating changelog entries based on git commits since the last tagged version
- Updating the CHANGELOG.md file with proper formatting
- Maintaining Keep a Changelog format and Semantic Versioning compliance
- Always running the full pre-flight (
pnpm typecheck && pnpm build && pnpm test) before release, aborting if any step fails - Pausing for user confirmation, then committing, tagging, pushing, and creating the GitHub release (which triggers npm + JSR publish via
.github/workflows/publish.yml)
When to Use This Skill
Use this skill when the user requests:
- Creating a new release
- Bumping the version (patch, minor, major, premajor, preminor, prepatch, prerelease)
- Updating the changelog
- Preparing for a release
- Publishing a new version
Prerequisites
- Git repository with commit history
- Existing tags for version tracking
package.jsonandjsr.jsonfiles presentCHANGELOG.mdfile exists
Core Functionality
Version Bump Types
Supported version bump types (following semver):
- patch: Bug fixes (1.0.0 → 1.0.1)
- minor: New features (1.0.0 → 1.1.0)
- major: Breaking changes (1.0.0 → 2.0.0)
- prepatch: Pre-release patch (1.0.0 → 1.0.1-rc.0)
- preminor: Pre-release minor (1.0.0 → 1.1.0-rc.0)
- premajor: Pre-release major (1.0.0 → 2.0.0-rc.0)
- prerelease: Increment pre-release (1.0.0-rc.0 → 1.0.0-rc.1)
Prerelease format (REQUIRED):
-rc.#. This project's prereleases are alwaysX.Y.Z-rc.N, starting atrc.0and incrementing the trailing number (rc.0→rc.1→ …). Never use bare-0or-next.Nsuffixes. The new prerelease number must be strictly greater than the previous one for the sameX.Y.Z.
Implementation Steps
1. Get Current Version
import { readFileSync } from 'fs';
function getCurrentVersion(): string {
const pkg = JSON.parse(readFileSync('package.json', 'utf-8'));
return pkg.version;
}
2. Calculate New Version
// Prereleases use the REQUIRED `-rc.#` convention (e.g. 5.0.0-rc.0, 5.0.0-rc.1).
function bumpVersion(current: string, bumpType: string): string {
const parts = current.split('-');
const [major, minor, patch] = parts[0].split('.').map(Number);
const prerelease = parts[1]; // e.g. "rc.0"
switch (bumpType) {
case 'major':
return `${major + 1}.0.0`;
case 'minor':
return `${major}.${minor + 1}.0`;
case 'patch':
return `${major}.${minor}.${patch + 1}`;
case 'premajor':
return `${major + 1}.0.0-rc.0`;
case 'preminor':
return `${major}.${minor + 1}.0-rc.0`;
case 'prepatch':
return `${major}.${minor}.${patch + 1}-rc.0`;
case 'prerelease':
if (prerelease) {
// Increment the trailing rc number: "rc.0" -> "rc.1". Reject non-rc suffixes.
const match = prerelease.match(/^rc\.(\d+)$/);
if (!match) {
throw new Error(`Prerelease must use the -rc.# format, got: ${prerelease}`);
}
return `${parts[0]}-rc.${parseInt(match[1], 10) + 1}`;
}
return `${major}.${minor}.${patch + 1}-rc.0`;
default:
throw new Error(`Invalid bump type: ${bumpType}`);
}
}
3. Get Git Commits Since Last Tag
# Get the last tag
last_tag=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
# Get commits since last tag
if [ -z "$last_tag" ]; then
# No previous tag, get all commits
commits=$(git log --pretty=format:"%s" --no-merges)
else
# Get commits since last tag
commits=$(git log ${last_tag}..HEAD --pretty=format:"%s" --no-merges)
fi
4. Categorize Commits
Parse commits and categorize them based on conventional commit format:
feat:orfeature:→ Added sectionfix:→ Fixed sectionBREAKING CHANGE:or!:→ Changed section (breaking)docs:→ Skip (or note in documentation)chore:,refactor:,test:→ Skip or group under "Changed"security:→ Security section
5. Generate Changelog Entry
Follow Keep a Changelog format:
## [Version] - YYYY-MM-DD
### Added
- New feature A
- New feature B
### Changed
- **BREAKING**: Changed behavior X
- Updated Y
### Fixed
- Fixed bug in Z
- Resolved issue with W
### Security
- Security fix for vulnerability V
6. Update Files
Update both package.json and jsr.json with the new version, and prepend the new changelog entry to CHANGELOG.md under the ## [Unreleased] section.
7. Run the Full Pre-flight (REQUIRED)
Always run the full pre-flight locally before pausing for confirmation. The publish workflow runs pnpm build && pnpm test in CI, but failures there fire only after the release event — too late to undo a consumed version. Catch them locally first.
Run all three, in order, and abort the release if any fails:
pnpm typecheck # tsc -p t
Установить update-release в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл update-release?
Automates the release process for the ts-oauth2-server project.
Как установить скилл update-release?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл update-release запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic