← ClaudeAtlas

vercel-preview-cleanuplisted

Install a GitHub Actions workflow that deletes a branch's Vercel PREVIEW deployments when that branch is deleted — every deployment it accumulated, not just the aliased URL (Vercel keeps one immutable deployment per push, so a 15-push branch leaves 15 live URLs). Requires Vercel; if you just want stale git branches deleted, use the branch-cleanup skill instead. Use when asked to clean up / delete orphaned Vercel preview deployments, stop preview deployments piling up, remove previews for merged or deleted branches, wire an `on: delete` cleanup workflow, reconcile Vercel deployments against branches that still exist, back-fill deletion of previews already accumulated, or do Vercel deployment housekeeping across a monorepo's projects.
stealth-factory/skills · ★ 3 · Code & Development · score 72
Install: claude install-skill stealth-factory/skills
# Vercel preview cleanup Authors a GitHub Actions workflow that removes a branch's preview deployments once the branch is gone. **This skill installs workflows; it never deletes anything itself.** At runtime there is no agent and no model call — deterministic bash + `curl` only. Verified API detail (endpoints, pagination, rate limits, retention) lives in [`reference/vercel-api.md`](./reference/vercel-api.md) — read it before changing the delete logic. ## Step 0 — prerequisites (check before installing) This skill is **downstream of branch deletion**. If branches are never deleted, the `delete` event never fires and this workflow looks broken when it isn't. 1. **`delete_branch_on_merge` is on:** `gh api repos/{owner}/{repo} --jq .delete_branch_on_merge` → if `false`, install [`branch-cleanup`](../branch-cleanup/SKILL.md) first (it enables this and adds the closed-unmerged + orphan-sweep paths). 2. **A branch-cleanup workflow exists** (`.github/workflows/` — closed-unmerged path). Without it, only *merged* branches get deleted; abandoned ones linger forever and so do their previews. **Install `branch-cleanup` first.** It is the prerequisite, not an optional companion. > Neon's Vercel integration reaps preview *database* branches when the git branch > disappears — no code needed here. It is another reason timely branch deletion matters. ## The problem this solves Vercel creates a **new immutable deployment per push**. The branch alias repoints to the newe