deployment-and-ci
Skill2 starsChanged 6 months agoMITView on GitHub
Use when shipping a SaaS app to production — set up CI checks, preview deploys, environment/secret management, database migrations on release, and the health checks and rollback path that make deploys boring.
- Reads credentials
In this repository14 other files it gives its agents.
- api-routes-and-validationSkill
- authenticationSkill
- authorization-rbacSkill
- background-jobsSkill
- data-access-layerSkill
- database-schemaSkill
- environment-and-configSkill
- file-uploads-and-storageSkill
- multi-tenancySkill
- observability-and-errorsSkill
- payments-stripeSkill
- project-scaffoldingSkill
- subscription-billingSkill
- transactional-emailSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 42
Migrations on deploy: run drizzle-kit migrate as a release step *before* the new code serves traffic.
- Distinctive: line 46
Rollback path: keep the previous deploy one click away.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Deployment & CI
Overview
Shipping should be boring: every PR runs the same checks, merges get a preview, and main deploys automatically with migrations applied in order. Target Vercel (or Fly/Railway/containers) with secrets in the platform, a CI pipeline that gates merges, and a deterministic migration step on release. The goal is a fast, reversible path to production.
When to use
- Setting up the deploy pipeline for a new app.
- Adding CI checks or preview environments.
- Coordinating database migrations with releases.
CI pipeline
# .github/workflows/ci.yml
name: CI
on: { pull_request: { branches: [main] }, push: { branches: [main] } }
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 20, cache: npm }
- run: npm ci
- run: npm run lint
- run: npm run typecheck
- run: npm test
- run: npm run buildGate merges on this workflow. Keep it fast (cache deps, run in parallel) so people actually wait for it.
Releasing safely
- Migrations on deploy: run
drizzle-kit migrateas a release step before the new code serves traffic; make migrations backward-compatible (expand-then-contract) so old and new code coexist during rollout. - Preview per PR: Vercel builds a unique URL with its own env — review real behavior before merge.
- Secrets in the platform, scoped per environment (preview/prod). Never in the repo. Mirror
.env.example. - Health check (
/api/health) verifying DB connectivity; wire it to uptime monitoring. - Rollback path: keep the previous deploy one click away; never ship a destructive migration in the same release as the code that depends on it.
Pitfalls
- Destructive migration + code in one deploy — a column drop breaks the still-running old version mid-rollout. Expand, deploy, then contract in a later release.
- No CI gate — broken
mainblocks everyone; require checks to pass before merge. - Secrets in the repo or build logs — leak risk; use platform env and mask logs.
- Skipping the build step in CI — type errors and bad imports slip to production.
- No health check or monitoring — you learn about outages from users, not alerts.
- Long, uncached CI — people merge around it; keep it under a few minutes.
Hand-off
A boring, reversible deploy pipeline. It applies database-schema migrations, injects environment-and-config secrets, and uploads source maps for observability-and-errors. This is the last skill in the stack — you're in production.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

