Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
mblode avatar

Autoship

  • 337 installs
  • 74 repo stars
  • Updated August 5, 2026
  • mblode/agent-skills

autoship is an mblode agent skill that automates npm release shipping for changesets-based packages—version bumps, changelog updates, CI verification, Version Packages PR merge, and npm publish confirmation—for developer

About

autoship is an mblode/agent-skills workflow that runs the full npm release loop for existing changesets packages. A developer pushes a pending .changeset/*.md file; CI runs changeset version and opens a Version Packages PR; after merge, changeset publish tags and publishes to npm. The skill's five steps cover creating a patch changeset (default), fixing lint/type/test/format gates with up to five iterations each, committing only explicit paths, monitoring GitHub Actions with gh, auto-merging the Version Packages PR when checks pass, and verifying npm view version. It explicitly forbids local npx changeset version, hand-editing CHANGELOG.md, and direct npm publish. Pair autoship with pr-creator for feature work and scaffold-cli for first-time package setup.

  • Automated version and changelog updates
  • Pre-deploy verification checklist
  • Pipeline and environment promotion steps
  • Rollback-aware release sequencing
  • Agent-driven ship-it workflows

Autoship by the numbers

  • 337 all-time installs (skills.sh)
  • +20 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #62 of 248 Release Management skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/mblode/agent-skills --skill autoship

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs337
repo stars74
Last updatedAugust 5, 2026
Repositorymblode/agent-skills

How do you release an npm package with changesets?

Automate release shipping steps—version bumps, changelog updates, build verification, and deployment triggers—so agents can push vetted changes to staging or production with minimal manual ceremony.

Who is it for?

Maintainers of changesets-based npm packages who want agents to drive release CI without breaking the two-run Version Packages loop.

Skip if: Skip autoship for feature PRs, first-time package scaffolding, or non-npm ecosystems—use pr-creator or scaffold-cli instead.

When should I use this skill?

User says release this package, publish to npm, autoship, cut a release, or fix build failures inside a release flow.

What you get

Published npm version, merged Version Packages PR, updated CHANGELOG.md, git tags, and npm view verification output.

  • npm published version
  • CHANGELOG.md update
  • git tags

By the numbers

  • 5-step release workflow from changeset through npm verification
  • 3 reference markdown files for changeset, CI polling, and publish steps
  • Up to 5 fix iterations per quality gate; up to 3 gh run rerun attempts

Files

SKILL.mdMarkdownGitHub ↗

Autoship

Drive an npm release end to end: changeset, fix loop, push, CI watch, Version Packages PR merge, publish watch, npm verification.

  • IS: the full release pipeline for an existing changesets-based npm package, from writing the changeset file to confirming the new version on the registry.
  • IS NOT: opening a feature PR (use pr-creator), monitoring a feature PR for reviews, conflicts, or CI (use pr-babysitter), or scaffolding a new package (use scaffold-cli, which hands off to autoship for the first release).

The Release Loop

One workflow, two successive runs. Misreading this as two different workflows is the root cause of most autoship mistakes.

1. You push a commit containing a pending .changeset/*.md file to the default branch. 2. The release workflow runs. changesets/action sees pending changesets, runs changeset version inside CI, and opens or updates a PR titled "Version Packages" on branch changeset-release/main containing the package.json bump and CHANGELOG.md updates. 3. You merge that PR once every check is green. 4. The same workflow runs again. With no pending changesets left, the action executes its publish: script (changeset publish), which pushes tags and publishes to npm.

The local job ends at "push the changeset file". CI owns versioning and publishing; anything versioned locally breaks the loop (see Gotchas).

Reference Files

FileRead when
references/changeset-and-commit.mdCreating a changeset, running quality gates, or committing and pushing (Steps 1-3)
references/ci-polling.mdWriting Monitor watch scripts, diagnosing CI failures, or handling the Changeset Status check (Steps 4-5)
references/version-pr-and-publish.mdFinding and merging the Version Packages PR, or watching the publish run (Steps 4-5)

Intent Map

IntentStepsNotes
Full autoship (ship / release / publish)1 through 5Default entry point. Runs end-to-end through publish without intermediate prompts
Create changeset onlyStep 1Stage a release without pushing
Fix quality and pushSteps 1-2Changeset + fixes + commit, no CI watch
Watch CI onlySteps 3-5When changes are already pushed
Merge version PR onlySteps 4-5When CI already passed. Auto-merges once preconditions are met
Fix compiler onlyStep 2When the build is broken; no changeset needed

Safety Tiers

Invoking autoship is standing consent for the full release flow. Do not pause mid-flow for re-confirmation; gate risky steps with objective preconditions instead.

  • Green (execute directly): gh run list, gh run view, gh pr list, gh pr checks, npm view, reading CI status, listing changesets, reading package.json scripts, git log, git status.
  • Yellow (announce, then execute): writing changeset files, running lint/typecheck/test/format fixers, git add/commit/push, starting Monitor background watches, and gh pr merge of the Version Packages PR once its identity is confirmed and all checks are green.
  • Red (explicit confirmation required): force-pushing, history rewrites, and any destructive git operation.

Workflow

Copy this checklist to track progress:

Autoship progress:
- [ ] Step 1: Create changeset (default patch)
- [ ] Step 2: Fix lint, types, tests, format
- [ ] Step 3: Commit + push changeset (do NOT run `changeset version`)
- [ ] Step 4: Monitor CI and find/merge the Version Packages PR
- [ ] Step 5: Watch the publish run, verify on npm

Step 1: Create changeset (default patch)

  • Load references/changeset-and-commit.md.
  • Check for existing pending changesets: ls .changeset/*.md 2>/dev/null | grep -v README.md. If any exist, ask the user whether to add another or skip.
  • Default to patch. Only use minor or major on explicit user instruction.
  • Write the changeset file directly (non-interactive agent mode); infer the summary from git log --oneline -10.

Step 2: Fix lint, types, tests, format

  • Load references/changeset-and-commit.md (skip the changeset sections when running the "Fix compiler only" intent).
  • Discover commands from package.json scripts (build, typecheck, tsc, type-check, lint, test, format); also check for Makefile, Cargo.toml, pyproject.toml, go.mod in non-npm repos.
  • Run gates in order: lint, typecheck, test, format.
  • Scope auto-fixers (lint --fix, format) to changed files where the tool supports it. After any fixer runs, check git status: broad fix scripts routinely reformat files outside your change (MDX is a frequent casualty). Revert unrelated churn with git restore <path> before continuing.
  • On gate failure, parse output for file, line, code, and message. Fix syntax errors first, then type errors, then lint errors. Fix one root cause at a time when errors cascade.
  • Retry each gate up to 5 fix iterations, reporting the remaining error count each pass. If a gate still fails after 5, stop and report (see Failure Recovery).

Step 3: Commit + push changeset

  • Stage the changeset file and in-scope fixes only: git add <paths>, never git add -A. Sweep git status --porcelain for stray generated artifacts (e.g. a root schema.gql left by a pre-commit hook) and unrelated fixer churn before committing.
  • Commit (chore: add <type> changeset for <package>) and push.
  • Do NOT run npx changeset version locally. The pushed commit must still contain the pending .changeset/*.md file so CI's "Changeset Status" check passes and the Version Packages PR opens.

Step 4: Monitor CI and find/merge the Version Packages PR

  • Load references/ci-polling.md and references/version-pr-and-publish.md.
  • Start a Monitor watch scoped to the pushed commit SHA that emits a line on each state change and a TERMINAL: line when every workflow run completes. Do not stop on an idle first poll; runs take time to queue.
  • On failure, classify via logs (gh run view <id> --log-failed): flaky/infra failures get gh run rerun <id> --failed up to 3 times; real failures get a fix, commit, push, and a fresh Monitor.
  • Once green, find the open PR titled "Version Packages" on branch changeset-release/main. If absent, start a second Monitor that polls for it, capped at 10 minutes (the bot needs time).
  • Verify ALL merge preconditions:
  • PR title is exactly "Version Packages" OR head branch is changeset-release/main. Never merge any other PR.
  • Every check reports bucket: pass via gh pr checks <number> --json name,bucket.
  • gh pr view <number> --json mergeable reports MERGEABLE (not CONFLICTING or UNKNOWN; on UNKNOWN, wait briefly and re-query).
  • Announce in one line ("Merging Version Packages PR #N: <package>@<version>"), then gh pr merge <number> --squash --delete-branch. No confirmation pause; invoking autoship is the consent.
  • If any precondition fails, stop and report. Do not merge.

Step 5: Watch the publish run, verify on npm

  • Load references/version-pr-and-publish.md and references/ci-polling.md.
  • Merging the Version Packages PR triggers the SAME workflow again; with no pending changesets it publishes (see The Release Loop).
  • Identify the workflow file in .github/workflows/ (commonly release.yml, npm-publish.yml, or publish.yml) and start a Monitor watch on its latest run on the default branch.
  • On failure: report with logs and stop. Never auto-retry a publish failure; causes are real (npm auth, registry, OIDC/provenance, tag conflict).
  • On success: verify with npm view <package> version against the merged package.json, stop all remaining Monitors, and report the published version. The npm view output is the completion evidence; do not report success without it.

Failure Recovery

Failure pointResponse
Quality gate still failing after 5 fix iterationsStop. Report the gate, remaining error count, and last error output
CI fails after the changeset pushClassify per references/ci-polling.md: flaky/infra gets gh run rerun <id> --failed (max 3), real failures get fix + push + fresh Monitor
"Changeset Status" check failsMissing changeset: add one (Step 1). Consumed changeset (a local changeset version ran): revert the version bump and CHANGELOG.md edit, re-add the changeset file. Rerunning CI cannot fix consumed state
Version Packages PR absent after 10 minutesCheck pending changesets exist on the default branch, the workflow file exists in .github/workflows/, and the action actually ran (gh run list)
Merge precondition failsStop and report. Never override failing checks or resolve conflicts inside the bot PR
Publish run failsNever auto-retry. Report with logs; typical causes are npm auth, OIDC/provenance, tag conflict, registry outage

Gotchas

  • Never run `npx changeset version` locally. It consumes the .changeset/*.md file, so the pushed commit has no pending changeset, the "Changeset Status" check fails, and no Version Packages PR opens. Recovery means reverting the bump, not rerunning CI.
  • Never run npm publish directly. It bypasses changesets, skips the changelog and git tags, and leaves the Version Packages PR describing a version that already shipped.
  • Do not hand-edit CHANGELOG.md or the package.json version field. CI generates both inside the Version Packages PR; local edits create conflicts that make the bot PR unmergeable.
  • gh pr list --json headBranch and gh pr checks --json conclusion are invalid fields and error out. Use headRefName and bucket respectively.
  • Do not stop CI monitoring because the first poll shows no runs; workflows take time to queue. Stop only on a TERMINAL: line from the Monitor script.
  • Keep Monitor sleep at 30 seconds or longer. Tighter polling burns GitHub API rate limit (gh api rate_limit) and can throttle the rest of the flow.
  • Letting a broad format/fix script ride into the release commit ships unrelated reformatting. Scope fixers to changed files and git restore everything else first.
  • git add -A silently commits pre-commit-hook artifacts (e.g. a root schema.gql). Stage explicit paths only.
  • Selecting major without explicit user instruction signals breaking changes to every consumer of the package. Default to patch.

Related Skills

  • scaffold-cli: scaffolds a new TypeScript package and hands off to autoship for its first release.
  • pr-creator: opens feature PRs. Autoship only ever merges the bot-opened Version Packages PR.
  • pr-babysitter: watches feature PRs (reviews, conflicts, CI). Autoship watches release CI only.

Related skills

How it compares

Use autoship for npm changesets releases; use pr-creator to open feature PRs and pr-babysitter to monitor them.

FAQ

Why must autoship avoid npx changeset version locally?

autoship warns that running npx changeset version locally consumes pending .changeset/*.md files. The pushed commit then lacks a pending changeset, the Changeset Status check fails, and no Version Packages PR opens—recovery requires reverting the local bump.

Which PR does autoship merge during release?

autoship merges only the open PR titled Version Packages on branch changeset-release/main after every gh pr checks bucket is pass and mergeable is MERGEABLE. It never merges unrelated PRs even if CI is green.

How does autoship confirm a successful publish?

autoship monitors the post-merge publish workflow on the default branch and requires npm view <package> version to match the merged package.json version. The npm view output is mandatory completion evidence before reporting success.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.