agentleFS
allanninalallanninal/claude-code-skills/skills/deploy/SKILL.md

deploy

Skill1 starsChanged 9 months agoMITView on GitHub

Deploy application to specified environment with pre-checks and rollback capability. Use for production deployments, staging updates, or release management.

  • Reads credentials
Files
SKILL.md

Automated Deployment

Deploy applications with pre-deployment checks, health validation, and automatic rollback on failure.

Arguments

  • $0: Environment - production, staging, qa, development (required)

Pre-Deployment Checklist

Before deploying, verify:

  1. Git Status Clean
    git status --porcelain
    # Must be empty or only untracked files
  2. On Correct Branch
    • production: main or master
    • staging: staging or DEVELOPMENT
    • qa: qa or DEVELOPMENT
  3. Tests Pass
    # Run test suite first
    /test all
  4. Environment Variables
    • Check .env.$ENVIRONMENT exists
    • Validate required variables are set

Deployment Strategies by Project

FastAPI Projects (IONOS VPS)

eruditiontx-services-mvp, mathmatterstx-services:

# 1. Connect to server
ssh user@server

# 2. Pull latest code
cd /path/to/project
git pull origin $BRANCH

# 3. Install dependencies
uv sync

# 4. Run migrations (if any)
uv run alembic upgrade head

# 5. Restart service
sudo systemctl restart erudition-service

# 6. Health check
curl -f http://localhost:8000/health || exit 1

# 7. Verify logs
journalctl -u erudition-service -n 20 --no-pager

Next.js Projects (Vercel)

bocs-turbo apps, naiomi-frontend:

# Using Vercel CLI
vercel --prod
# or for preview
vercel

Docker Projects

agila-tax-management:

# 1. Build new image
docker-compose -f docker-compose.$ENV.yml build

# 2. Stop old containers
docker-compose -f docker-compose.$ENV.yml down

# 3. Start new containers
docker-compose -f docker-compose.$ENV.yml up -d

# 4. Health check
docker-compose -f docker-compose.$ENV.yml ps
curl -f http://localhost:PORT/health

AWS Lambda (Serverless)

bocs-serverless:

cd bocs-serverless
./deployment.sh $ENVIRONMENT

Rollback Procedure

If deployment fails:

  1. Git Rollback
    git checkout $PREVIOUS_COMMIT
  2. Restart Services
    sudo systemctl restart $SERVICE
    # or
    docker-compose -f docker-compose.$ENV.yml up -d
  3. Verify Rollback
    curl -f http://localhost:PORT/health

Post-Deployment

  1. Verify Health Endpoints
    curl http://localhost:PORT/health
    curl http://localhost:PORT/v1/health
  2. Check Logs for Errors
    journalctl -u $SERVICE -n 50 --no-pager | grep -i error
    # or
    docker logs $CONTAINER --tail 50
  3. Send Notification (if configured)
    • Slack webhook
    • Email notification

Output Format

Deployment: [project-name]
Environment: [production/staging/qa]
Branch: [branch-name]
Commit: [short-hash]

Pre-checks:
  Git status: CLEAN
  Branch: CORRECT
  Tests: PASSED
  Env vars: VALIDATED

Deploying...
[Deployment output]

Post-deployment:
  Health check: PASSED
  Service status: RUNNING

Deployment completed successfully!
URL: [deployed-url]

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.