skills/release-pr-gates/SKILL.md
Gate a release on the trunk — verify required CI checks are green, then cut a release (semver tag + GitHub release) or open a release PR into the default branch. Deployment to staging and production environments is driven by CI/CD pipelines and tags, not branch PRs. Use when the user asks to release, open a release PR, cut a tag, wait for GitHub checks to go green, or verify the trunk is ready to release.
npx skillsauth add shipshitdev/library release-pr-gatesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Verify required CI checks are green on the trunk, then cut a release (semver tag + GitHub release) or open a release PR targeting the default branch. Staging and production are deployment environments driven by CI/CD and tags — not long-lived branches.
Inputs:
Outputs:
Creates/Modifies:
External Side Effects:
Confirmation Required:
Delegates To:
gh-fix-ci when checks failchangelog-generator when a release body needs commit summariesdeploy after release gates pass and provider deployment is neededVerify GitHub CLI and auth:
gh --version
gh auth status -h github.com
Verify clean release context:
git status -sb
git remote -v
git fetch --all --prune
Identify the repository and default branch (the trunk):
gh repo view --json nameWithOwner,defaultBranchRef --jq '{repo:.nameWithOwner,trunk:.defaultBranchRef.name}'
Fallback if GitHub CLI is unavailable:
git symbolic-ref refs/remotes/origin/HEAD | sed 's|refs/remotes/origin/||'
Confirm the trunk is ahead of or at the expected state:
git log --oneline origin/<trunk> -10
All PRs target the trunk (default branch). Choose the head in this order:
There are no develop, staging, or other long-lived promotion branches.
Require explicit user confirmation before merging into the trunk.
Run local quality gates before opening or updating the release PR. Format, lint, and type-check are mandatory because they mirror GitHub Actions and are cheap to run locally:
bun run format || npm run format || bunx biome check --write .
bun run lint || npm run lint || bunx turbo lint
bun run typecheck || bun run type-check || npm run typecheck || npm run type-check || bunx tsc --noEmit
Fix failures before pushing. Do not open a release PR with known local format, lint, or type errors.
Inspect divergence between the source branch and the trunk:
git log --oneline origin/<trunk>..origin/<head>
git diff --stat origin/<trunk>...origin/<head>
Check for an existing open PR targeting the trunk:
gh pr list --head <head> --base <trunk> --state open --json number,url,headRefName,baseRefName
If no open PR exists, create one:
gh pr create --head <head> --base <trunk> --title "Release: <head> → <trunk>" --body-file <body-file>
The PR body should include:
<trunk>..<head>If an open PR already exists, reuse it. Do not create duplicates.
Mark the PR ready for review only if the user requested a non-draft PR or the repository release convention requires ready PRs.
After creating or finding the PR, wait for GitHub checks:
gh pr checks <number> --watch
If --watch is not available or fails, poll checks:
gh pr checks <number>
Quality gate outcomes:
pass: report the PR is green and ready for review or merge.fail: fetch the failing workflow logs and summarize root cause.pending: keep waiting unless the user asks for a status-only update.skipping or no checks: report exactly what GitHub shows; do not call it green
unless required checks are passing or absent by repository policy.For failed GitHub Actions runs, inspect logs:
gh run view <run-id> --log
Do not rerun workflows unless the user asks.
After gates pass and the PR is merged (or if releasing directly from the trunk), cut a semver tag and GitHub release:
Confirm the tag with the user before creating it.
Create the tag on the trunk HEAD:
git tag v<semver> origin/<trunk>
git push origin v<semver>
Create the GitHub release:
gh release create v<semver> --title "v<semver>" --notes-file <release-notes-file> --target <trunk>
Deployment to staging and production environments is then triggered automatically by CI/CD pipelines that react to the tag — not by merging into additional long-lived branches.
Report:
development
TypeScript refactoring and modernization guidelines from a principal specialist perspective. This skill should be used when refactoring, reviewing, or modernizing TypeScript code to ensure type safety, compiler performance, and idiomatic patterns. Triggers on tasks involving TypeScript type architecture, narrowing, generics, error handling, or migration to modern TypeScript features.
tools
Resolves TypeScript and JavaScript problems across type-level programming, performance, monorepo management, migration, and modern tooling. Invoke when diagnosing "type instantiation excessively deep" errors, migrating JS to TS, configuring strict tsconfig, debugging module resolution, or choosing between Biome/ESLint/Turborepo/Nx.
tools
Turborepo monorepo build system guidance. Triggers on: `turbo.json`, task pipelines, `dependsOn`, caching, remote cache, the `turbo` CLI, `--filter`, `--affected`, CI optimization, environment variables, internal packages, monorepo structure, and package boundaries. Use when the user configures tasks or workflows, creates packages, sets up a monorepo, shares code between apps, runs changed packages, debugs cache behavior, or works in an `apps/` plus `packages/` workspace.
tools
Provides Tailwind CSS v4 performance optimization and best practices guidelines. Triggers when writing, reviewing, or refactoring Tailwind CSS v4 code; when working with Tailwind configuration, @theme directive, utility classes, responsive design, dark mode, container queries, or CSS generation optimization.