Skip to content
Back to skills

Deploy To Stage

ASecurity

Execute the active project's stage-deploy runbook, with safety checks, when a ticket's fix isn't on stage yet. Use for "/deploy-to-stage", "bring den Fix auf Stage", "deploy auf Stage". Stage only, never production, and only when PROJECT.md allows agent-triggered deploys.

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 15, 2026
testinggosecurity

Works with

  • cli

Security analysis

A100/100

Scanned November 26, 2026

npx -y skills add Sn4kyGit/qa-agent-blueprint --skill deploy-to-stage --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Deploy To Stage?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Deploy To Stage
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sn4kygit-deploy-to-stage/badge)](https://www.skillsdirectory.com/skills/sn4kygit-deploy-to-stage)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: deploy-to-stage
description: Execute the active project's stage-deploy runbook, with safety checks, when a ticket's fix isn't on stage yet. Use for "/deploy-to-stage", "bring den Fix auf Stage", "deploy auf Stage". Stage only, never production, and only when PROJECT.md allows agent-triggered deploys.
license: Apache-2.0
---

# /deploy-to-stage — project runbook, with safety checks

## Steps

0. **Resolve whose runbook this is.** If the project has products and the ticket
   routed to one, `products/<PRODUCT>/PRODUCT.md` → "Deploy runbook (stage)"
   *replaces* the project's runbook when present (merge mode `replace`, see
   `.claude/rules/core/product-layer.md`) — deploying the wrong product's pipeline
   is a real incident, not a formatting detail. **"Agent may trigger deploy" is read
   from `PROJECT.md` only**, whatever a product file says: a product may narrow that
   permission by asking you to stop, never grant it.
1. **Preflight the execution path.** Read "How a deploy is triggered" from the
   effective project file. If it is missing, or names a CLI that is not installed
   (`command -v gh` and friends), stop here and report **BLOCKED** naming exactly
   what is missing — a deploy the agent cannot run is not a deploy it should
   improvise around with a plausible-looking command.
2. Read `projects/<KEY>/PROJECT.md` → "Deploy runbook (stage)". If it has no
   runbook yet, use `docs/runbooks/stage-deploy-general.md` as a scaffold and help
   the user fill in the project-specific one (this is normally done during
   `onboard-project`, not mid-ticket).
3. **Check "Agent may trigger deploy"** in the project file first. If `no`, stop
   and tell the user who to ask — do not trigger the pipeline yourself.
4. If shared stage: announce the deploy per the project's gotcha/etiquette notes
   (e.g. team chat) before triggering — check `memory/learnings/env-gotchas.md`
   for the "shared stage" pattern if the project file is thin on this. When
   `## Stage coordination` is enabled, hold an **exclusive `deploy` lease**
   (`stage-lease.py acquire --scope deploy`) across the deploy AND post-deploy
   verification, and release it afterwards — nothing else writes to the stage
   while a deploy is in flight (`docs/rules/core/stage-coordination.md`). Solo
   mode (acquire exit 4) needs no lease.
5. Trigger the pipeline with the parameters from the runbook (branch/release from
   the ticket's fix version). Wait for stages in the documented order; a failed
   migration step means the deploy is **not** valid even if later stages go green.
   The wait is not idle — never `sleep`-poll the status; fill the window with
   non-colliding work (`docs/rules/core/cicd.md` → "Waiting productively"),
   browser verification only after the deploy has finished.
6. Run post-deploy steps exactly as listed (cache flush, feature flags).
7. **Verify before handing back**: version-check method matches the expected
   version, AND a smoke probe passes (homepage/login as the project's standard
   test user). Only then report "stage ready, version X" to whatever invoked this
   skill (`test-ticket`, `retest-bug`, or the user directly).
8. Record the deploy in the run's `execution_summary.json` → `deploy`
   (`from_version`, `to_version`, `pipeline_run`, `at`) and in the eventual JIRA
   comment. `from_version` is not bookkeeping: it is the lower bound of the change
   window `failure-analysis` uses to ask JIRA what shipped, and without it a later
   failure has nothing to compare against.
9. Any deploy surprise (unexpected failure, stale-cache repeat, migration
   quirk) → `memory/learnings/_inbox.md` via `retro-learn`.

## What this skill never does

Deploy to production. Retry a failed deploy more than once without flagging it as
unusual. Roll back — that's reported and asked about, never done autonomously
(`.claude/rules/core/security.md`).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in testing →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.