Skip to content

Production deploy gate with tests, approval phrase and rollback

A coding agent skill that refuses to deploy to production until the agent has run fresh tests, a person has typed an approval phrase after seeing the results, and a rollback path is written down. Preview and dev deploys still go through after tests.

EngineeringWorks with Claude Code · CursorCommunity example

What it does

  • Reads a policy file listing protected environments and deploy commands
  • Runs the test suite and shows the evidence before any protected deploy
  • Asks a person to type the approval phrase for production
  • Checks a rollback path exists before it proceeds
  • Lets preview and dev deploys run once tests pass

Your approval boundaries

Creates drafts

These actions always wait for your yes:

  • Any deploy to production or another protected environment
  • Skipping tests for any reason

You decide what happens next.

More about this workflow

This setup is for developers and small engineering teams who want fewer chores. It takes a repeat chore off your plate and hands back something you can check quickly.

First, it reads a policy file listing protected environments and deploy commands. Next, it runs the test suite and shows the evidence before any protected deploy. Then it asks a person to type the approval phrase for production. After that, it checks a rollback path exists before it proceeds. Finally, it lets preview and dev deploys run once tests pass. It works with your git host and CI, each on its own login with limited access.

You get the prep work done and waiting for you. The agent stops and asks for your yes before any deploy to production or another protected environment and skipping tests for any reason, and says plainly if a step cannot be undone.

“This is guidance for a model, not a security boundary.”
Storm Cloud Systems stormcloudsystems on GitHub · Nov 1, 2026
Before you startGit host · CI accessScoped permissionsClaude Code or Cursor
Explore required tools and model recommendations

Tools and access

  • GitHub

    Handles the git host and ci part of this job. Grant a fine-grained token, read code and write comments.

    API required: Yes. Needs a GitHub App or a fine-grained personal access token scoped to the repos it needs.

Official links only. Not sponsored, no affiliate links.

Model recommendations

Best pick

Claude Opus 5.5

Its maker points to it for long running coding work.

$4 per million input tokens, $20 per million output tokens.

Anthropic docs as of October 11, 2026

Cheaper backup

Claude Sonnet 5.5

Half the price per token and still strong for reviews and docs.

$2 per million input tokens, $10 per million output tokens.

Anthropic docs as of October 11, 2026

Our own picks. Not sponsored, no affiliate links.

Build your prompt

Add your details, then copy the prompt into your tool.

1Your details

Fill these in and the prompt updates as you type.

production by default

2Your prompt

4 of 4 still empty
Fill these in before you run it: [PROTECTED ENVIRONMENTS: production by default] [DEPLOY COMMANDS PER ENVIRONMENT] [APPROVAL PHRASE] [ROLLBACK STEPS] You are the Production deploy gate with tests, approval phrase and rollback agent. A coding agent skill that refuses to deploy to production until the agent has run fresh tests, a person has typed an approval phrase after seeing the results, and a rollback path is written down. Preview and dev deploys still go through after tests. Use only the details filled in above. If any [BRACKETED] item is still blank or unclear, stop and ask for it first. Do not guess. What you do on your own: - Reads a policy file listing protected environments and deploy commands - Runs the test suite and shows the evidence before any protected deploy - Asks a person to type the approval phrase for production - Checks a rollback path exists before it proceeds - Lets preview and dev deploys run once tests pass What you must never do without a yes from a person: - Any deploy to production or another protected environment - Skipping tests for any reason Rules: - Before any step on the list above, stop and ask. Say in plain words what you want to do, who it affects, and whether it can be undone. - If something cannot be undone, say so first, in one short line. - Write drafts, not final actions. A person sends, pays, posts, or deletes. - Keep a short log of every action you took and every source you read. - If you are unsure, ask instead of guessing.
View run instructionsPaste into: Claude Code, Cursor

Your answers stay in this browser only.

Run your workflow

Connect your tools with only the access this setup needs, then follow these steps.

Steps

Do these in order. Test on old data before it touches live work.

  1. 1Connect GitHub with its own login, not yours. Grant a fine-grained token, read code and write comments.
  2. 2Paste the prompt where your harness takes instructions. See the note under the Copy button.
  3. 3Do a dry run on old or test data first. Check every draft and every stop point by hand before you let it near live work.
  4. 4Read its log after the first real run. Only widen access once a week of runs looks clean.

Safeguards and trust score

The score describes this example setup’s access, approval boundaries, ability to undo changes, and scope.

Access24 / 30

Writes drafts and notes inside your tools, nothing leaves on its own.

Human approval30 / 30

Waits for a yes on: any deploy to production or another protected environment, skipping tests for any reason.

Undo and logs14 / 20

Proposes changes to live records, so the setup needs a change log and a way back.

Scope18 / 20

Runs on its own login across 2 tools. Fewer connections means a smaller blast radius.

How to raise it

  • Undo and logs: Stop it from editing live records. Have it write the change as a proposal you apply, and keep a log of every change with a way to roll it back +3
  • Scope: Run it on one tool only, with its own login that can see just what this job needs +2

Do all of these to reach 91, up from 86.

Want help getting there? Get an AI Trust Audit from Pixeldesigns

Reviewed by Trustcase (example setup). How scoring works

Embed badge

Show this trust score on your site or README. It links back here.

Trustcase trust score badge
Markdown
[![Trustcase trust score for Production deploy gate with tests, approval phrase and rollback](https://trustcase.dev/badge/production-deploy-gate-with-tests-approval-phrase-and-rollback.svg)](https://trustcase.dev/use-cases/production-deploy-gate-with-tests-approval-phrase-and-rollback)
HTML
<a href="https://trustcase.dev/use-cases/production-deploy-gate-with-tests-approval-phrase-and-rollback"><img src="https://trustcase.dev/badge/production-deploy-gate-with-tests-approval-phrase-and-rollback.svg" alt="Trustcase trust score for Production deploy gate with tests, approval phrase and rollback" height="20"></a>
  • Design review against the mockup with sign off gates

    After an agent builds a screen, this compares the live UI against the Figma mockup screen by screen and logs every gap as a measured number against a number. A person signs off on the screen list, each batch of findings and the final acceptance.

  • Weekly version branch upmerge with developer sign off

    Each week agents merge every version branch into the next across a set of repos, solve conflicts, run builds and watch CI on the resulting pull requests. A developer picks the merges up front and does the final merge of each pull request.

  • Pull request reviewer

    Gives every PR a first pass before a person looks.

  • Flaky test hunter

    Finds tests that fail at random and why.

Other workflows that use the same tools

  • Site change tester

    Marketing. Tries small edits to your site, watches whether more visitors stay, and keeps only the changes that help. Good for steady small wins on a landing page.

  • Daily kids lesson builder

    Personal. Builds a short interactive lesson for your kids each night and has a second agent check it. You read a review email and approve it before the kids get the link.

  • Weekly delivery status report

    Operations. Pulls your team's work items once a week and builds a status report grouped by initiative. It puts at risk items first and flags anything with no update in two weeks.