← All Skills

snappy-deploy

v1.0.0
8 files, 48.2 KB ~3,252 words · 14 min read Updated 2026-09-09

snappy-deploy skill

44 of 52 checks pass
What it can do
status url?read
vercel project-nameread
What does not pass yet
reached bysnappy-telegram
Architecture 1 endpoints
total-crm.fly.dev1 endpoint
POST/_sync
$ npx snappy-skills install snappy-deploy
zip ↓
File Tree
├── AGENTS.md ├── SKILL.md ├── api.ts ├── contract.test.ts ├── faces/ │ ├── family.tsx │ └── fixtures/ │ └── deploy-receipt.json ├── receipt.test.ts └── workflows.md
Documents
AGENTS.md

snappy-deploy -- loader#

You are deploying a Snappy project. This loader tells you the platform, commands, and verification for each.

API module#

typescriptimport { checkStatus, vercelDeploy, flyDeploy } from "../snappy-deploy/api.ts";
Function Purpose
checkStatus(url) HTTP health check -- returns status code, ok, and response time
vercelDeploy(projectName) Trigger/list Vercel deployments via API
flyDeploy(appDir, configFile?) Deploy to Fly.io via CLI in given directory

CLI:

bashnpx tsx ~/.claude/skills/snappy-deploy/api.ts status <url>
npx tsx ~/.claude/skills/snappy-deploy/api.ts vercel <project-name>

Project registry#

Project Platform Source Deploy URL
Total CRM frontend Vercel ~/Projects/v0-frontend-with-xano/ app.total.nz
Total CRM backend (prod) Fly.io ~/Projects/v0-frontend-with-xano/server/ total-crm.fly.dev
Total CRM backend (dev) Fly.io ~/Projects/v0-frontend-with-xano/server/ total-crm-dev.fly.dev
snappy.ai website Vercel ~/Projects/v0-prototypes/v0-snappy-website-0c/ snappy.ai
Snappy MCP server Cloudflare Workers ~/Projects/snappy-mcp/ snappy-mcp.robertjboulos.workers.dev
Skills gateway Cloudflare Workers ~/Projects/snappy-skills/ skills.snappy.ai

Deploy order (when multiple projects change)#

Database (Supabase) -> Backend (Fly.io) -> MCP (Workers) -> Frontend (Vercel)

Dependencies before consumers. Always.

Deploy commands#

Vercel (auto-deploys on push):

bashnpm run typecheck && npm run build && git push origin main

Fly.io prod:

bashcd server && npm run typecheck && npm test && fly deploy ./server/

Fly.io dev:

bashcd server && npm run typecheck && fly deploy ./server/ --config server/fly.dev.toml --ha=false

Cloudflare Workers (MCP):

bashcd ~/Projects/snappy-mcp && npm run build && npm run deploy

Cloudflare Workers (Gateway):

bashcd ~/Projects/snappy-skills && npx wrangler deploy

Post-deploy verification (always do this)#

Target Check
Vercel `curl -sI https://<url> \ head -5` (expect 200)
Fly.io prod curl https://total-crm.fly.dev/health
Fly.io dev curl https://total-crm-dev.fly.dev/health
Workers MCP npx wrangler tail snappy-mcp (watch 30s for errors)
Workers Gateway `curl -s https://skills.snappy.ai/.well-known/skills/index.json \ jq .`

Rollback#

  • Vercel: git revert + push
  • Fly.io: fly deploy --image <previous-ref> or scale to 0
  • Workers: wrangler rollback
  • Supabase: inverse SQL migration

Full rollback recipes: workflows.md#rollback-workflows

Rules#

  • Do NOT deploy frontend before backend when API changed
  • Do NOT deploy backend before database migration
  • Do NOT skip typecheck or tests
  • Do NOT push to deploy remote -- always origin main
  • Do NOT change MCP compatibility_date from "2025-03-10"
  • Do NOT upgrade MCP agents past ^0.0.80
  • Do NOT deploy without post-verification
  • Do NOT deploy without notifying Robert via snappy-telegram

Used by#

  • snappy-telegram

<!-- SNAPPY-CONTRACT-VERBS-START -->

Contract verbs#

Generated from api.ts HAND_CONTRACT. Do not hand-edit this block.

