一键导入
staging-deploy
Build, push, migrate, and deploy to staging environment with health check verification. Use when deploying a completed phase to staging.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Build, push, migrate, and deploy to staging environment with health check verification. Use when deploying a completed phase to staging.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generate or update OpenAPI specification from TypeScript/Express route definitions. Validate spec-to-code consistency. Use after adding or changing API endpoints.
Stack-agnostic Clean Code audit — module size, function-length/complexity (via your project's existing linter), long parameter lists, TODO/FIXME/HACK markers, commented-out code, debug-print leakage, and optional duplication detection. Produces a structured findings report with optional fix suggestions. Use before merges, at end of a feature, or as a regular hygiene pass.
Run a comprehensive code review across architecture, security, testing, naming, and patterns. Invokes relevant reviewer agents in sequence. Use before merging features or at the end of a phase. With --quorum, dispatches multi-model analysis for higher confidence.
Generate, review, test, and deploy database schema migrations. Use when adding columns, creating tables, or changing schema.
Scan TypeScript/Node.js project dependencies for vulnerabilities, outdated packages, and license issues. Use before PRs, after adding packages, or on a regular schedule.
Guided plan execution — list available plans, estimate cost, choose mode, and execute with live progress. Use when you want to run a hardened plan through the orchestrator.
| name | staging-deploy |
| description | Build, push, migrate, and deploy to staging environment with health check verification. Use when deploying a completed phase to staging. |
| argument-hint | [service or component to deploy] |
| tools | ["run_in_terminal","read_file","forge_validate"] |
"Deploy to staging" / "Push to staging environment"
Use the forge_validate MCP tool to verify setup integrity before deploying.
npm run build
npm run test
npm run lint
If Step 1 (Pre-Flight Checks) fails → STOP. Do not proceed to build.
docker build -t contoso-api:staging -f Dockerfile .
docker tag contoso-api:staging registry.contoso.com/api:staging
docker push registry.contoso.com/api:staging
npx knex migrate:latest --env staging
# Or: npx prisma migrate deploy
# Kubernetes
kubectl apply -f k8s/staging/ --context staging
# Or Docker Compose
docker compose -f docker-compose.staging.yml up -d
curl -f https://staging-api.contoso.com/health
curl https://staging-api.contoso.com/api/version
npm run test:smoke -- --env staging
kubectl rollout undo deployment/api --context staging| Shortcut | Why It Breaks |
|---|---|
| "It works locally, skip staging" | Local environments mask configuration, networking, and scaling issues that only surface in staging. |
| "Health check isn't needed yet" | Without health checks, orchestrators can't detect failures. A "successful" deploy may serve errors silently. |
| "I'll add monitoring after launch" | Post-launch is too late. Staging is where you verify observability works before production traffic arrives. |
| "One big deploy is simpler" | Monolithic deploys are harder to roll back. Deploy incrementally so failures are isolated to a single change. |
After completing this skill, confirm:
npm run build && npm test passes before container buildcurl -f https://staging/health)npm run test:smokesearch_thoughts("deploy failure", project: "Falsify", created_by: "copilot-vscode", type: "postmortem") — load prior deployment failures and environment-specific gotchascapture_thought("Deploy: <outcome — success or failure details>", project: "Falsify", created_by: "copilot-vscode", source: "skill-staging-deploy") — persist environment issues and config changes for next deployment