Skip to content

About

Five pre-deploy checks for AI-built apps: shipped secrets, tests that don't test, regressions, contract drift, and broken previews. Agent skills for Claude Code, Cursor, and Codex.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

20 Commits

Folders and files

Repository files navigation

predeploy-checks

Your AI-written tests are green. That doesn't mean they prove anything.

Five pre-deploy checks for AI-built apps. For code you did not fully write.

agent skills checks release license: MIT

Works with Claude Code, Cursor, and Codex. Runs locally. No telemetry. No data sent to us.

CI verifies the fixture tests and docs; the skills themselves are instructions for your agent.

Quick start

git clone https://github.com/Tygors/predeploy-checks.git \
  && mkdir -p ~/.claude/skills \
  && cp -r predeploy-checks/skills/* ~/.claude/skills/

Then ask your agent to audit your tests or check a preview URL. Cursor and Codex paths are in Install.

See it in action

The suite is green here, but four of its five tests do not prove the behavior they name:

Test audit demo

Replay built from the fixture; output condensed.

More demos · Install

The problem

Vibe coding makes the first version cheap. The expensive part comes later:

  • The test suite is green because every test mocks the thing it is supposed to check.
  • The preview returns 200 but renders a blank page.
  • A key ends up in the client bundle or a public preview.
  • A source map lets anyone rebuild the source.
  • A change breaks a flow that no test covers, and nothing tells you.

If you build with AI and cannot review every line, "it works" is not evidence. These checks read the evidence for you.

Made for indie hackers, designers, product people, and developers working outside their main stack.

The matrix

Check Question When Status
secret-leak-check What does the shipped output expose? Before deploy Available
test-audit Do the tests actually prove anything? Before merge Available
regression-check What did this change break? Before merge Available
contract-check Do the frontend, backend, and environment still agree? Before deploy Available
preview-check Does the preview work before production? After preview deploy, before production Available

Install

One SKILL.md per check works in all three tools. From a clone of this repository:

git clone https://github.com/Tygors/predeploy-checks.git
cd predeploy-checks

Copy every check:

mkdir -p ~/.claude/skills && cp -r skills/* ~/.claude/skills/

Or install one:

mkdir -p ~/.claude/skills && cp -r skills/test-audit ~/.claude/skills/
Tool Skills directory
Claude Code ~/.claude/skills/
Cursor ~/.cursor/skills/
Codex ~/.codex/skills/

Cursor also reads ~/.claude/skills/ and ~/.codex/skills/, so a single Claude Code install is usually enough.

On Windows, run the commands in Git Bash, or copy the folder with PowerShell:

Copy-Item -Recurse .\skills\* "$HOME\.claude\skills\"

Use

Ask your agent:

Check this preview URL before I deploy: https://example-preview.vercel.app

Scan ./dist for leaked secrets and source maps before I ship.

Audit my tests. They all pass, but I don't trust them.

The checks

secret-leak-check

Scans the deployable output, not the git history: built assets, preview URLs, source maps, and publicly readable .env, .git, and .DS_Store files.

Secrets are reported by type and location, never printed in full. Public-by-design keys such as Supabase anon and Stripe publishable keys are allowlisted.

secret-leak-check gitleaks / detect-secrets
Scans built assets and preview URLs git history and repository files
Source maps yes, including sourcesContent no
Runs as Claude Code / Cursor / Codex skill standalone binary
Best for pre-deploy gate commit-time scanning

test-audit

Runs the existing test suite, then explains what each test actually proves. It flags tests that pass without proving the behavior they name: no assertion, assertion on a mock, tautological checks, skipped tests, and implementation-coupled tests.

It also maps critical behaviors such as login, payment, and data writes to the tests that cover them, and lists the behaviors with no real test.

Verdicts: TRUSTWORTHY, PARTIAL, THEATER (green, but not proving the critical path), or NO TESTS. It does not rewrite tests, and it does not treat line coverage as proof.

regression-check

Reviews only the current change set, then maps changed behavior to the tests and consumers that exercise it. It flags behavior that changed without a test, and breaking interfaces: a renamed response field, a removed flag, a new required env var, or a destructive migration.

Verdicts: SAFE, REVIEW, BLOCK, or NO CHANGES. It does not audit the whole suite; use test-audit for that.

contract-check

Compares frontend API calls with backend routes, and env vars with their declarations. It catches a client calling a route the server does not define, a method mismatch, and a required variable missing from .env.example or deploy config.

Verdicts: IN SYNC, DRIFT, BROKEN, or NO CONTRACT. It is static by default and does not need a running server; response fields are only checked when an OpenAPI schema or contract test exists.

preview-check

Checks a preview deployment before you promote it: critical routes, same-origin scripts and stylesheets, the rendered DOM in headless Chrome, error pages, blank app roots, mixed content, and unexpected login redirects.

Verdicts: FAIL, WARN, or PASS. It does not log in, click through flows, or capture console/network errors; those need a browser driver. It is the last gate before production, not a production monitor.

Demo

The test-audit demo is above. The other checks:

Secret scan on a local build:

Local build scan

Recorded from a real Claude Code session; output condensed.

For the preview URL scan and the safe fixture, see examples/vulnerable.

Regression check on a change set:

Regression check demo

Replay built from the fixture; output condensed.

Run the diff yourself:

git diff --no-index -- examples/regression-demo/before examples/regression-demo/after -- '*.py'

Then ask your agent to review the change before you merge. Both versions pass their tests; one consumer is still broken. The expected findings are in examples/regression-demo.

Contract check on a static frontend/backend/env fixture:

Contract check demo

Replay built from the fixture; output condensed.

Then ask your agent:

Check whether the frontend, backend, and environment agree in examples/contract-demo.

No server or install is needed. The client calls a route the backend does not define, and a required env var is undeclared. The expected findings are in examples/contract-demo.

Preview check on a broken local preview:

Preview check demo

Replay built from the fixture; output condensed.

Run it:

python examples/preview-demo/server.py 8000

Then ask your agent to check http://localhost:8000 before you promote it. The homepage returns 200 but renders an empty root, the main script 404s, and a linked route returns 500. The expected findings are in examples/preview-demo. Stop the server with Ctrl+C.

Why not just use X?

These checks complement existing tools; they do not replace them.

Instead of It does What it misses here
gitleaks / detect-secrets scans git history and repository files secrets that appear only in built output or a preview URL; exposed source maps
Playwright / Cypress drives real user flows whether a preview is blank, the main script 404s, or a route returns 500, without writing a suite
coverage counts lines that ran a line can run with no assertion; green tests can still be theater
linters / type checkers syntax and types renamed response fields, missing routes, undeclared env vars, untested diffs
CI runs what you configure choosing the checks and explaining the findings in plain language

Keep gitleaks for history, Playwright for critical flows, and coverage as a signal. Use these checks as the pre-deploy gate.

FAQ

Is this just prompts?

They are agent skills: Markdown instructions your agent follows. The check work uses local tools (grep, curl, headless Chrome) and fixed rubrics. secret-leak-check, contract-check, and preview-check are mostly deterministic; test-audit and regression-check are judgment-assisted and cite file:line. They are not a magic scanner, and they are not proof of correctness.

Does it upload my code?

The skills have no telemetry and send nothing to us. When you run them through Claude Code, Cursor, or Codex, your agent may send file context to its model provider under that provider's policy. "Runs locally" means the checks execute on your machine, not that your agent never talks to a model.

How is this different from gitleaks / Playwright / CI?

See Why not just use X?. They are complements: gitleaks scans git history, Playwright drives user flows, and CI runs what you configure.

What does the CI badge test?

The fixture suites and the documentation checks. It does not run the skills themselves; the skills are instructions for your agent.

Design rules

  • One question per check.
  • Evidence over scores: every finding cites file:line.
  • Plain language: define assertion, mock, snapshot, and coverage on first use.
  • Read-only unless the user asks for a fix.
  • Runs locally: no telemetry, no data sent to us.
  • No configuration; detect the stack.
  • High signal: a false alarm costs more trust than a missed edge case.

Roadmap

  • An optional CLI to run the matrix in one command.
  • A browser-driven mode for console errors, failed network requests, and authenticated flows.

Contributing

Reports of false positives, missed findings, and weak tests are welcome. See CONTRIBUTING.md and the issue templates. Looking for a first contribution? See the good first issues.

If a check saves you a deploy, a star helps someone else find it. If it misses something, open an issue.

License

MIT

About

Five pre-deploy checks for AI-built apps: shipped secrets, tests that don't test, regressions, contract drift, and broken previews. Agent skills for Claude Code, Cursor, and Codex.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors