# Deploy Safely

> Deploy Your Project to production safely. Use before any deployment, after code changes, or when asked to push to prod.

- **Type:** Skill
- **Install:** `agentstack add skill-pattyboi101-oats-autonomous-agents-deploy-safely`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [Pattyboi101](https://agentstack.voostack.com/s/pattyboi101)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [Pattyboi101](https://github.com/Pattyboi101)
- **Source:** https://github.com/Pattyboi101/oats-autonomous-agents/tree/master/skills/deploy-safely

## Install

```sh
agentstack add skill-pattyboi101-oats-autonomous-agents-deploy-safely
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Deploy Safely — DevOps

You are responsible for getting code safely to production on Fly.io.

## Before Starting

Check:
- Are there uncommitted changes? `git status`
- Did smoke tests pass? `python3 smoke_test.py`
- Is this approved by Master/S&QA?

## How This Skill Works

### Mode 1: Standard Deploy
Code changes committed, smoke test passing, deploy to Fly.io.

### Mode 2: Hotfix Deploy
Critical bug found, need to deploy ASAP. Skip non-essential checks but ALWAYS smoke test.

### Mode 3: Verify Only
No deploy — just run smoke tests and health checks. Report status.

## Deploy Checklist

### Pre-Deploy
- [ ] `python3 -c "import ast; ast.parse(open('changed_file.py').read())"` for each changed file
- [ ] `python3 smoke_test.py` — must be 48/48
- [ ] `git add {specific files}` — NEVER `git add -A` or `git add .`
- [ ] `git commit -m "descriptive message"`

### Deploy
```bash
# Preferred (remote build — avoids local disk issues)
~/.fly/bin/flyctl deploy --remote-only

# Fallback (local Docker build)
~/.fly/bin/flyctl deploy --local-only
```

### Post-Deploy
- [ ] `curl -sL -o /dev/null -w "%{http_code}" https://your-project.fly.dev/health` — expect 200
- [ ] Test specific endpoints if relevant
- [ ] Report to Master

## Proactive Triggers
- **pricing.py in changeset** → needs `git add -f` (gitignored)
- **mcp_server.py changed** → remind Master that PyPI publish needed for installed clients
- **db.py schema changed** → migration will run on next startup, verify it's backward compatible
- **Deploy fails "no space left"** → run `docker system prune -af`, retry with `--remote-only`
- **Post-deploy 500 errors** → check Fly logs: `~/.fly/bin/flyctl logs --no-tail | tail -20`

## Gotchas
- Some networks block .ai TLD — use fly.dev for health checks
- fly.dev redirects non-/health paths to custom domain — use SSH for internal API testing
- Fly SSH tunnel can go down transiently — retry after 5 mins
- Metrics token warning is harmless — ignore it
- Smoke test may show connection resets for ~30s after deploy (app restarting)
- `--local-only` filled local disk during extended sessions — prefer `--remote-only`

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [Pattyboi101](https://github.com/Pattyboi101)
- **Source:** [Pattyboi101/oats-autonomous-agents](https://github.com/Pattyboi101/oats-autonomous-agents)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-pattyboi101-oats-autonomous-agents-deploy-safely
- Seller: https://agentstack.voostack.com/s/pattyboi101
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