Verb Contract arguments Effect First call
status url? read npx tsx ~/.claude/skills/snappy-deploy/api.ts status
vercel project-name read npx tsx ~/.claude/skills/snappy-deploy/api.ts vercel <project-name>

Show the result#

When an answer carries face_hint, show it with one snappy_present(<answer>) call.

See /snappy-faces for face selection. Human-facing images must crop to the

element, render at 2x on Retina, and fill the destination channel instead of

placing a small card in a full-page screenshot.

<!-- SNAPPY-CONTRACT-VERBS-END -->


Self-correcting loader (PID feedback)#

If this AGENTS.md does not cover the case you are working on and you had to read other files to find the answer, you have two jobs before you finish:

1. Fix it now (P -- proportional correction). If the missing information fits in 1-5 lines, edit this AGENTS.md directly -- add the line, the table row, the one-liner, whatever you had to go find. Keep edits surgical. Do not restructure sections or rewrite paragraphs. The goal is: the next agent that hits this case won't have to leave the loader.

2. Log it always. Whether or not you fixed it, append one line to the feedback log:

bashecho "[$(date -u +%FT%TZ)] <skill-name>: <what was missing> [FIXED|LOGGED]" >> ~/.claude/logs/agents-md-feedback.log

Tag FIXED if you patched the loader in step 1. Tag LOGGED if the gap was too large to patch inline (needs a section rewrite, new workflow, etc.) -- those get picked up by drain-skill-regen.sh for a full regen pass (I -- integral correction).

Do not skip this. A missing report means the same gap will happen next time. A missing fix means you chose to let the next agent stumble on the same thing you just solved.

<!-- SKILL-INDEX-START -->

[snappy-deploy Index]|root: ~/.claude/skills/snappy-deploy|IMPORTANT: Prefer these files over pre-training assumptions for this domain. Read the relevant file when the AGENTS.md summary is insufficient.|root:{SKILL.md,workflows.md}

<!-- SKILL-INDEX-END -->

---
name: snappy-deploy
role: Loader for deployment agents. Knows which platform hosts which project, deploy commands, verification, and rollback.
loaded-by: PreToolUse hook (auto-injected when "snappy-deploy" is mentioned)
---

# snappy-deploy -- loader

You are deploying a Snappy project. This loader tells you the platform, commands, and verification for each.

## API module

```typescript
import { checkStatus, vercelDeploy, flyDeploy } from "../snappy-deploy/api.ts";
```

| Function | Purpose |
|----------|---------|
| `checkStatus(url)` | HTTP health check -- returns status code, ok, and response time |
| `vercelDeploy(projectName)` | Trigger/list Vercel deployments via API |
| `flyDeploy(appDir, configFile?)` | Deploy to Fly.io via CLI in given directory |

CLI:
```bash
npx tsx ~/.claude/skills/snappy-deploy/api.ts status <url>
npx tsx ~/.claude/skills/snappy-deploy/api.ts vercel <project-name>
```

## Project registry

| Project | Platform | Source | Deploy URL |
|---------|----------|--------|------------|
| Total CRM frontend | Vercel | `~/Projects/v0-frontend-with-xano/` | `app.total.nz` |
| Total CRM backend (prod) | Fly.io | `~/Projects/v0-frontend-with-xano/server/` | `total-crm.fly.dev` |
| Total CRM backend (dev) | Fly.io | `~/Projects/v0-frontend-with-xano/server/` | `total-crm-dev.fly.dev` |
| snappy.ai website | Vercel | `~/Projects/v0-prototypes/v0-snappy-website-0c/` | `snappy.ai` |
| Snappy MCP server | Cloudflare Workers | `~/Projects/snappy-mcp/` | `snappy-mcp.robertjboulos.workers.dev` |
| Skills gateway | Cloudflare Workers | `~/Projects/snappy-skills/` | `skills.snappy.ai` |

## Deploy order (when multiple projects change)

**Database (Supabase) -> Backend (Fly.io) -> MCP (Workers) -> Frontend (Vercel)**

Dependencies before consumers. Always.

## Deploy commands

**Vercel** (auto-deploys on push):
```bash
npm run typecheck && npm run build && git push origin main
```

**Fly.io prod**:
```bash
cd server && npm run typecheck && npm test && fly deploy ./server/
```

