/continuous-improvement:deploy-receiptfrom continuous-improvement
After merging into an auto-deploy branch, verifies the deploy provider actually picked up the commit and the running app passes a healthcheck. Companion to the finishing-a-development-branch skill.
Ships in continuous-improvement. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Multiple sessions in the operator's recent telemetry ended in a "partially achieved" state with the same shape: PR merged green, branch deleted, agent reports done — and then hours later the operator discovers the deploy provider never picked up the commit, was building from a stale lockfile, or silently rolled back. The merge happened. The deploy did not.
finishing-a-development-branch (vendored from Obra superpowers in third-party/superpowers/) ends at the merge. For repos that do not auto-deploy that is the correct boundary. For repos that DO auto-deploy from main (Railway, Cloudflare Workers, Vercel, Netlify, Fly.io, Cloud Run, App Runner, et al.) the merge is only the trigger — the work is not done until the deployed SHA matches the merged HEAD and the application answers a healthcheck.
This skill defines the receipt that closes that gap, without modifying the vendored upstream file.
Activate when ALL of the following are true:
main or master) has just landedbash "${CLAUDE_PLUGIN_ROOT}/scripts/detect-deploy-target.sh" (source: scripts/detect-deploy-target.sh) returns a value other than none at the repo root. The script encodes the full file-marker table — railway.toml / railway.json → railway, wrangler.toml / wrangler.jsonc → cloudflare, vercel.json / .vercel/ → vercel, netlify.toml → netlify, fly.toml → fly, app.yaml → appengine, apprunner.yaml → apprunner, .github/workflows/*.yml with a deploy: job → gha-deploy. First match wins, in that order. The script is the source of truth; the file list above is documentationfinishing-a-development-branch has reported "merged" — not "PR opened", not "review pending"Do NOT activate when:
wrangler deploy themselves) — the merge is genuinely the boundarydevelop, staging-only, experimental)A deploy receipt has three components, all required:
GET /health, GET /api/health, GET /version) returns HTTP 200 within a reasonable timeout (default 5 minutes from merge).not verifiable for this provider — it does not block the receipt, but the gap is logged.A receipt missing any required component is NOT a receipt. The merge is reported as merged but not deployed — operator action required per the close-the-loop rule below.
The skill is provider-aware but never hardcodes a specific API key or token shape. Three verification routes, in priority order:
The CLI is the highest-fidelity source. Run bash "${CLAUDE_PLUGIN_ROOT}/scripts/get-deployed-sha.sh" <provider> (source: scripts/get-deployed-sha.sh) — the script owns the per-provider pipeline (CLI + jq filter) and prints just the SHA on stdout. Inspect the pipeline shape without executing via bash "${CLAUDE_PLUGIN_ROOT}/scripts/get-deployed-sha.sh" --show-command <provider>.
Provider-to-pipeline map (cited from the script, not redefined here):
| Provider value | CLI |
|---|---|
railway | railway |
cloudflare | wrangler |
vercel | vercel |
netlify | netlify |
fly | fly |
Exit codes from the script: 0 on success (SHA printed), 2 on missing/unknown provider (usage error), 3 when the required CLI is not installed locally — that is the fall-through signal to Route B, not a hard failure. Do NOT prompt the operator to install the CLI mid-session — that is a drive-by.
gh api repos/{owner}/{repo}/deployments --jq '.[0] | {sha, ref, environment}'
gh api repos/{owner}/{repo}/deployments/{id}/statuses --jq '.[0] | {state, target_url}'
A state: success status whose parent deployment's sha matches the merge SHA is a valid receipt component (1).
The most provider-agnostic. Requires the application to expose a version endpoint that returns its build SHA.
curl -fsS https://<deployed-host>/version
# Expect a JSON body or plain text containing the merge SHA, e.g. {"commit":"a477ec1"}
# Or a Git-style SHA prefix that matches `git rev-parse --short HEAD`
If no version endpoint exists in the project, log this as a gap and recommend adding one as a deferred follow-up — do not fabricate a receipt from a 200 on / or /health alone, because both can succeed against the OLD deploy.
After running verification:
## Deploy Receipt — <project name>
- Merge SHA: <abbreviated sha>
- Deployed SHA: <abbreviated sha or "not retrieved (reason)">
- SHA match: yes | no | not verifiable
- Health endpoint: <url> → <status code> in <ms>ms
- Build artifact: <digest if available, else "not emitted by provider">
- Receipt status: COMPLETE | INCOMPLETE — <reason>
- Verified via: CLI | GitHub Deployments | version curl | combination
A COMPLETE receipt is the only state that lets the merge be reported as done. INCOMPLETE receipts surface a single named operator-action item (e.g. "Railway last deploy is older than the merge — re-trigger from dashboard or railway up").
The default behavior on INCOMPLETE is report-only — the receipt block names the gap, the operator decides recovery. A second mode is available for projects that want the skill to also stage a recovery branch and a failing repro test, without ever executing rollback or merge.
report-only (default)The current behavior. Print the receipt block, surface the named operator-action item, hand off. No branch creation, no PR opened. Use this mode when the operator is at the keyboard and will react to the receipt directly. No flag required.
open-hotfix-pr (opt-in)Use this mode when the receipt is INCOMPLETE AND a documented recovery window has elapsed without the deploy self-correcting (default 10 minutes from merge; tunable per project via verify-ladder.json deploy_receipt_recovery_window_seconds). The skill then stages a recovery branch for the operator to review, but never merges or rolls back on its own.
Activate with the explicit invocation:
deploy-receipt --on-incomplete=open-hotfix-pr
When triggered, this mode performs four steps in order, halting on the first failure:
git checkout -b hotfix/<merge-sha-short>-<symptom-slug> origin/<deploy-branch>. The symptom slug is derived from the named gap on the receipt — sha-mismatch, health-non-200, version-endpoint-stale, or no-provider-source. If the slug cannot be derived, halt and revert to report-only.tests/regressions/deploy-<merge-sha-short>.test.<ext> that asserts the gap (e.g. expect(deployedSha).toEqual(mergeSha) or expect(healthResponse.status).toBe(200)). The test MUST currently fail when run against production. The skill writes the assertion against the receipt's recorded values, not against speculation. If the test cannot be made to fail deterministically, halt and revert to report-only.gh pr create --base <deploy-branch> --head hotfix/... --draft with body that cites the receipt block verbatim, the merge SHA, the deployed SHA, the named gap, and the documented rollback command for the detected provider (a one-line shell snippet from the table below). Draft state is mandatory — never open as ready-for-review without operator approval.| Provider | Documented rollback command |
|---|---|
| Railway | railway redeploy --service <service-id> --commit <previous-good-sha> |
| Cloudflare Workers | wrangler rollback --message "deploy-receipt: <merge-sha-short> failed health/SHA gate" |
| Vercel | vercel rollback <previous-good-deployment-url> |
| Netlify | netlify rollback (interactive — operator picks the prior deploy) |
| Fly.io | fly releases rollback <previous-good-version> |
The rollback command is printed, not run. The skill's job is to give the operator a complete recovery packet (branch + failing test + cited command) without taking the irreversible step itself.
git log origin/<deploy-branch> alone — the rollback command in the PR body would be a guess. Fall back to report-only and name the gap as "previous-good SHA unverifiable — operator must select".Deployed SHA: not retrieved and a comment like "deploy will pick up shortly" is exactly the failure mode this skill prevents. There is no eventually — there is COMPLETE or INCOMPLETE./health against a stale deploy is not a receipt. Without SHA match, the receipt is INCOMPLETE.INCOMPLETE — no provider source available, not COMPLETE (assumed).--admin overrides, and gh pr merge calls are refused inside this skill. The hotfix is the operator's decision; the skill stages it but never lands it.origin/<deploy-branch> once and pushes once. If the failing test needs changes, the skill writes a new commit on the branch — never --force and never git rebase --interactive.railway redeploy, wrangler rollback, vercel rollback, etc. on its own. If the operator wants execution, they run it themselves or they wire a separate runner; that is a different skill.finishing-a-development-branch (vendored, third-party/superpowers/) — runs first; reports the merge. This skill runs after.verification-loop — same Law 4 family; this skill is the deploy-seam specializationproceed-with-the-recommendation — routing-table row for "Merge / close branch" should pair finishing-a-development-branch with this skill when the project is auto-deploygateguard — orthogonal; gateguard gates the destructive op, this verifies post-deploy stateIf the receipt is INCOMPLETE, the merge is NOT reported as a closed item in the Phase 7 summary of proceed-with-the-recommendation. It moves to What is next → Immediate operator action, with the named action and the exact command or dashboard step. The operator's session record is what determines done — not the agent's optimism.
mkdir -p ~/.claude/skills/deploy-receipt
curl -L https://raw.githubusercontent.com/naimkatiman/continuous-improvement/main/skills/deploy-receipt.md \
-o ~/.claude/skills/deploy-receipt/SKILL.md
Restart the Claude Code session so the registry picks it up.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub naimkatiman/continuous-improvement --plugin continuous-improvement29 skills in this plugin
/auditEnforces Law 4 (Verify Before Reporting) of the 7 Laws of AI Agent Discipline. Audits a window of recent commits for real defects, confirms each finding before touching code so false positives die first, and checks every surface a change touches — so 'looks done' is never mistaken for 'is correct'./be-ambitiousGuidance for Law 2 (Plan Is Sacred) of the 7 Laws of AI Agent Discipline. Takes one task and works it at three kinds of ambition (Altitude, the goal behind the task; Depth, the way the best person in the field would do it; Range, other fields doing their real work), fixes a numeric target and an outside judge before the work starts, then does the work. It tells the agent to deliver the literal ask and to wait for a yes on anything hard to reverse. Method from Felix Rieseberg's "How to be more ambitious", restated./continuous-improvementThe discipline pillar, beside the be-ambitious skill (ambition). Tells the agent to work a task in seven steps: research, plan, implement, review, contemplate, relearn and learn, iterate. Lessons are saved as instincts; analysis runs on demand or weekly to save tokens./gateguardEnforces Law 1 (Research Before Executing) of the 7 Laws of AI Agent Discipline. Pre-edit gate that denies an Edit/Write/MultiEdit of an existing file the session has not read and gates every destructive shell command. Set CI_GATEGUARD_FILE_GATE=strict for the fact-forcing gate, which demands concrete investigation (importers, data schemas, user instruction) before the first edit of each file and measured +2.25 points vs ungated agents./goal-monitorEnforces Law 2 (Plan Is Sacred) of the 7 Laws of AI Agent Discipline. Detects when a session has drifted away from its stated goal by scoring recent tool activity against the '## Goal' section of task_plan.md, so drift is caught mid-session instead of at end-of-session reflection./grill-meEnforces Law 1 (Research Before Executing) of the 7 Laws of AI Agent Discipline. Interview the user relentlessly about a plan or design until shared understanding is reached, resolving every branch of the decision tree before any code is written. Ported from mattpocock/skills under MIT.Other plugins' skills for the same job