AgentSkillsCN

Skill

技能

SKILL.md

releeease - Release Skill

Release workflow for npm packages using releeease CLI.

When to Use

Use this skill when:

  • Publishing a new version to npm
  • Creating a release with changelog
  • Running release preflight checks
  • Debugging failed releases

Prerequisites

  1. npm logged in: npm whoami
  2. gh CLI authenticated (optional): gh auth status
  3. Clean working tree: no uncommitted changes
  4. On release branch (default: main)

Quick Release

bash
# Patch release (default)
releeease

# Minor release
releeease --minor

# Major release
releeease --major

# Auto-detect from commits
releeease --auto

# Preview without changes
releeease --dry-run

Step-by-Step Workflow

1. Check Status

bash
# See if release is in progress
releeease status

2. Run Preflight

bash
# Check all prerequisites
releeease --step preflight

3. Full Release

bash
# Run all steps
releeease

# Skip confirmations
releeease --yes

# Verbose output
releeease --verbose

4. Resume Failed Release

bash
# Just re-run - it continues from where it left off
releeease

# Or start from specific step
releeease --from version

5. Rollback

bash
# Undo failed release
releeease rollback

# Preview rollback
releeease rollback --dry-run

Release Steps

StepWhat it does
preflightChecks npm login, gh auth, clean tree
initDetects bump type, initializes state
commitsShows commits since last release
changesetCreates changeset file
buildRuns pnpm build
versionBumps version via changeset
commitCommits with 🚀 RELEASE: vX.X.X
publishPublishes to npm
pushPushes commits and tags
githubCreates GitHub release
cleanupClears release state

Config

Create .releaserc in project root:

json
{
  "bump": "patch",
  "branch": "main",
  "steps": ["preflight", "init", "commits", "changeset", "build", "version", "commit", "publish", "push", "github", "cleanup"],
  "confirm": true,
  "hooks": {
    "pre:release": "./scripts/pre-release.js",
    "post:release": "./scripts/notify.js"
  }
}

Hooks

Create hook scripts that export a function:

javascript
// scripts/notify.js
export default async function({ config, state, cwd }) {
  console.log(`Released ${state.version}!`);
}

Troubleshooting

"Another release is in progress"

bash
# Check what's happening
releeease status

# Force cleanup (if stuck)
rm -rf ~/.releeease/state/

"Not logged into npm"

bash
npm login

"Uncommitted changes detected"

bash
git stash
# or
git commit -am "WIP"

Resume from specific step

bash
releeease --from publish

State Location

Release state is stored in ~/.releeease/state/<project-hash>/:

  • state.json - Current progress
  • lock - Prevents concurrent releases

No files created in your project directory.