Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Pre-Deploy Audit: Production Hardening

    1

    An evidence-based hardening audit that blocks production deploys on secrets, auth gaps, or unsafe migrations.

    $39

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Pre-Deploy Audit: Production Hardening

    Pre-Deploy Audit: Production Hardening

    Example session with this skill installed

    We are pushing to production on Vercel in 10 minutes. I need you to run a pre-deploy audit on this app.

    I don't have my terminal open in this window, so I'm just pasting the relevant files and outputs for you to review.

    Here is my git status:
    On branch main
    Your branch is up to date with 'origin/main'.

    Changes to be committed
    (use "git restore --staged <file>..." to unstage)
    new file: .env
    modified: src/lib/stripe.ts
    modified: src/components/CheckoutButton.tsx

    Here is my .env file:
    DATABASE_URL="postgresql://user:password@localhost:5432/prod_db"
    NEXT_PUBLIC_STRIPE_SECRET_KEY="sk_live_51Nx..."
    STRIPE_WEBHOOK_SECRET="whsec_..."

    Here is next.config.js:

    module.exports = {
      reactStrictMode: true,
    }
    

    I know the DB URL says localhost, but Vercel will override that with their env vars, so it's fine. Do the audit and tell me if we are good to go.

    • Read your context and instructions
    • Compiled the pre-deploy audit

    Verdict: NO-GO. I'm stopping the audit here. Your paste triggers the stop rule (leaked secret), so I haven't run Phases 2-6, and a GO on the rest would be misleading.

    Phase: 1 — Secrets and configuration (partial)
    Status: FAIL
    Findings:
    - [FAIL] .env is staged for commit — evidence: git status shows "new file: .env" under Changes to be committed; impact: live secrets enter git history and your remote on the next commit/push
    - [FAIL] Live Stripe secret key exposed via client prefix — evidence: .env line 2, NEXT_PUBLIC_STRIPE_SECRET_KEY="sk_live_..."; impact: Next.js inlines NEXT_PUBLIC_* vars into the browser bundle, so anyone can read the key and issue charges/refunds on your account
    - [FAIL] Production DB credentials in a file headed for git — evidence: .env line 1, DATABASE_URL with a prod_db name
    - [UNVERIFIED] .env is in .gitignore — reason: no git check-ignore output (and since .env is staged, it clearly isn't ignored)
    - [UNVERIFIED] .env not already in history/pushed — reason: git log --all --oneline -- .env not run
    - [UNVERIFIED] "Vercel overrides localhost" — reason: I can't see your Vercel dashboard. That claim is plausible, but it's an assumption, not evidence, and it doesn't matter until the above is fixed
    - [UNVERIFIED] Where the key is used — reason: stripe.ts and CheckoutButton.tsx weren't pasted. CheckoutButton is a client component, so if it reads this var, the key is in your bundle
    - [PASS] No source maps enabled — evidence: next.config.js sets only reactStrictMode (Next.js default is no browser source maps)
    Blocking: yes
    

    Fix in order (should fit in your 10 minutes if you don't skip steps):

    1. Unstage the file: git restore --staged .env (don't commit it).

    Ignore it: add .env* to .gitignore (keep a .env.example with fake values), then run git check-ignore -v .env .env.local .env.production and paste me the output.
    3.

    Check history: git log --all --oneline -- .env. If anything prints, the secrets are already in history and must be rotated.
    4. Find the usage: grep -rn "STRIPE_SECRET_KEY" src/ and paste the output.
    5.

    Rename the variable to STRIPE_SECRET_KEY (no prefix) in Vercel, and make sure it's only read in server code (API routes, server actions, stripe.ts on the server). The client should only ever see the publishable key (pk_live_...).
    6.

    Rotate the Stripe secret key (Stripe Dashboard > Developers > API keys > roll key) if NEXT_PUBLIC_STRIPE_SECRET_KEY was ever set in Vercel for a previous deploy, committed, or pushed. If it ever shipped in a client bundle, treat it as public. Rotate the webhook secret too if it was ever committed.
    7.

    Confirm in Vercel > Settings > Environment Variables that DATABASE_URL is set for Production and points to your real database, not localhost.

    Once you've done those and pasted the outputs, I'll continue with auth, migrations, build, observability, and content checks. Several of those (build, npm audit, route auth) need terminal output, so I'd need that too. Given the time left, a short delay to fix this beats shipping an exposed live Stripe key.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    A production hardening audit that blocks deployments until every security, data, and infrastructure check is verified with evidence. It prevents common catastrophic failures like leaked secrets, unprotected API routes, and destructive database migrations by demanding command outputs or file references for every claim.

    What it does

    • Secrets detection verifies that .env files are ignored, no keys exist in source or logs, and CORS is restricted to production origins.
    • Auth enforcement enumerates every API route to confirm server-side authentication and object-level authorization (BOLA) are present.
    • Data safety checks validates that migrations have rollback paths, are backward-compatible, and do not combine destructive operations with code changes.
    • Integrity verification runs dependency audits for critical vulnerabilities and ensures production builds are free of debug tools or source maps.
    • Observability audit confirms health check endpoints, error tracking initialization, and one-click rollback procedures are functional.

    How it works

    1. Trigger the audit by asking to "deploy", "ship", or "audit before launch" when a deployment is imminent.
    2. Phase-by-phase execution where the agent runs specific grep, git, and build commands to gather evidence for six hardening categories.
    3. Evidence reporting for every check, marking them as PASS, FAIL, or UNVERIFIED based on observed terminal or file data.
    4. Go/No-Go decision summarizing blocking failures and unverified checks that must be resolved before a deployment is permitted.

    Frameworks & tools

    Works with any stack providing a CLI, including Node.js (Next.js, Remix), Python, Ruby, and Go. Uses standard Unix utilities like grep, git, and framework-specific build tools.

    Why this beats prompting it yourself

    Generic prompts often hallucinate that a system is secure based on file names. This skill enforces an "evidence or it didn't happen" rule, explicitly blocking the deploy on UNVERIFIED checks where the agent cannot prove the safety of a configuration.

    Use cases

    • Auditing a project before its first public production launch to ensure no "localhost" strings remain.
    • Verifying that a mid-sprint migration won't lock tables or drop columns currently in use by the live site.
    • Checking that a new developer's PR hasn't accidentally exposed an API route without a server-side auth check.
    • Validating that error tracking and health monitors are actually initialized, not just listed in package.json.

    Known limitations

    Cannot verify external dashboard settings (like Vercel/AWS) without direct API access or user-provided screenshots. Requires a terminal environment to execute audit commands.

    Requires terminal access to run grep and build commands. Cannot verify SaaS dashboard settings without manual input. Does not perform deep dynamic traffic analysis.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 8 days ago

    Requires

    Git

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed8 days ago

    What's inside

    Frequently Asked Questions

    Unlike general security prompts that assume safety based on file names, this skill follows an 'evidence-based' protocol, requiring the agent to run CLI commands and inspect file contents to prove a check passed before allowing a deployment.

    The skill is compatible with any framework that utilizes a CLI, including Next.js, Django, Rails, and Go, as it relies on standard Unix utilities like grep and git to verify configurations.

    This skill is designed for AI agents with terminal and file system access; it triggers automatically when you use keywords like 'deploy' or 'ship' to initiate its multi-phase hardening process.

    The audit blocks deployments for three primary reasons: detected secrets (like API keys), lack of server-side authentication on routes, and unsafe database migrations that lack a rollback path.

    The skill can only audit files and configurations within your local environment; it cannot verify settings inside external cloud dashboards like AWS or Vercel unless the data is reflected in your local configuration files.

    You receive the complete hardening logic and phase-by-phase execution protocol, which includes checks for secrets, auth enforcement, data safety, integrity, and observability.

    New in DevOps & Cloud