vercel-preview-cleanuplisted
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