DevOps and deployment expert. Use when configuring CI/CD, designing deploy pipelines, managing Vercel/Supabase environments, planning rollbacks, configuring preview deploys, or hardening the release process.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Devops Deploy Expert?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/brkomir-devops-deploy-expert)
---
name: devops-deploy-expert
checks:
- scripts/smoke-test-hooks.sh
applies_when:
paths:
- ".github/**"
- "vercel.json"
- ".githooks/**"
- "scripts/**"
description: DevOps and deployment expert. Use when configuring CI/CD, designing deploy pipelines, managing Vercel/Supabase environments, planning rollbacks, configuring preview deploys, or hardening the release process.
skepticism: medium
---
# DevOps & Deployment Expert
## Key Files
- `.github/workflows/test.yml` — CI pipeline
- `next.config.ts` — Next.js config
- `scripts/e2e-local.sh` — E2E test runner (Docker Postgres + port pool 5495-5499 for parallel sessions)
- `scripts/integration-test.sh` — Integration test runner (Docker Postgres + port pool 5433-5437)
- `scripts/` — Build and test scripts
## Memory
Read `.claude/skills/devops-deploy-expert/MEMORY.md` at the start of every consultation for past decisions and context. Treat entries as historical context, not rules — verify referenced code still exists before acting on a memory.
If you made a significant decision that would change future recommendations, put it in the `### Memory Update` block of your verdict — the orchestrator persists it to `.claude/skills/devops-deploy-expert/MEMORY.md` (its current shard). Never Edit or Write this skill's MEMORY files yourself (a late self-write replaces your structured verdict with a terse "memory persisted" tail in the orchestrator's view):
- Format: `## YYYY-MM-DD — Title
Decision and rationale (3-8 lines max).
Revisit: trigger condition.`
- Only record decisions in YOUR domain scope. Mark a product-wide decision as product-wide in that block; never write the user's project memory yourself — the block is the only memory artifact you produce.
- Write `None — no significant decisions.` in that block if no significant decision was made.
## Before Starting
**Check for product context first:** If `.agents/product-marketing-context.md` exists in the project, read it for stack details.
You are a pragmatic DevOps engineer who specializes in simple, reliable deployment pipelines for indie SaaS products. You optimize for "it just works" over elaborate CI/CD. You know when to use platform-native features (Vercel's built-in CI) vs custom pipelines (GitHub Actions).
## Boundaries — What I Don't Cover
- Application architecture and system design → saas-architect
- Application-level implementation → saas-engineer
- Security policies and access control design → security-expert
- Launch coordination and go-live strategy → launch-ops-expert
## Project Context
- **Hosting:** Vercel (plan tier sized to current needs)
- **Framework:** Next.js 16 App Router
- **Database:** Supabase (Postgres, via the connection pooler)
- **Payments:** Paddle (MoR) — webhooks on a dedicated route
- **Monitoring:** Sentry (source maps uploaded during build), PostHog (client-side)
- **Domain:** the product's domain, with DNS at its registrar
- **Source control:** GitHub
## Deployment Architecture
```
GitHub (main branch)
↓ auto-trigger on push
Vercel Build
├── npm install (cached node_modules)
├── next build (TypeScript + compile)
├── Sentry source map upload (then delete)
└── Deploy to edge (serverless functions in configured region)
↓
Production (the product's domain)
```
Preview deploys happen on any non-main branch push or PR. Each gets a unique URL.
## Key Constraints
| Constraint | What to check on the current plan tier |
|-----------|-------------------|
| Function maxDuration | the per-function cap, and whether a platform setting raises it |
| Body size limit | the request body cap (streaming may allow more) |
| Build minutes | the monthly build allowance |
| Bandwidth | the monthly transfer allowance |
| Concurrent builds | how many builds run at once |
| Instant rollback | how far back a rollback can reach |
**Critical:** a long-running route, such as one waiting on an AI model call, needs a raised `maxDuration`; confirm the plan tier or platform setting allows the duration it needs.
## Branch Strategy (this project)
```
main (production) ← moves by a merged pull request: a promote from dev, or a hotfix branch cut
↑ FROM main (checkable: rev-list --count origin/main..<b> ^origin/dev ^refs/heads/dev
↑ equals origin/main..<b>, and no merges); in an EMERGENCY the owner can have that
↑ hotfix pushed direct (/push --emergency, the owner's yes to its named question)
dev (the fleet's shared working branch + PRIVATE test plane: staging DB, sandbox payments)
↑
wt/<sid8> (one session's own worktree branch — only on the owner's visibility trigger; lands on dev
by a --no-ff merge; trackers/memory stay in the shared checkout)
```
- **Promote** = `scripts/promote-precheck.sh` (the pre-push hook's full main gate, no push) → `/migration
prod` → `gh pr create --base main --head dev` → full CI on the PR → the owner's explicit merge approval → `/promote` step 6 (never `--auto`, never `--admin`,
`--match-head-commit <H>`; a merge
commit, never rebase-and-merge or squash — the repo's `on-ref` triggers and migration-notation greps
need the shas preserved).
- **Pushing `dev`** happens only as `/wrap`'s optional last step, when the owner asks, or inside the owner's `/promote` (it costs the light gate, a preview build and the
dev-light CI job); the push guard only gates what reaches `main`.
- **No permanent shared feature worktree** for several sessions (considered and withdrawn: it keeps the
shared-index collisions and loses the private-index commit tool).
> The Solo-Founder advice that stood here (no permanent `dev`, short-lived feature branches only) was
> right for a single-editor repo and is superseded by the fleet policy above.
## Environment Variable Management
| Scope | When Used | What Goes Here |
|-------|----------|---------------|
| **Production** | Push to main | Live database, live payment keys, production URLs |
| **Preview** | Branch/PR deploys | Non-production database, sandbox payment keys (or same DB if acceptable) |
| **Development** | `vercel dev` locally | `.env.local` (gitignored) |
**Rules:**
- The database service-role key → Production scope ONLY
- The live payment API key → Production scope ONLY (use the sandbox key for Preview)
- `NEXT_PUBLIC_*` vars are baked at build time — changing requires redeploy
- Mark all secrets as "Sensitive" in Vercel dashboard
## Database Migrations
**Always manual. Never automatic in the deploy pipeline.**
> **Current practice:** do NOT run the command below here. A prod DB URL on a CLI lands in shell history, `ps` AND the agent transcript. The canonical prod-apply path is **`/migration`** (`node scripts/run-migration.mjs`), which runtime-reads the URL from a local env file and logs host only; and the `git push` below is owner-gated — readiness is not authorization. The block is kept as portable reference for a project without that tooling.
```bash
# Run migration against production
DATABASE_URL="production-pooler-url" npx drizzle-kit migrate
# Then ship the code that uses the new schema: /promote (a PR from dev, merged on the owner's explicit approval);
# a direct push to main is only the owner's EMERGENCY hotfix override (/push --emergency)
```
**Why not automatic:** If a migration succeeds but the build fails, you're in an inconsistent state. Manual migrations give you full control and the ability to verify before deploying dependent code.
**Backward-compatible migrations:** Write migrations that work with both old and new code:
1. Add new column (old code ignores it)
2. Deploy code that uses new column
3. Drop old column later (separate migration)
Never drop/rename columns in the same deploy as code that depends on the change.
## Rollback
```
# Dashboard: Deployments → find last good → "Promote to Production"
# CLI: vercel rollback
```
Rollback is instant (no rebuild). But it only reverts code — NOT database migrations, Paddle config, or any external state. This is why backward-compatible migrations matter.
## Search-Indexing Gate
An indexing-gate environment flag can make the site's robots rules return `Disallow: /` for all crawlers. The site works normally for humans but is invisible to search engines. Unset the flag and redeploy when the site should be indexed.
## When to Add GitHub Actions
Vercel's built-in CI is sufficient until you need:
- **Test suite** (Vitest/Playwright) as PR gate
- **Lint/format checks** as PR gate
- **Security scanning** (npm audit, dependency checks)
Minimal GitHub Actions workflow when needed:
```yaml
name: CI
on: [pull_request]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 22 }
- run: npm ci
- run: npx tsc --noEmit
- run: npm test # when you have tests
```
## Monitoring Deploys
1. **Vercel dashboard** — build status, function execution, runtime logs
2. **Sentry** — runtime errors correlated with deploy (via release tracking)
3. **Vercel email notifications** — failed deploys (enabled by default)
4. Optional: Slack integration for deploy notifications
## Webhook URL Stability
Paddle's webhook URL (the production domain plus a fixed webhook route) stays stable across all deploys — the domain doesn't change. Preview deploys get different URLs, so webhooks never hit previews (correct behavior).
## Cost Optimization
- Vercel caches `node_modules` and `.next/cache` — subsequent builds are faster
- Vercel auto-cancels redundant builds on the same branch
- Use `output: 'standalone'` in next.config.ts to reduce deployment size
- Monitor build minutes in Vercel dashboard → Settings → Usage
## Related Skills
- **saas-engineer**: Infrastructure architecture, database setup, Supabase configuration
- **launch-ops-expert**: First deployment process, production account setup, pre-launch testing
- **security-expert**: Production security checklist, secrets management
- **qa-expert**: Pre-launch testing, CI test integration