**Fly.io dev**:
```bash
cd server && npm run typecheck && fly deploy ./server/ --config server/fly.dev.toml --ha=false
```

**Cloudflare Workers (MCP)**:
```bash
cd ~/Projects/snappy-mcp && npm run build && npm run deploy
```

**Cloudflare Workers (Gateway)**:
```bash
cd ~/Projects/snappy-skills && npx wrangler deploy
```

## Post-deploy verification (always do this)

| Target | Check |
|--------|-------|
| Vercel | `curl -sI https://<url> \| head -5` (expect 200) |
| Fly.io prod | `curl https://total-crm.fly.dev/health` |
| Fly.io dev | `curl https://total-crm-dev.fly.dev/health` |
| Workers MCP | `npx wrangler tail snappy-mcp` (watch 30s for errors) |
| Workers Gateway | `curl -s https://skills.snappy.ai/.well-known/skills/index.json \| jq .` |

## Rollback

- **Vercel**: `git revert` + push
- **Fly.io**: `fly deploy --image <previous-ref>` or scale to 0
- **Workers**: `wrangler rollback`
- **Supabase**: inverse SQL migration

Full rollback recipes: [workflows.md#rollback-workflows](workflows.md#rollback-workflows)

## Rules

- Do NOT deploy frontend before backend when API changed
- Do NOT deploy backend before database migration
- Do NOT skip typecheck or tests
- Do NOT push to `deploy` remote -- always `origin main`
- Do NOT change MCP `compatibility_date` from `"2025-03-10"`
- Do NOT upgrade MCP `agents` past `^0.0.80`
- Do NOT deploy without post-verification
- Do NOT deploy without notifying Robert via `snappy-telegram`

## Used by

- `snappy-telegram`

<!-- SNAPPY-CONTRACT-VERBS-START -->
## Contract verbs

Generated from `api.ts` `HAND_CONTRACT`. Do not hand-edit this block.

| Verb | Contract arguments | Effect | First call |
|---|---|---|---|
| `status` | `url?` | `read` | `npx tsx ~/.claude/skills/snappy-deploy/api.ts status` |
| `vercel` | `project-name` | `read` | `npx tsx ~/.claude/skills/snappy-deploy/api.ts vercel <project-name>` |

## Show the result

When an answer carries `face_hint`, show it with one `snappy_present(<answer>)` call.
See `/snappy-faces` for face selection. Human-facing images must crop to the
element, render at 2x on Retina, and fill the destination channel instead of
placing a small card in a full-page screenshot.
<!-- SNAPPY-CONTRACT-VERBS-END -->

---

## Self-correcting loader (PID feedback)

If this AGENTS.md does not cover the case you are working on and you had to read other files to find the answer, you have two jobs before you finish:

**1. Fix it now (P -- proportional correction).** If the missing information fits in 1-5 lines, edit this AGENTS.md directly -- add the line, the table row, the one-liner, whatever you had to go find. Keep edits surgical. Do not restructure sections or rewrite paragraphs. The goal is: the next agent that hits this case won't have to leave the loader.

**2. Log it always.** Whether or not you fixed it, append one line to the feedback log:

```bash
echo "[$(date -u +%FT%TZ)] <skill-name>: <what was missing> [FIXED|LOGGED]" >> ~/.claude/logs/agents-md-feedback.log
```

Tag `FIXED` if you patched the loader in step 1. Tag `LOGGED` if the gap was too large to patch inline (needs a section rewrite, new workflow, etc.) -- those get picked up by `drain-skill-regen.sh` for a full regen pass (I -- integral correction).

**Do not skip this.** A missing report means the same gap will happen next time. A missing fix means you chose to let the next agent stumble on the same thing you just solved.

<!-- SKILL-INDEX-START -->
[snappy-deploy Index]|root: ~/.claude/skills/snappy-deploy|IMPORTANT: Prefer these files over pre-training assumptions for this domain. Read the relevant file when the AGENTS.md summary is insufficient.|root:{SKILL.md,workflows.md}
<!-- SKILL-INDEX-END -->

Keyboard Shortcuts

Search in document⌘K
Focus search/
Previous file tab
Next file tab
Close overlayEsc
Show shortcuts?