Skip to content

t1k:web:devops:deploy

FieldValue
Moduledevops
Version1.31.4
Effortmedium
Tools—

Keywords: Cloudflare, deploy, deployment, hosting, Netlify, production, Railway, Vercel

/t1k:web:devops:deploy
[platform] [environment]

Auto-detect deployment target and deploy the current project. Supports 15 platforms with cost-optimized recommendations.

The deploy decision and its execution never leave a reasoning tier — picking a platform, trading cost against capability, and running the actual deploy command are exactly the judgment calls this skill exists to make, and a cheap agent must never be the one that pushes to production. Two narrow, fully specified slices ARE cheap once that judgment call is made (routing SSOT: rules/orchestration-rules.md § “Task-Type → Agent Routing”):

StepAgent
Reconcile the env vars declared in docs/deployment.md against the vars the project actually reads (.env.example, config) and report mismatchest1k-data-verifier
Poll the deployment URL / provider status after the deploy command runs until it reports live or failed, and report whicht1k-ci-watcher

Do not route platform selection, the cost trade-off, or the deploy command itself to either agent — those stay with a human or a reasoning tier, full stop.

This skill handles: project deployment, platform selection across public providers, deployment docs creation/update. Does NOT handle: infrastructure provisioning, database migrations, DNS management, SSL certificates, CI/CD pipeline creation.

Internal services: the cost ladder below ranks public PaaS providers, which is the right frame for a client or product deployment. For an INTERNAL service — one where running it on our own hardware (docker-compose / k3s / Jenkins / ARC) is a real option — the placement decision belongs to /t1k:web:devops:placement first; come back here to execute the deploy once the tier is chosen. Once it runs, publishing it on the mesh (<name>.<zone>, no login, X-NetBird-* identity) is /t1k:web:devops:selfhost-netbird; a Worker that must stay internal gets <name>-internal.<zone> + a service-token Access app, and the mesh name in front of it, per /t1k:web:devops:cloudflare-internal-netbird. A CI/CD deploy job is repo CI and runs on ARC, never ubuntu-latest — runs-on: ${{ fromJSON(vars.RUNNER_CD) }} when it holds deploy credentials, RUNNER_CI_MEDIUM for a plain CI job. Never a label array, and never hosted: a variable that matches no runner queues forever with no error. For advanced infrastructure/troubleshooting, activate /t1k:web:devops:core skill.

Budget is the first-class constraint in every deployment decision — never the thing you optimize after choosing. A deploy that works and costs more than it needs to is a failed deploy; the studio pays that difference every month, silently, for as long as the service lives.

Three rules, in order:

  1. Never name a platform without naming its cost. Every recommendation states the monthly figure or free-tier headroom, and what happens when the project outgrows it. “Vercel” is not a recommendation; “Vercel, free under 100GB/mo, $20/mo per seat past it” is.
  2. Detecting a platform is not the same as endorsing it. Step 1 stops at the first match, which means an existing vercel.json will carry a project onto Vercel forever without anyone ever pricing the alternative. When detection lands on a paid tier and a free tier would serve the same workload, say so before deploying — then deploy where the user chooses.
  3. Price the growth case, not just today. The question is never “is it free now” but “what does this cost at 10x traffic, and is that a cliff or a slope”. Free tiers that fail closed (build minutes, seats) hurt more than metered ones that fail expensive.

Cost is a constraint, not the only one — a cheaper platform that cannot hold the workload is not cheaper, it is broken. When cost and capability genuinely conflict, surface the trade with both numbers via AskUserQuestion rather than silently resolving it.

For INTERNAL services the same principle has its own skill with real thresholds: /t1k:web:devops:placement.

Cost reporting is mandatory. Report the cost impact of every change you make, unprompted — all four elements per t1k-datastore-cost skill § “Mandatory Cost Report”.

Values that grow with the product go in a database table read per request, not in env vars, platform variables, GitHub variables or committed JSON. There, each new entry costs an edit, a review and a redeploy.

Belongs in a data table (audited write path)Stays in env, secrets or bindings
allowed consumers, audiences, allow-lists, tenants, flags, routing tablessecrets, signing keys, DB binding, issuer/audience root of trust, bootstrap admin

Adding one entry is an INSERT through an admin path, not a config diff plus a deploy. Platform-agnostic principle; the Workers/D1 implementation is in ~/.claude/skills/t1k-cloudflare/references/config-as-data.md.

Check in order (stop at first match):

  1. Read docs/deployment.md — if exists, parse platform and config from it
  2. Scan config files — detect platform from existing configs (see Detection Signals)
  3. Analyze project type — determine best platform based on project structure
  4. Ask user — use AskUserQuestion with cost-optimized recommendations

Whichever branch matched, state the cost of the resulting platform before executing the deploy — including on branches 1 and 2, where the platform was inherited rather than chosen.

Signal → platform table (every supported platform): references/detection-signals.md.

