
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 autoshipAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 337 |
|---|---|
| repo stars | ★ 74 |
| Last updated | August 5, 2026 |
| Repository | mblode/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
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 (usepr-babysitter), or scaffolding a new package (usescaffold-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
| File | Read when |
|---|---|
references/changeset-and-commit.md | Creating a changeset, running quality gates, or committing and pushing (Steps 1-3) |
references/ci-polling.md | Writing Monitor watch scripts, diagnosing CI failures, or handling the Changeset Status check (Steps 4-5) |
references/version-pr-and-publish.md | Finding and merging the Version Packages PR, or watching the publish run (Steps 4-5) |
Intent Map
| Intent | Steps | Notes |
|---|---|---|
| Full autoship (ship / release / publish) | 1 through 5 | Default entry point. Runs end-to-end through publish without intermediate prompts |
| Create changeset only | Step 1 | Stage a release without pushing |
| Fix quality and push | Steps 1-2 | Changeset + fixes + commit, no CI watch |
| Watch CI only | Steps 3-5 | When changes are already pushed |
| Merge version PR only | Steps 4-5 | When CI already passed. Auto-merges once preconditions are met |
| Fix compiler only | Step 2 | When 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, readingpackage.jsonscripts,git log,git status. - Yellow (announce, then execute): writing changeset files, running lint/typecheck/test/format fixers,
git add/commit/push, startingMonitorbackground watches, andgh pr mergeof 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 npmStep 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 useminorormajoron 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.jsonscripts (build,typecheck,tsc,type-check,lint,test,format); also check forMakefile,Cargo.toml,pyproject.toml,go.modin 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, checkgit status: broad fix scripts routinely reformat files outside your change (MDX is a frequent casualty). Revert unrelated churn withgit 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>, nevergit add -A. Sweepgit status --porcelainfor stray generated artifacts (e.g. a rootschema.gqlleft 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 versionlocally. The pushed commit must still contain the pending.changeset/*.mdfile 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.mdandreferences/version-pr-and-publish.md. - Start a
Monitorwatch scoped to the pushed commit SHA that emits a line on each state change and aTERMINAL: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 getgh run rerun <id> --failedup 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: passviagh pr checks <number> --json name,bucket. gh pr view <number> --json mergeablereportsMERGEABLE(notCONFLICTINGorUNKNOWN; onUNKNOWN, 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.mdandreferences/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/(commonlyrelease.yml,npm-publish.yml, orpublish.yml) and start aMonitorwatch 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> versionagainst the mergedpackage.json, stop all remaining Monitors, and report the published version. Thenpm viewoutput is the completion evidence; do not report success without it.
Failure Recovery
| Failure point | Response |
|---|---|
| Quality gate still failing after 5 fix iterations | Stop. Report the gate, remaining error count, and last error output |
| CI fails after the changeset push | Classify 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 fails | Missing 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 minutes | Check pending changesets exist on the default branch, the workflow file exists in .github/workflows/, and the action actually ran (gh run list) |
| Merge precondition fails | Stop and report. Never override failing checks or resolve conflicts inside the bot PR |
| Publish run fails | Never 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/*.mdfile, 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 publishdirectly. 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.mdor thepackage.jsonversionfield. CI generates both inside the Version Packages PR; local edits create conflicts that make the bot PR unmergeable. gh pr list --json headBranchandgh pr checks --json conclusionare invalid fields and error out. UseheadRefNameandbucketrespectively.- 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
sleepat 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/fixscript ride into the release commit ships unrelated reformatting. Scope fixers to changed files andgit restoreeverything else first. git add -Asilently commits pre-commit-hook artifacts (e.g. a rootschema.gql). Stage explicit paths only.- Selecting
majorwithout explicit user instruction signals breaking changes to every consumer of the package. Default topatch.
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.
Changeset Creation and Commit
Table of Contents
- Detecting Existing Changesets
- Creating a Changeset
- Quality Gates
- What Happens Next (CI Handles Versioning)
- Commit and Push
Detecting Existing Changesets
Check for pending changesets before creating a new one:
ls .changeset/*.md 2>/dev/null | grep -v README.mdIf changesets already exist, ask the user whether to create an additional one or skip.
Creating a Changeset
Prefer non-interactive changeset creation for agent mode:
# Interactive (TTY required)
npm run changeset
# Non-interactive: write the changeset file directly
cat > .changeset/<short-id>.md << 'EOF'
---
"<package-name>": patch
---
<description of changes>
EOFGenerate the short id with: node -e "console.log(Math.random().toString(36).slice(2,10))".
Bump Type Selection
| Type | When to use |
|---|---|
| patch | Bug fixes, documentation, internal refactors (default) |
| minor | New features, non-breaking additions |
| major | Breaking changes (only with explicit user instruction) |
Default to patch unless the user specifies otherwise.
Changeset Summary
Infer the summary from recent commits:
git log --oneline -10Write a concise 1-2 sentence description focusing on user-facing changes.
Quality Gates
Run the project's quality checks in this order before committing. Discover available scripts first:
cat package.json | jq '.scripts | keys[]' -rGate Order
1. Lint: npm run lint or the project's lint script
- Auto-fix:
npm run lint -- --fixornpx eslint --fix <changed-paths>
2. Type-check: npm run typecheck or npx tsc --noEmit
- Fix type errors manually; there is no safe auto-fixer
3. Tests: npm test or npm run test
- Fix failing tests; do not skip or delete them to get green
4. Format: npm run format or npx prettier --write <changed-paths>
- Scope to changed files; project-wide formatting reformats files outside the change
After any auto-fixer runs, check git status and revert files it touched outside your change (git restore <path>) before continuing.
Retry Logic
- Retry each gate up to 5 fix iterations; report the remaining error count each pass.
- If a gate still fails after 5 iterations, stop and report to the user.
- Re-run all gates from the beginning after any code change to catch regressions one fix introduces in an earlier gate.
What Happens Next (CI Handles Versioning)
After the changeset file is committed and pushed, CI's changesets/action workflow detects the pending changeset on the default branch and opens (or updates) a "Version Packages" PR on branch changeset-release/main. That PR contains the package.json version bump and CHANGELOG.md updates generated by running changeset version inside CI.
Do not run `npx changeset version` locally. It consumes the changeset file, so the commit pushed to main has no pending changeset, CI's "Changeset Status" check fails, and no Version Packages PR is opened.
The local job ends at "commit + push the changeset file".
Commit and Push
Use chore: add <type> changeset for <package> as the commit message convention.
Stage explicit paths only (git add <paths>, never git add -A): pre-commit hooks can emit stray artifacts (e.g. a root schema.gql) that broad staging silently commits into the release.
CI Watching with the Monitor Tool
Table of Contents
- Why Monitor, not /loop
- Watching CI on the Current Branch
- Waiting for the Version Packages PR to Appear
- Watching the Publish Workflow
- Failure Diagnosis
- Stopping a Monitor
- Rate Limit Awareness
- The Changeset Status PR Check
Why Monitor, not /loop
Monitor runs a small script in the background and feeds each output line back to the agent as it arrives. The agent reacts mid-conversation: no scheduled re-prompt, no fixed interval cadence, no extra context per poll. For CI watching this is strictly better than /loop:
- The watch script controls the cadence (one
sleepline) instead of CronCreate firing a whole prompt. - The agent only sees output when state actually changes, not on every tick.
- Stopping is one cancellation, not "remember to delete the cron".
Use Monitor for every CI / PR / workflow wait in autoship.
Watching CI on the Current Branch
After git push, start a Monitor that waits for every workflow run on the pushed commit to reach completed, then classifies the overall result. Scope by commit SHA, not branch, so older pushes do not bleed in and so the Monitor does not exit early when one of several parallel workflows finishes first.
SHA=$(git rev-parse HEAD)
LAST=""
while true; do
CUR=$(gh run list --commit "$SHA" --limit 20 \
--json status,conclusion,workflowName,databaseId \
--jq 'map("\(.databaseId)|\(.workflowName)|\(.status)|\(.conclusion // "")") | .[]')
if [ "$CUR" != "$LAST" ]; then echo "---"; echo "$CUR"; LAST="$CUR"; fi
# No runs registered yet: keep waiting
[ -z "$CUR" ] && { sleep 30; continue; }
# Any run still in flight: keep waiting
echo "$CUR" | grep -qv '|completed|' && { sleep 30; continue; }
# All runs completed: classify
if echo "$CUR" | grep -qv '|success$'; then
echo "TERMINAL: failure"
else
echo "TERMINAL: success"
fi
exit 0
doneThe agent keeps the Monitor running; each state change surfaces a new block. Stop on the first TERMINAL: line. Any non-success conclusion (failure, cancelled, timed_out, action_required, neutral, skipped, stale) is reported as a failure so the agent can inspect logs rather than spin.
Waiting for the Version Packages PR to Appear
changesets/action may take several minutes to open the PR after the changeset commit lands on the default branch. Watch for it:
DEADLINE=$(( $(date +%s) + 600 )) # 10-minute cap
while [ "$(date +%s)" -lt "$DEADLINE" ]; do
PR=$(gh pr list --state open --search "Version Packages in:title" \
--json number,headRefName \
--jq '.[] | select(.headRefName == "changeset-release/main") | .number' | head -n1)
if [ -n "$PR" ]; then
echo "FOUND: $PR"
exit 0
fi
sleep 30
done
echo "TIMEOUT"
exit 1Stop the Monitor on FOUND: or TIMEOUT.
Watching the Publish Workflow
After merging the Version Packages PR, the same release workflow runs again (this time invoking changeset publish). Identify the workflow file in .github/workflows/, then:
WF="release.yml" # adjust to the actual file name
LAST=""
while true; do
CUR=$(gh run list --workflow "$WF" --branch main --limit 1 \
--json status,conclusion,databaseId \
--jq '.[0] | "\(.databaseId)|\(.status)|\(.conclusion // "")"')
if [ "$CUR" != "$LAST" ]; then echo "$CUR"; LAST="$CUR"; fi
case "$CUR" in
*"|completed|success") echo "TERMINAL: success"; exit 0 ;;
*"|completed|"*) echo "TERMINAL: failure"; exit 0 ;;
esac
sleep 30
donePipe (|) is used as the field delimiter instead of tab so the case patterns can anchor on the end of the string and avoid the trailing-delimiter trap. Any conclusion other than success is treated as a failure so non-standard terminal states (neutral, skipped, action_required, etc.) are surfaced rather than silently looped.
Do not auto-retry on publish failure; these are real (auth, OIDC, tag conflict).
Failure Diagnosis
When a Monitor reports a failed run:
1. Read the failed logs: gh run view <id> --log-failed. 2. Classify the failure:
| Type | Indicators | Action |
|---|---|---|
| Flaky test | Intermittent, passes on re-run, known flaky test names | gh run rerun <id> --failed, restart the Monitor |
| Real failure | Consistent, reproducible, related to the changes | Fix code, commit, push, restart the Monitor |
| Infrastructure | Network timeout, runner issue, service unavailable | gh run rerun <id>, restart the Monitor |
Retry flaky/infrastructure failures up to 3 times. After 3 retries, escalate to the user. Never auto-retry the publish workflow.
Stopping a Monitor
A Monitor stops when its script exits (the examples above exit on TERMINAL: / FOUND: / TIMEOUT lines). To cancel an in-flight Monitor before it exits, ask the agent to stop it. Always stop monitors before reporting autoship complete.
Rate Limit Awareness
gh calls count against your GitHub API rate limit. Keep sleep at 30s or higher in Monitor scripts. Check remaining quota if you suspect throttling:
gh api rate_limit --jq '.resources.core.remaining'The Changeset Status PR Check
Changesets repos typically run npx changeset status --since origin/<baseBranch> on every PR (often as a step in the main CI job). This check verifies that a PR modifying publishable code includes a pending .changeset/*.md file.
Common failure modes:
- "no changeset found": the PR touches code but adds no changeset. Fix: run Step 1 of autoship to add one.
- "changeset consumed": a local
npx changeset versionwas run; the changeset file is gone and thepackage.jsonversion has already been bumped. Fix: revert the version bump andCHANGELOG.mdedit, re-add the changeset file, force-push. Do NOT retry CI; the state is broken at the commit level.
This check is what you read first when a release PR fails CI.
Version Packages PR and npm Publish
Companion reference: the reusable Monitor snippets for this file live in references/ci-polling.md (sections "Waiting for the Version Packages PR to Appear" and "Watching the Publish Workflow"). SKILL.md Steps 4 and 5 load both files together, so they should already be in context.Table of Contents
- The `changesets/action` Workflow
- Finding the Version Packages PR
- Verifying CI Before Merge
- Merging the Version Packages PR
- Watching the Publish Run
- Cleanup
The changesets/action Workflow
A single workflow (commonly release.yml or npm-publish.yml) handles both versioning and publishing. It runs on pushes to the default branch and uses changesets/action@v1 with a publish: input pointing at an npm script that calls changeset publish (typically npm run release).
The action has two modes, chosen automatically by state on main:
1. Pending changesets present → it runs changeset version internally, then opens or updates a PR titled "Version Packages" on branch changeset-release/main containing the version bump and CHANGELOG.md updates. No publish yet. 2. No pending changesets (Version Packages PR just merged) → it runs the publish: script, which calls changeset publish to push tags and publish to npm.
So the SAME workflow run that opens the Version Packages PR does not publish; a second run of the SAME workflow, triggered by merging that PR, publishes. When monitoring, you are watching two successive runs of one workflow, not two different workflows.
Reference best-practice release.yml shape (OIDC trusted publishing):
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
- uses: actions/setup-node@v4
with: { node-version: 22, registry-url: https://registry.npmjs.org, cache: npm }
- run: npm ci
- uses: changesets/action@v1
with:
publish: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: "true"The release script is typically changeset publish (optionally preceded by a build). The changeset:version npm script, if present, is invoked by the action, never locally.
.changeset/config.json should have "commit": false so the action controls commits via the PR.
Finding the Version Packages PR
With gh CLI
# Search by title (the JSON field is headRefName; headBranch is not a valid field)
gh pr list --search "Version Packages" --state open --json number,title,headRefName,statusCheckRollup
# Search by branch pattern
gh pr list --head changeset-release/main --state open --json number,title,statusCheckRollupIf the PR Does Not Exist Yet
The changesets bot may take a few minutes. Use the Monitor tool to watch for the PR (see the "Waiting for the Version Packages PR to Appear" snippet in references/ci-polling.md). Cap the watch at 10 minutes. If the watch times out, check:
- Are there pending changesets on the default branch?
- Is the changesets GitHub Action configured in
.github/workflows/? - Did the action run? Check with
gh run list --workflow <changeset-workflow-name>
Verifying CI Before Merge
Before merging the Version Packages PR, verify all CI checks pass:
gh pr checks <pr-number> --json name,state,bucketEvery check must report bucket: pass. (gh pr checks has no conclusion field; requesting it errors with "Unknown JSON field". A bucket of pending, fail, skipping, or cancel blocks the merge.)
If checks are still running, use the Monitor tool (see references/ci-polling.md) to wait for them to complete.
Merging the Version Packages PR
YELLOW-tier within autoship: invoking the skill is standing consent for the merge. Do not prompt for re-confirmation. Gate the merge with these objective preconditions instead.
Preconditions (all must hold):
- PR title is exactly "Version Packages" OR head branch is
changeset-release/main. Never merge a PR that does not match. - Every check on the PR reports
bucket: pass(verify withgh pr checks <pr-number> --json name,bucket). - PR is mergeable:
gh pr view <pr-number> --json mergeablereportsMERGEABLE(notCONFLICTINGorUNKNOWN). IfUNKNOWN, wait briefly and re-query.
Announce in one short line, then execute:
Merging Version Packages PR #<n>: <package>@<version>gh pr merge <pr-number> --squash --delete-branchPrefer --squash for clean history. Use --merge if the project convention requires merge commits.
If any precondition fails, stop and report to the user. Do not attempt to fix mergeability or override failing checks.
Watching the Publish Run
After merging the Version Packages PR, the push to the default branch triggers the SAME release workflow again. This second run detects there are no pending changesets and executes the publish: script (changeset publish).
Detecting the Workflow Run
Find the workflow file by inspecting .github/workflows/; common names are release.yml, npm-publish.yml, publish.yml. Then:
# Replace release.yml with the actual file name
gh run list --workflow release.yml --branch main --limit 3 --json status,conclusion,databaseId,createdAt
# Or list all recent runs and identify by name
gh run list --branch main --limit 5 --json workflowName,status,conclusion,databaseIdWatching for Completion
Start a Monitor watch on the release workflow's latest run on main. See the "Watching the Publish Workflow" snippet in references/ci-polling.md for a ready-to-use script. The Monitor exits on the first TERMINAL: line.
Terminal conditions:
- Success: workflow completes with
conclusion: success. Report and stop. - Failure: workflow completes with any other conclusion. Report with logs and stop.
- Do NOT auto-retry publish failures. These typically indicate real issues (npm auth, registry, OIDC/provenance, tag conflict).
Verifying the Published Version
After the publish workflow succeeds:
npm view <package-name> versionCompare with the version in package.json to confirm the publish was successful.
Cleanup
- The
--delete-branchflag on merge handles branch cleanup - Stop any
Monitorwatches that are still running - Report the final published version to the user
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.