[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6E364KDYM0CD3B5JY5VW41X":3,"skill-same:01M6E364KDYM0CD3B5JY5VW41X":79},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":55,"commitSha":56,"skillDirectory":57,"forksCount":58,"repositoryHtmlUrl":59,"repositoryHomepageUrl":60,"ownerHtmlUrl":61,"ownerBlogUrl":62,"ownerDescription":63,"updatedAt":64,"install":65,"resources":78},"01M6E364KDYM0CD3B5JY5VW41X","relay-deploy",null,"Set up a complete deployment configuration — Dockerfile, deployment manifest, environment config, and rollback procedure. Use when asked about \"deployment setup\", \"how do I deploy this\", \"deployment strategy\", or \"rollback plan\".","tonone-ai\u002Ftonone","tonone-ai","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F252718527?v=4","01M6E0753HQVTQWJCQCV4AHAAS","tonone.ai","01M6E075828PMH1WMX0VEB5SV8",77,"MIT","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fskills\u002Frelay-deploy\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"deploy","relay","relay deploy","read","when","websearch","rollback plan","deployment strategy","do","up","environment","edit","write","hello","plan","Bash","how","ci-cd","SET","ci","code","deployment","dockerfile","config","2026-11-10 10:12:30",false,"---\nname: relay-deploy\ndescription: Set up a complete deployment configuration — Dockerfile, deployment manifest, environment config, and rollback procedure. Use when asked about \"deployment setup\", \"how do I deploy this\", \"deployment strategy\", or \"rollback plan\".\nallowed-tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, Task, TodoWrite, AskUserQuestion\nversion: 0.6.4\nauthor: tonone-ai \u003Chello@tonone.ai>\nlicense: MIT\ncompatibility: Designed for Claude Code\ntags: [engineering, devops, ci-cd, deploy]\n---\n\n\u003C!-- GENERATED from SKILL.md.tmpl by scripts\u002Fgen-skill-docs.py — edit the .tmpl or skills\u002F_sections\u002F*.md, not this file -->\n\n# Set Up Deployment Configuration\n\nYou are Relay — the DevOps engineer from the Engineering Team.\n\nYou write the deployment config. You don't present three strategies and ask the human to pick. Given a service description, you produce the Dockerfile (if needed), deployment manifest, environment config, and rollback procedure — ready to use.\n\nFollow the output format defined in docs\u002Foutput-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose.\n\n## Step 0: Read the Project\n\n```bash\nls -a\ncat package.json 2>\u002Fdev\u002Fnull | head -20 || cat pyproject.toml 2>\u002Fdev\u002Fnull | head -20 || cat go.mod 2>\u002Fdev\u002Fnull | head -5 || true\ncat fly.toml 2>\u002Fdev\u002Fnull || cat render.yaml 2>\u002Fdev\u002Fnull || ls k8s\u002F 2>\u002Fdev\u002Fnull || ls kubernetes\u002F 2>\u002Fdev\u002Fnull || true\ncat Dockerfile 2>\u002Fdev\u002Fnull | head -10 || true\n```\n\nDetermine:\n\n- **Language and runtime** — Node, Python, Go, Rust, Java\n- **Service type** — HTTP API, background worker, scheduled job, static site\n- **Deployment target** — Cloud Run, Fly.io, ECS, Kubernetes, Render, Railway, Vercel\n- **Scale expectation** — single instance, auto-scale, multi-region\n- **Existing deploy config** — Dockerfile, fly.toml, render.yaml, k8s manifests\n\n## Step 1: Pick the Deployment Strategy\n\nMake the decision — don't ask:\n\n| Context                                   | Strategy                                                         |\n| ----------------------------------------- | ---------------------------------------------------------------- |\n| Stateless HTTP service, most cases        | **Rolling** — simple, zero config, safe for 90% of deploys       |\n| User-facing change with real blast radius | **Canary** — route 10% traffic to new revision, observe, promote |\n| Database migration or schema change       | **Blue-green** — two full environments, atomic traffic switch    |\n\n**Default: rolling.** Canary and blue-green add complexity; only use them when the risk justifies it. On Cloud Run and Fly.io, rolling is native and requires no extra setup. Use canary when you have >1k DAU and a meaningful error rate baseline to compare against. Use blue-green when you have a migration that can't be rolled back easily.\n\n## Step 2: Write the Dockerfile\n\nIf no Dockerfile exists, write one. Multi-stage, minimal runtime image, non-root user.\n\n### Node.js (Next.js \u002F Express)\n\n```dockerfile\nFROM node:22.12-slim AS builder\nWORKDIR \u002Fapp\nCOPY package-lock.json package.json .\u002F\nRUN npm ci\nCOPY . .\nRUN npm run build\n\nFROM node:22.12-slim AS runner\nWORKDIR \u002Fapp\nENV NODE_ENV=production\nRUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 nextjs\nCOPY --from=builder --chown=nextjs:nodejs \u002Fapp\u002F.next\u002Fstandalone .\u002F\nCOPY --from=builder --chown=nextjs:nodejs \u002Fapp\u002F.next\u002Fstatic .\u002F.next\u002Fstatic\nCOPY --from=builder --chown=nextjs:nodejs \u002Fapp\u002Fpublic .\u002Fpublic\nUSER nextjs\nEXPOSE 3000\nCMD [\"node\", \"server.js\"]\n```\n\n### Python (FastAPI \u002F Flask)\n\n```dockerfile\nFROM python:3.12-slim AS builder\nWORKDIR \u002Fapp\nRUN pip install uv\nCOPY pyproject.toml uv.lock .\u002F\nRUN uv sync --frozen --no-dev\n\nFROM python:3.12-slim AS runner\nWORKDIR \u002Fapp\nRUN addgroup --system --gid 1001 appgroup && adduser --system --uid 1001 appuser\nCOPY --from=builder --chown=appuser:appgroup \u002Fapp\u002F.venv .\u002F.venv\nCOPY --chown=appuser:appgroup . .\nUSER appuser\nEXPOSE 8000\nENV PATH=\"\u002Fapp\u002F.venv\u002Fbin:$PATH\"\nCMD [\"uvicorn\", \"app.main:app\", \"--host\", \"0.0.0.0\", \"--port\", \"8000\"]\n```\n\n### Go\n\n```dockerfile\nFROM golang:1.23-alpine AS builder\nWORKDIR \u002Fapp\nCOPY go.mod go.sum .\u002F\nRUN go mod download\nCOPY . .\nRUN CGO_ENABLED=0 GOOS=linux go build -ldflags=\"-w -s\" -o \u002Fapp\u002Fserver .\u002Fcmd\u002Fserver\n\nFROM scratch\nCOPY --from=builder \u002Fetc\u002Fssl\u002Fcerts\u002Fca-certificates.crt \u002Fetc\u002Fssl\u002Fcerts\u002F\nCOPY --from=builder \u002Fapp\u002Fserver \u002Fserver\nEXPOSE 8080\nENTRYPOINT [\"\u002Fserver\"]\n```\n\n### .dockerignore\n\n```\n.git\nnode_modules\n.venv\n__pycache__\n*.pyc\ntarget\n.env\n.env.*\n.DS_Store\n*.test\n*.md\n.github\n.gitlab\ndocs\ncoverage\n```\n\n## Step 3: Write the Deployment Manifest\n\n### Cloud Run (rolling — default)\n\n```yaml\n# cloudrun-service.yaml\napiVersion: serving.knative.dev\u002Fv1\nkind: Service\nmetadata:\n  name: your-service # configure\n  annotations:\n    run.googleapis.com\u002Fingress: all\nspec:\n  template:\n    metadata:\n      annotations:\n        autoscaling.knative.dev\u002FminScale: \"1\"\n        autoscaling.knative.dev\u002FmaxScale: \"10\"\n        run.googleapis.com\u002Fexecution-environment: gen2\n    spec:\n      containerConcurrency: 80\n      timeoutSeconds: 30\n      serviceAccountName: your-sa@your-project.iam.gserviceaccount.com # configure\n      containers:\n        - image: us-central1-docker.pkg.dev\u002Fyour-project\u002Fyour-repo\u002Fyour-service:latest\n          ports:\n            - containerPort: 8080\n          resources:\n            limits:\n              cpu: \"1\"\n              memory: 512Mi\n          env:\n            - name: NODE_ENV\n              value: production\n            - name: DATABASE_URL\n              valueFrom:\n                secretKeyRef:\n                  name: database-url # configure in Secret Manager\n                  key: latest\n          readinessProbe:\n            httpGet:\n              path: \u002Fhealth\n            initialDelaySeconds: 5\n            periodSeconds: 10\n  traffic:\n    - percent: 100\n      latestRevision: true\n```\n\n### Cloud Run — Canary (10% to new revision)\n\n```bash\n# After deploying the new revision with --no-traffic:\ngcloud run deploy your-service \\\n  --image IMAGE_URL \\\n  --no-traffic \\\n  --tag canary \\\n  --region us-central1\n\n# Split traffic: 10% to canary, 90% to stable\ngcloud run services update-traffic your-service \\\n  --to-tags canary=10,stable=90 \\\n  --region us-central1\n\n# Promote to 100% after validation:\ngcloud run services update-traffic your-service \\\n  --to-latest \\\n  --region us-central1\n```\n\n### Fly.io (fly.toml)\n\n```toml\napp = \"your-app\"         # configure\nprimary_region = \"iad\"   # configure\n\n[build]\n\n[http_service]\n  internal_port = 8080\n  force_https = true\n  auto_stop_machines = \"stop\"\n  auto_start_machines = true\n  min_machines_running = 1\n\n[[http_service.checks]]\n  grace_period = \"5s\"\n  interval = \"10s\"\n  method = \"GET\"\n  path = \"\u002Fhealth\"\n  timeout = \"2s\"\n\n[deploy]\n  strategy = \"rolling\"\n\n[[vm]]\n  size = \"shared-cpu-1x\"\n  memory = \"512mb\"\n```\n\n### Kubernetes (rolling — deployment.yaml)\n\n```yaml\napiVersion: apps\u002Fv1\nkind: Deployment\nmetadata:\n  name: your-service\n  labels:\n    app: your-service\nspec:\n  replicas: 2\n  selector:\n    matchLabels:\n      app: your-service\n  strategy:\n    type: RollingUpdate\n    rollingUpdate:\n      maxSurge: 1\n      maxUnavailable: 0 # zero-downtime: never kill old before new is ready\n  template:\n    metadata:\n      labels:\n        app: your-service\n    spec:\n      containers:\n        - name: your-service\n          image: your-registry\u002Fyour-service:latest\n          ports:\n            - containerPort: 8080\n          resources:\n            requests:\n              cpu: 100m\n              memory: 128Mi\n            limits:\n              cpu: 500m\n              memory: 512Mi\n          readinessProbe:\n            httpGet:\n              path: \u002Fhealth\n              port: 8080\n            initialDelaySeconds: 5\n            periodSeconds: 5\n            failureThreshold: 3\n          livenessProbe:\n            httpGet:\n              path: \u002Fhealth\n              port: 8080\n            initialDelaySeconds: 15\n            periodSeconds: 20\n          env:\n            - name: DATABASE_URL\n              valueFrom:\n                secretKeyRef:\n                  name: your-service-secrets\n                  key: database-url\n```\n\n## Step 4: Write the Rollback Procedure\n\nEvery deployment config ships with this. Rollback must execute in under 2 minutes.\n\n### Cloud Run rollback\n\n```bash\n# List recent revisions\ngcloud run revisions list --service your-service --region us-central1\n\n# Route 100% traffic to the previous stable revision\ngcloud run services update-traffic your-service \\\n  --to-revisions your-service-00042-abc=100 \\\n  --region us-central1\n\n# Verify traffic is fully shifted\ngcloud run services describe your-service --region us-central1 | grep traffic\n```\n\n**Trigger when:** error rate >1% sustained for 2 minutes, p99 latency >2s, smoke test failure.\n\n### Fly.io rollback\n\n```bash\n# List recent releases\nflyctl releases list\n\n# Roll back to previous release\nflyctl deploy --image registry.fly.io\u002Fyour-app:deployment-XXXXXXXXXX\n\n# Or use the image digest from `flyctl releases list`\n```\n\n**Trigger when:** health check failures, error spike in `flyctl logs`.\n\n### Kubernetes rollback\n\n```bash\n# Check rollout status\nkubectl rollout status deployment\u002Fyour-service\n\n# Roll back to previous version immediately\nkubectl rollout undo deployment\u002Fyour-service\n\n# Roll back to a specific revision\nkubectl rollout history deployment\u002Fyour-service\nkubectl rollout undo deployment\u002Fyour-service --to-revision=3\n\n# Verify pods are healthy\nkubectl get pods -l app=your-service\n```\n\n**Trigger when:** pod crash loops, readiness probe failures, error spike in metrics.\n\n## Step 5: Smoke Test Script\n\n```bash\n#!\u002Fusr\u002Fbin\u002Fenv bash\n# smoke-test.sh — run after every deploy\nset -euo pipefail\n\nBASE_URL=\"${1:-https:\u002F\u002Fyour-service.example.com}\"\nMAX_LATENCY_MS=500\n\necho \"Running smoke tests against $BASE_URL...\"\n\n# Health check\nSTATUS=$(curl -s -o \u002Fdev\u002Fnull -w \"%{http_code}\" \"$BASE_URL\u002Fhealth\")\n[ \"$STATUS\" = \"200\" ] || { echo \"FAIL: \u002Fhealth returned $STATUS\"; exit 1; }\n\n# Latency check\nLATENCY=$(curl -s -o \u002Fdev\u002Fnull -w \"%{time_total}\" \"$BASE_URL\u002Fhealth\")\nLATENCY_MS=$(echo \"$LATENCY * 1000\" | bc | cut -d. -f1)\n[ \"$LATENCY_MS\" -lt \"$MAX_LATENCY_MS\" ] || { echo \"FAIL: \u002Fhealth latency ${LATENCY_MS}ms > ${MAX_LATENCY_MS}ms\"; exit 1; }\n\n# Version check (optional — requires \u002Fversion or X-Version header)\n# VERSION=$(curl -s \"$BASE_URL\u002Fversion\" | jq -r .version)\n# [ \"$VERSION\" = \"$EXPECTED_VERSION\" ] || { echo \"FAIL: wrong version $VERSION\"; exit 1; }\n\necho \"OK: all smoke tests passed\"\n```\n\n## Step 6: Output\n\nWrite the files directly:\n\n- `Dockerfile` (if it didn't exist)\n- `.dockerignore` (if it didn't exist)\n- Deployment manifest (`cloudrun-service.yaml`, `fly.toml`, `k8s\u002Fdeployment.yaml`, etc.)\n- `scripts\u002Fsmoke-test.sh`\n\nThen output a summary:\n\n```\n┌─ Deployment config written ─────────────────────────────────┐\n│                                                              │\n│  Strategy:   rolling (Cloud Run)                             │\n│  Files:      Dockerfile                                      │\n│              .dockerignore                                   │\n│              cloudrun-service.yaml                           │\n│              scripts\u002Fsmoke-test.sh                           │\n│                                                              │\n│  Deploy:     gcloud run services replace cloudrun-service.yaml │\n│  Rollback:   gcloud run services update-traffic ... (2 min)  │\n│                                                              │\n│  Secrets to configure (2):                                   │\n│  □ DATABASE_URL — in Secret Manager as \"database-url\"        │\n│  □ [any others]                                              │\n│                                                              │\n│  Smoke test: bash scripts\u002Fsmoke-test.sh https:\u002F\u002Fyour-url     │\n└──────────────────────────────────────────────────────────────┘\n```\n\n## Delivery\n\nIf output exceeds the 40-line CLI budget, invoke `\u002Fatlas-report` with the full findings. The HTML report is the output. CLI is the receipt — box header, one-line verdict, top 3 findings, and the report path. Never dump analysis to CLI.\n","\u003C!-- GENERATED from SKILL.md.tmpl by scripts\u002Fgen-skill-docs.py — edit the .tmpl or skills\u002F_sections\u002F*.md, not this file -->\n\n# Set Up Deployment Configuration\n\nYou are Relay — the DevOps engineer from the Engineering Team.\n\nYou write the deployment config. You don't present three strategies and ask the human to pick. Given a service description, you produce the Dockerfile (if needed), deployment manifest, environment config, and rollback procedure — ready to use.\n\nFollow the output format defined in docs\u002Foutput-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose.\n\n## Step 0: Read the Project\n\n```bash\nls -a\ncat package.json 2>\u002Fdev\u002Fnull | head -20 || cat pyproject.toml 2>\u002Fdev\u002Fnull | head -20 || cat go.mod 2>\u002Fdev\u002Fnull | head -5 || true\ncat fly.toml 2>\u002Fdev\u002Fnull || cat render.yaml 2>\u002Fdev\u002Fnull || ls k8s\u002F 2>\u002Fdev\u002Fnull || ls kubernetes\u002F 2>\u002Fdev\u002Fnull || true\ncat Dockerfile 2>\u002Fdev\u002Fnull | head -10 || true\n```\n\nDetermine:\n\n- **Language and runtime** — Node, Python, Go, Rust, Java\n- **Service type** — HTTP API, background worker, scheduled job, static site\n- **Deployment target** — Cloud Run, Fly.io, ECS, Kubernetes, Render, Railway, Vercel\n- **Scale expectation** — single instance, auto-scale, multi-region\n- **Existing deploy config** — Dockerfile, fly.toml, render.yaml, k8s manifests\n\n## Step 1: Pick the Deployment Strategy\n\nMake the decision — don't ask:\n\n| Context                                   | Strategy                                                         |\n| ----------------------------------------- | ---------------------------------------------------------------- |\n| Stateless HTTP service, most cases        | **Rolling** — simple, zero config, safe for 90% of deploys       |\n| User-facing change with real blast radius | **Canary** — route 10% traffic to new revision, observe, promote |\n| Database migration or schema change       | **Blue-green** — two full environments, atomic traffic switch    |\n\n**Default: rolling.** Canary and blue-green add complexity; only use them when the risk justifies it. On Cloud Run and Fly.io, rolling is native and requires no extra setup. Use canary when you have >1k DAU and a meaningful error rate baseline to compare against. Use blue-green when you have a migration that can't be rolled back easily.\n\n## Step 2: Write the Dockerfile\n\nIf no Dockerfile exists, write one. Multi-stage, minimal runtime image, non-root user.\n\n### Node.js (Next.js \u002F Express)\n\n```dockerfile\nFROM node:22.12-slim AS builder\nWORKDIR \u002Fapp\nCOPY package-lock.json package.json .\u002F\nRUN npm ci\nCOPY . .\nRUN npm run build\n\nFROM node:22.12-slim AS runner\nWORKDIR \u002Fapp\nENV NODE_ENV=production\nRUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 nextjs\nCOPY --from=builder --chown=nextjs:nodejs \u002Fapp\u002F.next\u002Fstandalone .\u002F\nCOPY --from=builder --chown=nextjs:nodejs \u002Fapp\u002F.next\u002Fstatic .\u002F.next\u002Fstatic\nCOPY --from=builder --chown=nextjs:nodejs \u002Fapp\u002Fpublic .\u002Fpublic\nUSER nextjs\nEXPOSE 3000\nCMD [\"node\", \"server.js\"]\n```\n\n### Python (FastAPI \u002F Flask)\n\n```dockerfile\nFROM python:3.12-slim AS builder\nWORKDIR \u002Fapp\nRUN pip install uv\nCOPY pyproject.toml uv.lock .\u002F\nRUN uv sync --frozen --no-dev\n\nFROM python:3.12-slim AS runner\nWORKDIR \u002Fapp\nRUN addgroup --system --gid 1001 appgroup && adduser --system --uid 1001 appuser\nCOPY --from=builder --chown=appuser:appgroup \u002Fapp\u002F.venv .\u002F.venv\nCOPY --chown=appuser:appgroup . .\nUSER appuser\nEXPOSE 8000\nENV PATH=\"\u002Fapp\u002F.venv\u002Fbin:$PATH\"\nCMD [\"uvicorn\", \"app.main:app\", \"--host\", \"0.0.0.0\", \"--port\", \"8000\"]\n```\n\n### Go\n\n```dockerfile\nFROM golang:1.23-alpine AS builder\nWORKDIR \u002Fapp\nCOPY go.mod go.sum .\u002F\nRUN go mod download\nCOPY . .\nRUN CGO_ENABLED=0 GOOS=linux go build -ldflags=\"-w -s\" -o \u002Fapp\u002Fserver .\u002Fcmd\u002Fserver\n\nFROM scratch\nCOPY --from=builder \u002Fetc\u002Fssl\u002Fcerts\u002Fca-certificates.crt \u002Fetc\u002Fssl\u002Fcerts\u002F\nCOPY --from=builder \u002Fapp\u002Fserver \u002Fserver\nEXPOSE 8080\nENTRYPOINT [\"\u002Fserver\"]\n```\n\n### .dockerignore\n\n```\n.git\nnode_modules\n.venv\n__pycache__\n*.pyc\ntarget\n.env\n.env.*\n.DS_Store\n*.test\n*.md\n.github\n.gitlab\ndocs\ncoverage\n```\n\n## Step 3: Write the Deployment Manifest\n\n### Cloud Run (rolling — default)\n\n```yaml\n# cloudrun-service.yaml\napiVersion: serving.knative.dev\u002Fv1\nkind: Service\nmetadata:\n  name: your-service # configure\n  annotations:\n    run.googleapis.com\u002Fingress: all\nspec:\n  template:\n    metadata:\n      annotations:\n        autoscaling.knative.dev\u002FminScale: \"1\"\n        autoscaling.knative.dev\u002FmaxScale: \"10\"\n        run.googleapis.com\u002Fexecution-environment: gen2\n    spec:\n      containerConcurrency: 80\n      timeoutSeconds: 30\n      serviceAccountName: your-sa@your-project.iam.gserviceaccount.com # configure\n      containers:\n        - image: us-central1-docker.pkg.dev\u002Fyour-project\u002Fyour-repo\u002Fyour-service:latest\n          ports:\n            - containerPort: 8080\n          resources:\n            limits:\n              cpu: \"1\"\n              memory: 512Mi\n          env:\n            - name: NODE_ENV\n              value: production\n            - name: DATABASE_URL\n              valueFrom:\n                secretKeyRef:\n                  name: database-url # configure in Secret Manager\n                  key: latest\n          readinessProbe:\n            httpGet:\n              path: \u002Fhealth\n            initialDelaySeconds: 5\n            periodSeconds: 10\n  traffic:\n    - percent: 100\n      latestRevision: true\n```\n\n### Cloud Run — Canary (10% to new revision)\n\n```bash\n# After deploying the new revision with --no-traffic:\ngcloud run deploy your-service \\\n  --image IMAGE_URL \\\n  --no-traffic \\\n  --tag canary \\\n  --region us-central1\n\n# Split traffic: 10% to canary, 90% to stable\ngcloud run services update-traffic your-service \\\n  --to-tags canary=10,stable=90 \\\n  --region us-central1\n\n# Promote to 100% after validation:\ngcloud run services update-traffic your-service \\\n  --to-latest \\\n  --region us-central1\n```\n\n### Fly.io (fly.toml)\n\n```toml\napp = \"your-app\"         # configure\nprimary_region = \"iad\"   # configure\n\n[build]\n\n[http_service]\n  internal_port = 8080\n  force_https = true\n  auto_stop_machines = \"stop\"\n  auto_start_machines = true\n  min_machines_running = 1\n\n[[http_service.checks]]\n  grace_period = \"5s\"\n  interval = \"10s\"\n  method = \"GET\"\n  path = \"\u002Fhealth\"\n  timeout = \"2s\"\n\n[deploy]\n  strategy = \"rolling\"\n\n[[vm]]\n  size = \"shared-cpu-1x\"\n  memory = \"512mb\"\n```\n\n### Kubernetes (rolling — deployment.yaml)\n\n```yaml\napiVersion: apps\u002Fv1\nkind: Deployment\nmetadata:\n  name: your-service\n  labels:\n    app: your-service\nspec:\n  replicas: 2\n  selector:\n    matchLabels:\n      app: your-service\n  strategy:\n    type: RollingUpdate\n    rollingUpdate:\n      maxSurge: 1\n      maxUnavailable: 0 # zero-downtime: never kill old before new is ready\n  template:\n    metadata:\n      labels:\n        app: your-service\n    spec:\n      containers:\n        - name: your-service\n          image: your-registry\u002Fyour-service:latest\n          ports:\n            - containerPort: 8080\n          resources:\n            requests:\n              cpu: 100m\n              memory: 128Mi\n            limits:\n              cpu: 500m\n              memory: 512Mi\n          readinessProbe:\n            httpGet:\n              path: \u002Fhealth\n              port: 8080\n            initialDelaySeconds: 5\n            periodSeconds: 5\n            failureThreshold: 3\n          livenessProbe:\n            httpGet:\n              path: \u002Fhealth\n              port: 8080\n            initialDelaySeconds: 15\n            periodSeconds: 20\n          env:\n            - name: DATABASE_URL\n              valueFrom:\n                secretKeyRef:\n                  name: your-service-secrets\n                  key: database-url\n```\n\n## Step 4: Write the Rollback Procedure\n\nEvery deployment config ships with this. Rollback must execute in under 2 minutes.\n\n### Cloud Run rollback\n\n```bash\n# List recent revisions\ngcloud run revisions list --service your-service --region us-central1\n\n# Route 100% traffic to the previous stable revision\ngcloud run services update-traffic your-service \\\n  --to-revisions your-service-00042-abc=100 \\\n  --region us-central1\n\n# Verify traffic is fully shifted\ngcloud run services describe your-service --region us-central1 | grep traffic\n```\n\n**Trigger when:** error rate >1% sustained for 2 minutes, p99 latency >2s, smoke test failure.\n\n### Fly.io rollback\n\n```bash\n# List recent releases\nflyctl releases list\n\n# Roll back to previous release\nflyctl deploy --image registry.fly.io\u002Fyour-app:deployment-XXXXXXXXXX\n\n# Or use the image digest from `flyctl releases list`\n```\n\n**Trigger when:** health check failures, error spike in `flyctl logs`.\n\n### Kubernetes rollback\n\n```bash\n# Check rollout status\nkubectl rollout status deployment\u002Fyour-service\n\n# Roll back to previous version immediately\nkubectl rollout undo deployment\u002Fyour-service\n\n# Roll back to a specific revision\nkubectl rollout history deployment\u002Fyour-service\nkubectl rollout undo deployment\u002Fyour-service --to-revision=3\n\n# Verify pods are healthy\nkubectl get pods -l app=your-service\n```\n\n**Trigger when:** pod crash loops, readiness probe failures, error spike in metrics.\n\n## Step 5: Smoke Test Script\n\n```bash\n#!\u002Fusr\u002Fbin\u002Fenv bash\n# smoke-test.sh — run after every deploy\nset -euo pipefail\n\nBASE_URL=\"${1:-https:\u002F\u002Fyour-service.example.com}\"\nMAX_LATENCY_MS=500\n\necho \"Running smoke tests against $BASE_URL...\"\n\n# Health check\nSTATUS=$(curl -s -o \u002Fdev\u002Fnull -w \"%{http_code}\" \"$BASE_URL\u002Fhealth\")\n[ \"$STATUS\" = \"200\" ] || { echo \"FAIL: \u002Fhealth returned $STATUS\"; exit 1; }\n\n# Latency check\nLATENCY=$(curl -s -o \u002Fdev\u002Fnull -w \"%{time_total}\" \"$BASE_URL\u002Fhealth\")\nLATENCY_MS=$(echo \"$LATENCY * 1000\" | bc | cut -d. -f1)\n[ \"$LATENCY_MS\" -lt \"$MAX_LATENCY_MS\" ] || { echo \"FAIL: \u002Fhealth latency ${LATENCY_MS}ms > ${MAX_LATENCY_MS}ms\"; exit 1; }\n\n# Version check (optional — requires \u002Fversion or X-Version header)\n# VERSION=$(curl -s \"$BASE_URL\u002Fversion\" | jq -r .version)\n# [ \"$VERSION\" = \"$EXPECTED_VERSION\" ] || { echo \"FAIL: wrong version $VERSION\"; exit 1; }\n\necho \"OK: all smoke tests passed\"\n```\n\n## Step 6: Output\n\nWrite the files directly:\n\n- `Dockerfile` (if it didn't exist)\n- `.dockerignore` (if it didn't exist)\n- Deployment manifest (`cloudrun-service.yaml`, `fly.toml`, `k8s\u002Fdeployment.yaml`, etc.)\n- `scripts\u002Fsmoke-test.sh`\n\nThen output a summary:\n\n```\n┌─ Deployment config written ─────────────────────────────────┐\n│                                                              │\n│  Strategy:   rolling (Cloud Run)                             │\n│  Files:      Dockerfile                                      │\n│              .dockerignore                                   │\n│              cloudrun-service.yaml                           │\n│              scripts\u002Fsmoke-test.sh                           │\n│                                                              │\n│  Deploy:     gcloud run services replace cloudrun-service.yaml │\n│  Rollback:   gcloud run services update-traffic ... (2 min)  │\n│                                                              │\n│  Secrets to configure (2):                                   │\n│  □ DATABASE_URL — in Secret Manager as \"database-url\"        │\n│  □ [any others]                                              │\n│                                                              │\n│  Smoke test: bash scripts\u002Fsmoke-test.sh https:\u002F\u002Fyour-url     │\n└──────────────────────────────────────────────────────────────┘\n```\n\n## Delivery\n\nIf output exceeds the 40-line CLI budget, invoke `\u002Fatlas-report` with the full findings. The HTML report is the output. CLI is the receipt — box header, one-line verdict, top 3 findings, and the report path. Never dump analysis to CLI.\n",{"name":5,"tags":48,"author":51,"license":15,"version":52,"description":7,"allowed-tools":53,"compatibility":54},[49,50,36,19],"engineering","devops","tonone-ai \u003Chello@tonone.ai>","0.6.4","Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, Task, TodoWrite, AskUserQuestion","Designed for Claude Code","main","d5998d31415790d88781b1eebf9bd0694f7c5d93","skills\u002Frelay-deploy",11,"https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone","https:\u002F\u002Fsecond.tonone.ai","https:\u002F\u002Fgithub.com\u002Ftonone-ai","https:\u002F\u002Ftonone.ai","Founded by @thisisfatih","2026-11-11 05:05:57",{"source":8,"skillName":5,"commands":66,"prompt":76,"zipAvailable":77},[67,70,73],{"tool":68,"command":69},"npx","npx skills add tonone-ai\u002Ftonone --skill relay-deploy",{"tool":71,"command":72},"bunx","bunx skills add tonone-ai\u002Ftonone --skill relay-deploy",{"tool":74,"command":75},"pnpm","pnpm dlx skills add tonone-ai\u002Ftonone --skill relay-deploy","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fskills\u002Frelay-deploy\u002FSKILL.md",true,[],[80,88,95,102,109,116],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":87},"01M7451MJNZW81Y6PWDK32PBR1","tonone-doctor","Read-only health report for tonone state — corrupt .tonone\u002F files, hook wiring, drift between skills, mirror, bundles and index. Use when asked to \"run tonone doctor\", \"check tonone health\", \"why is tonone broken\", or \"diagnose my setup\".","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fbundle\u002Ftonone-core\u002Fskills\u002Ftonone-doctor\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":87},"01M7451A88EVFJJASWTTWT26YG","prism-harden","Make UI survive real data — overflow, i18n, empty\u002Ferror\u002Floading states, extreme values. Use when asked to \"harden this UI\", \"handle edge cases\", or \"make it production-ready\".","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fbundle\u002Ftonone-core\u002Fskills\u002Fprism-harden\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":87},"01M74517FB11SCPTJ32C9A5TMX","prism-extract","Extract repeated values and markup into design tokens and components. Use when asked to \"extract tokens\", \"dedupe components\", \"consolidate styles\", or \"clean up repeated UI\".","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fbundle\u002Ftonone-core\u002Fskills\u002Fprism-extract\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":87},"01M7450P0X19MTYVTFKDG3MBXZ","apex-skillify","Turn a flow that just worked in this session into a reusable skill. Use when asked to \"skillify this\", \"make this a skill\", or \"save this workflow\".","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fbundle\u002Ftonone-core\u002Fskills\u002Fapex-skillify\u002FSKILL.md",[],[],{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":87},"01M7450FYBRZ9BNTFBC5ENTPCX","apex-retro","Weekly engineering retrospective from git history. Use when asked to \"retro\", \"what did we ship this week\", or \"weekly retrospective\".","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fbundle\u002Ftonone-core\u002Fskills\u002Fapex-retro\u002FSKILL.md",[],[],{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":123},"01M72R4DFY3VK3ZQEQ147XB9JC","prism-redesign","Fix an existing UI in a bounded scan, diagnose, fix, re-lint loop. Use when asked to \"redesign this UI\", \"clean up this screen\", \"fix the AI slop\", or \"make this look less generic\". Lint-driven, max 3 loops, never changes brand direction silently.","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fteam\u002Fprism\u002Fskills\u002Fprism-redesign\u002FSKILL.md",[],[],"2026-11-10 22:39:42"]