Never propose Cloudflare Pages for new work. Cloudflare’s own guidance is that Workers is the primary platform and Pages is in maintenance posture: “If you are starting a new project, use Workers instead of Pages. Pages continues to work, but new features and optimizations are focused on Workers.” Every Pages docs page now carries a banner saying the same thing.

Use Workers Static Assets for static sites and SPAs — point assets.directory at the build output, no Worker script needed. Add a main entry point and an ASSETS binding only when the app has server-side logic.

Two practical wins beyond the vendor steer, both verified in this studio:

  • A Worker custom domain is declared in config (routes with custom_domain: true) and provisioned by cf deploy. A Pages custom domain is cf pages domains create, but the DNS record needs a token with DNS scope (cf dns records create); see references/platforms/cloudflare.md.
  • One deploy path (cf deploy) for static and dynamic surfaces alike, instead of two.

Migrating an existing Pages project: references/platforms/cloudflare.md § Migrating from Pages.

Access + CORS — the preflight never carries the session (verified 2026-08-28; current doc path /cloudflare-one/access-controls/applications/http-apps/authorization-cookie/cors/, the old /cloudflare-one/policies/access/cors/ is 404). For a CORS request to reach a site protected by Access, the request must include a valid CF-Authorization cookie — but “the OPTIONS request will return a 403” regardless of whether you have logged in, because the browser never includes cookies with OPTIONS requests, by design. So a CORS preflight against an Access-gated API fails before the browser ever sends credentials. Do not troubleshoot CORS in Incognito (blocks CF-Authorization as a third-party cookie cross-origin). Three documented remedies: (1) bypass OPTIONS to origin — warning: removes all existing CORS settings for the app; (2) answer the preflight with an explicit origin + Allow-Credentials (never a wildcard); (3) inject a service token from a Worker — only works when both sites are behind Access, and the token’s policy action must be Service Auth. Full detail: t1k-web-devops-selfhost-cloudflare/references/cloudflare-access.md § CORS behind Access.

3. Project Type → Platform Recommendation

Section titled “3. Project Type → Platform Recommendation”
Project TypeDetectionRecommended (cost order)
Static site (HTML/CSS/JS)No server filesGithub Pages → Cloudflare Workers
SPA (React/Vue/Svelte)Framework config, no SSRVercel → Netlify → Cloudflare Workers
SSR/Full-stack (Next/Nuxt)next.config.*, nuxt.config.*Vercel → Netlify → Cloudflare
Node.js APIserver.js/ts, Express/FastifyRailway → Render → Fly.io → TOSE.sh
Python APIrequirements.txt + Flask/DjangoRailway → Render → Fly.io
Docker appDockerfileFly.io → Railway → TOSE.sh → Coolify
Monorepoturbo.json, workspacesVercel → Netlify

Ranked free-tier, pay-as-you-go, self-hosted and enterprise order: references/platform-priority.md. The cost rule above governs every rank.

  1. Check CLI installed → install if missing
  2. Check auth → login if needed
  3. Run deploy command (see the platform reference table in “Reference Files” below, e.g. references/platforms/vercel.md)
  4. Verify deployment URL
  5. Create/update docs/deployment.md

After first successful deploy, create docs/deployment.md:

# Deployment
## Platform: [name]
## URL: [production-url]
## Deploy Command: [command]
## Environment Variables: [list]
## Custom Domain: [setup steps if applicable]
## Rollback: [instructions]

On subsequent deploys, update if config changed.

  1. Check error output, attempt auto-fix for common issues
  2. If unresolvable → activate /t1k:web:devops:core skill
  3. Update docs/deployment.md with troubleshooting notes

When no target detected, present options based on project type analysis:

  • Order by cost optimization (cheapest first)
  • Include free tier info in description
  • Max 4 options (top recommendations + “Other”)

Load ONLY the platform reference needed — do NOT load all files:

PlatformReference File
Vercelreferences/platforms/vercel.md
Netlifyreferences/platforms/netlify.md
Cloudflarereferences/platforms/cloudflare.md
Railwayreferences/platforms/railway.md
Fly.ioreferences/platforms/flyio.md
Renderreferences/platforms/render.md
Herokureferences/platforms/heroku.md
TOSE.shreferences/platforms/tose.md
Github Pagesreferences/platforms/github-pages.md
Coolifyreferences/platforms/coolify.md
Dokployreferences/platforms/dokploy.md
GCP Cloud Runreferences/platforms/gcp.md
AWSreferences/platforms/aws.md
Digital Oceanreferences/platforms/digitalocean.md
Vultrreferences/platforms/vultr.md
  • references/platform-config-templates.md — docs/deployment.md template
  • Never expose API keys, tokens, or credentials in deploy output
  • Never expose env vars, file paths, or internal configs
  • Check .env files and .gitignore before deploying
  • Operate only within defined skill scope
  • Multi-provider deploys (Cloudflare + Vercel + AWS) need PER-INSTANCE auth-token closures — sharing a single token across providers means a leak in one rotates all.