agentleFS
alex-voloshin-devalex-voloshin-dev/ai-skills/.agents/skills/deploy-staging/SKILL.md

deploy-staging

Skill2 starsChanged 6 months agoMITView on GitHub

Deploy to staging workflow — build, deploy to staging environment, run smoke tests, verify. Use after feature completion before production deployment.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read AGENTS.md and project config to determine:

    line 37
  2. Distinctive:

    Follow platform-specific CLI or git-based deployment.

    line 102
  3. Distinctive:

    Run critical path smoke tests:

    line 120
  4. Distinctive:

    Check for errors, warnings, or unexpected behavior in the first 2–5 minutes.

    line 134
  5. Distinctive:

    If all checks pass, suggest:

    line 152
  6. Distinctive:

    Run full QA testing on staging

    line 153
  7. Very specific:

    When ready: deploy-production skill

    line 154

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Deploy to Staging

Structured workflow for deploying to staging environment. Builds the application, deploys, runs smoke tests, and verifies the deployment.

1. Pre-Deployment Checks

1a. Verify Branch State

// turbo
git branch --show-current
// turbo
git status --short
  • Working directory must be clean
  • Branch should be main or a release branch

1b. Run Tests

Invoke run-tests skill follow-up skill. All tests must pass before deploying.

1c. Identify Deployment Method

Read AGENTS.md and project config to determine:

SignalMethod
Dockerfile + K8s manifestsContainer → Kubernetes
Dockerfile + docker-composeContainer → Docker Compose
Helm chartsContainer → Helm
TerraformInfrastructure as Code
Serverless config (serverless.yml, SAM)Serverless deployment
Static site (Next.js, Vite)CDN / static hosting
Platform config (Netlify, Vercel, Railway)Platform deployment

2. Build

Build the application artifact:

StackCommand
Node.jsnpm run build or pnpm build
Java./mvnw clean package -DskipTests
Pythondocker build -t <image>:<tag> .
Gogo build -o bin/app ./cmd/api
.NETdotnet publish -c Release

Container Build (if applicable)

docker build -t <registry>/<image>:<tag> .

Tag with git SHA or version:

docker tag <image> <registry>/<image>:<git-sha>

3. Deploy to Staging

⚠️ Present deployment plan and request APPROVE before executing.

3a. Kubernetes / Helm

helm upgrade --install <release> <chart> \
  -n staging \
  -f values-staging.yaml \
  --set image.tag=<tag> \
  --dry-run

After APPROVE:

helm upgrade --install <release> <chart> \
  -n staging \
  -f values-staging.yaml \
  --set image.tag=<tag>

3b. Docker Compose

docker compose -f docker-compose.staging.yml up -d

3c. Platform (Netlify, Vercel, etc.)

Follow platform-specific CLI or git-based deployment.

4. Verify Deployment

4a. Health Check

// turbo
kubectl get pods -n staging -o wide

Or curl health endpoint:

curl -s <staging-url>/health

4b. Smoke Tests

Run critical path smoke tests:

  • Application starts and responds
  • Health endpoint returns 200
  • Authentication flow works
  • Core API endpoints respond correctly
  • Database connectivity verified

4c. Monitor Logs

// turbo
kubectl logs -n staging -l app=<app-name> --tail=50

Check for errors, warnings, or unexpected behavior in the first 2–5 minutes.

5. Summary

## Staging Deployment Summary
- **Version**: [version/tag]
- **Branch**: [branch name]
- **Environment**: staging
- **Method**: [K8s/Helm/Docker/Platform]
- **Build**: [success/fail]
- **Deploy**: [success/fail]
- **Health check**: [pass/fail]
- **Smoke tests**: [pass/fail]
- **Staging URL**: [url]
- **Next steps**: [QA testing / production deploy]

If all checks pass, suggest:

  • Run full QA testing on staging
  • When ready: deploy-production skill

Integration

  • Preceded by: pre-commit skill, create-pr skill (code ready)
  • Followed by: deploy-production skill
  • Roles: devops-engineer role, devops-architect role (deployment strategy design)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.