agentleFS
AvinavaAvinava/agentic-react-express-ts/skills/deploy-checklist/SKILL.md

deploy-checklist

Skill0 starsChanged 6 months agoMITView on GitHub

Use before pushing to a deployed environment (staging or prod). Walks through env vars, migrations, secrets, build, and rollback prep.

  • Reads credentials

14 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use tdd and grill-me.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • GoogleSkill

    tdd

    Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.

    Also in 3 projects that use this

  • GoogleSkill

    grill-me

    A relentless interview to sharpen a plan or design.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 14 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run through this before every deploy.

    line 8
  2. Very specific:

    Every variable in example.env must exist in the deploy target with a real value:

    line 12
  3. Distinctive:

    Run on your local machine pointing at the prod env (carefully):

    line 18
  4. Distinctive:

    If that errors, fix the connection string before deploying.

    line 25
  5. Distinctive:

    If gitleaks finds anything in history, stop.

    line 41
  6. Very specific:

    Check .env is in .gitignore:

    line 43

“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Deploy checklist

Run through this before every deploy. Skipping it is how outages happen.

1. Environment variables

Every variable in example.env must exist in the deploy target with a real value:

  • DATABASE_URL — points at the production Postgres (not local!)
  • PORT — matches what the platform expects (usually set by the platform itself)
  • NODE_ENV=production

Run on your local machine pointing at the prod env (carefully):

# Confirm the deployed app can reach the prod DB.
DATABASE_URL="<prod url>" npx prisma db pull --print | head -20

If that errors, fix the connection string before deploying.

2. Database migrations

DATABASE_URL="<prod url>" npx prisma migrate deploy

migrate deploy is the only command safe for production — it never resets, never prompts. Never run migrate dev against prod.

3. Secret hygiene

npx gitleaks detect --no-banner

If gitleaks finds anything in history, stop. Rotate the leaked credential and force-push only after coordinating with the user. Hardcoded secrets are the #1 cause of preventable breaches.

Check .env is in .gitignore:

git check-ignore .env    # must print ".env"

4. Build

npm run build

Both the client (vite build) and server (tsc -p tsconfig.server.json) must build clean. If either errors, deploy fails — fix locally first.

5. Run the full guardrail pass

npm run typecheck && npm run lint && npm run lint:unused && npm run test:run

CI does this too, but running locally first catches issues before they waste deploy time.

6. Smoke test the build

NODE_ENV=production node dist/server/index.js
# In another terminal:
curl http://localhost:3001/api/health

{ "status": "ok", "env": "production" } means the server started cleanly. Hit a tRPC endpoint too:

curl http://localhost:3001/trpc/contact.list

7. Rollback plan

Know how you'll roll back before you deploy:

  • Platform redeploy of previous build (most platforms: 1 click)
  • prisma migrate resolve --rolled-back <migration-name> if a migration corrupted state
  • DB backup snapshot before the deploy (use the platform's built-in snapshot)

Checklist

  • Prod env vars set and verified
  • prisma migrate deploy succeeded
  • gitleaks detect clean
  • .env is in .gitignore
  • npm run build succeeds locally
  • typecheck, lint, lint:unused, test:run all pass
  • Smoke test against production build succeeds
  • DB snapshot taken; rollback path identified

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.