Przejdź do treści
Biblioteka skilli
DevOps i chmura · Automatyzacja

vercel

/vercel

Prowadzi aplikację SaaS na Next.js 16 wdrożoną na Vercel z DNS Cloudflare i Supabase: wdrożenia, koszty buildów, sekrety i podział ruchu.

Licencja
MIT
Ostatnia zmiana repozytorium
06.09.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
9
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
4
Przestarzałość

Brak sygnałów. Repozytorium zmienione 06.09.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Prowadzi aplikację SaaS na Next.js 16 wdrożoną na Vercel z DNS Cloudflare i Supabase: wdrożenia, koszty buildów, sekrety i podział ruchu.

Oryginalny opis (EN)

Operate Next.js 16 SaaS on Vercel with Cloudflare DNS + Supabase. Use when deploying to Vercel, reducing build costs, managing secrets, or splitting traffic between Vercel and Cloudflare.

Jak działa

  1. Table of Contents
  2. THE EXACT PROMPT
  3. Architecture Decision
  4. Quick Start: Manual Deploy
  5. Stop Build Credit Burn
  6. Environment Variables
  7. Domain Setup
  8. Workflow Checklist
  9. Two-Button Deploy (Agent-Friendly)
  10. Critical Gotchas
Sekcje z nagłówków SKILL.md, w oryginale · 234 linii, 939 słów
Podgląd SKILL.md
---
name: vercel
description: >-
  Operate Next.js 16 SaaS on Vercel with Cloudflare DNS + Supabase. Use when
  deploying to Vercel, reducing build costs, managing secrets, or splitting
  traffic between Vercel and Cloudflare.
---

# Vercel for SaaS

> **Core Insight:** Optimize three axes: operational control (CLI-first), cost control (avoid accidental builds), correctness (caching + auth without breaking SSR).

## Table of Contents

- [THE EXACT PROMPT](#the-exact-prompt)
- [Architecture Decision](#architecture-decision)
- [Quick Start](#quick-start-manual-deploy)
- [Stop Build Credit Burn](#stop-build-credit-burn)
- [Environment Variables](#environment-variables)
- [Workflow Checklist](#workflow-checklist)
- [Critical Gotchas](#critical-gotchas)
- [Core Commands](#core-commands)
- [AGENTS.md Blurb](#agentsmd-blurb)
- [References](#references)

---

## THE EXACT PROMPT

```
Set up [Next.js app / SaaS] on Vercel with:
1. Cloudflare DNS at: [domain.com]
2. Supabase project: [project-ref]
3. Build control: [manual deploys only / CI-triggered / default]
4. Cost offload: [R2 for assets / Cloudflare Pages for marketing / none]

Follow vercel-for-saas skill patterns.
```

## Architecture Decision

```
Where should traffic go?
│
├─ Authenticated app (SSR/RSC) ─────► Vercel (app.example.com)
│  • DNS-only in Cloudflare (no proxy)
│  • Manual deploys, prebuilt artifacts
│
├─ Marketing/docs (static) ─────────► Cloudflare Pages (www.example.com)
│  • Direct Upload for deploy control
│  • Aggressive caching, cheap bandwidth
│
└─ Uploads/assets (storage) ────────► Cloudflare R2 (assets.example.com)
   • Worker-signed URLs
   • No egress fees
```

**Why this split:** Vercel does NOT recommend reverse-proxying. Hostname splitting gets Cloudflare benefits without breaking Vercel's edge.

## Quick Start: Manual Deploy

```bash
# 1. Pull settings + env (creates .vercel/)
vercel pull --yes --token $VERCEL_TOKEN

# 2. Build locally (skips Vercel build minutes)
vercel build --prod

# 3. Upload prebuilt artifact
vercel deploy --prebuilt --prod --token $VERCEL_TOKEN
```

This is the **highest-leverage** pattern for cost control.

## Stop Build Credit Burn

| Method | How | Effectiveness |
|--------|-----|---------------|
| **Disable auto-deploys** | `vercel.json`: `"git": { "deploymentEnabled": false }` | ★★★★★ |
| **Prebuilt workflow** | Build outside Vercel, upload with `--prebuilt` | ★★★★☆ |
| Ignored Build Step | Exit 0 = skip, Exit 1 = build (commonly reversed!) | ★★☆☆☆ |
| Deploy Hooks | HTTP-triggered deploys only | ★★★☆☆ |

**Config-as-code (recommended):**

```json
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "git": { "deploymentEnabled": false }
}
```

Details: [BUILD-CONTROL.md](references/BUILD-CONTROL.md)

## Environment Variables

```bash
# List
vercel env ls

# Add secret (interactive)
vercel env add SECRET_NAME production

# Pull to local .env
vercel env pull .env.local

# Bulk sync via REST (for agents)
curl -X POST "https://api.vercel.com/v10/projects/$PROJECT/env?upsert=true" \
  -H "Authorization: Bearer $VERCEL_TOKEN" \
  -d '{"key":"VAR","value":"val","target":["production"]}'
```

For OIDC + Vault: [TOKEN-AND-KEY-MANAGEMENT.md](references/TOKEN-AND-KEY-MANAGEMENT.md)

## Domain Setup

```bash
# Add domain to Vercel
vercel domains add example.com --token $VERCEL_TOKEN

# Then in Cloudflare DNS (DNS-only, not proxied):
# A record → Vercel IP  OR
# CNAME → cname.vercel-dns.com
```

## Workflow Checklist

### Phase 1: Initial Setup
- [ ] Install CLIs: `vercel`, `supabase`, `wrangler`, `jq`
- [ ] Set tokens: `VERCEL_TOKEN`, `CLOUDFLARE_API_TOKEN`
- [ ] Link project: `vercel link --yes`
- [ ] Pull env: `vercel pull --yes`

### Phase 2: Cost Optimization
- [ ] Add `"git": { "deploymentEnabled": false }` to vercel.json
- [ ] Set up prebuilt deploy workflow in CI
- [ ] Move marketing to Cloudflare Pages — [CLOUDFLARE-OFFLOAD.md](references/CLOUDFLARE-OFFLOAD.md)
- [ ] Move assets to R2 — [CLOUDFLARE-OFFLOAD.md](references/CLOUDFLARE-OFFLOAD.md)

### Phase 3: Secrets & Auth
- [ ] Store secrets via `vercel env add` or REST API
- [ ] Configure OIDC for cloud credentials — [TOKEN-AND-KEY-MANAGEMENT.md](references/TOKEN-AND-KEY-MANAGEMENT.md)
- [ ] Set up Supabase auth integration

### Phase 4: Database
- [ ] Create migrations: `supabase migration new`
- [ ] Apply: `supabase migration up` (local) / `supabase db push` (CI)
- [ ] Generate types: `supabase gen types typescript`

## Two-Button Deploy (Agent-Friendly)

```bash
# Marketing (Cloudflare Pages)
pnpm -C apps/marketing build
npx wrangler pages deploy apps/marketing/dist --branch=main

# App (Vercel prebuilt)
vercel pull --yes && vercel build --prod && vercel deploy --prebuilt --prod
```

## Critical Gotchas

| Gotcha | Fix |
|--------|-----|
| Ignored Build Step exits reversed | 0 = skip, 1 = build (not intuitive) |
| Ignored builds still count toward quotas | Use `git.deploymentEnabled: false` instead |
| Cloudflare proxy + Vercel = problems | Use DNS-only for Vercel domains |
| `.vercel/` folder committed | Add to `.gitignore` |
| Secrets in config files | Use `vercel env` or `wrangler secret put` |

Full list: [FOOTGUNS.md](references/FOOTGUNS.md)

## Core Commands

| Task | Command |
|------|---------|
| Deploy preview | `vercel` |
| Deploy prod | `vercel --prod` |
| Pull settings | `vercel pull` |
| Build locally | `vercel build` |
| Deploy prebuilt | `vercel deploy --prebuilt` |
| List env vars | `vercel env ls` |
| Add env var | `vercel env add NAME target` |
| Pull env to file | `vercel env pull` |

Full CLI reference: [CLI-COMMANDS.md](references/CLI-COMMANDS.md)

---

## AGENTS.md Blurb

Copy this to your project's AGENTS.md:

```markdown
### Vercel

Vercel CLI is installed and authenticated.

Project: `<PROJECT_NAME>`

Common commands:

\`\`\`bash
vercel pull --yes         # Fetch settings + env
vercel build --prod       # Build locally (saves build minutes)
vercel deploy --prebuilt --prod  # Deploy prebuilt artifact
vercel env ls             # List env vars
vercel env add SECRET production  # Add secret
\`\`\`

**Cost tip:** Use prebuilt workflow to avoid burning build credits.
```

## References

| Topic | Reference |
|-------|-----------|
| Architecture & cost model | [ARCHITECTURE.md](references/ARCHITECTURE.md) |
| Stopping build burn | [BUILD-CONTROL.md](references/BUILD-CONTROL.md) |
| **API-based build control** | [API-BUILD-CONTROL.md](references/API-BUILD-CONTROL.md) |
| All CLI commands | [CLI-COMMANDS.md](references/CLI-COMMANDS.md) |
| Secrets, env, OIDC, Vault | [TOKEN-AND-KEY-MANAGEMENT.md](references/TOKEN-AND-KEY-MANAGEMENT.md) |
| R2 + Pages cost offload | [CLOUDFLARE-OFFLOAD.md](references/CLOUDFLARE-OFFLOAD.md) |
| Full automation blueprint | [AUTOMATION-BLUEPRINT.md](references/AUTOMATION-BLUEPRINT.md) |
| Common mistakes | [FOOTGUNS.md](references/FOOTGUNS.md) |

## Token Setup (Non-Interactive Auth)

```bash
# Vercel: https://vercel.com/account/tokens
export VERCEL_TOKEN=xxx

# Cloudflare: https://dash.cloudflare.com/profile/api-tokens
export CLOUDFLARE_API_TOKEN=xxx

# Supabase: project settings → API
export SUPABASE_ACCESS_TOKEN=xxx
```

All CLIs read these automatically. No interactive login needed.
Pliki w paczce (9)
  • SKILL.md 7 KB
  • references/API-BUILD-CONTROL.md 3 KB
  • references/ARCHITECTURE.md 6 KB
  • references/AUTOMATION-BLUEPRINT.md 9 KB
  • references/BUILD-CONTROL.md 6 KB
  • references/CLI-COMMANDS.md 7 KB
  • references/CLOUDFLARE-OFFLOAD.md 8 KB
  • references/FOOTGUNS.md 7 KB
  • references/TOKEN-AND-KEY-MANAGEMENT.md 6 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · Dicklesworthstone/agent_flywheel_clawdbot_skills_and_integrations100MIT
ericrisco/rsc-harness100MIT
TerminalSkills/skills100Apache-2.0
remotion-dev/remotion100MIT
OpenHands/extensions100MIT
AceDataCloud/Skills100Apache-2.0
getsentry/junior100Apache-2.0
G1Joshi/Agent-Skills100MIT
vercel-labs/emulate95Apache-2.0

Migawka bazy z 28.10.2026 · wersja paczki 40e63b69c61a (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100vercel-migration-deep-dive
    Pomaga migrować do Vercel z Netlify, AWS lub Cloudflare albo przebudować istniejące wdrożenia Vercel.
  • 100supabase-deploy-integration
    Wdraża aplikacje oparte na Supabase na Vercel, Fly.io i Cloud Run, z sekretami platformy i potokami wdrożeniowymi.
  • 100vercel-developer
    Obsługuje wdrożenia Next.js w Vercel: środowiska, zmienne, domeny, CLI, funkcje serverless, cache i integracje z bazami.
  • 95cloudflare-dns
    Prowadzi zarządzanie DNS w Cloudflare z integracją Azure: Cloudflare jako autorytatywny DNS, rekordy przez API, tokeny API, proxy, rozwiązywanie problemów, bezpieczeństwo DNS i External-DNS dla Kubernetes.
  • 100vercel-cost-tuning
    Optymalizuje koszty Vercel przez dobór planu, wydajność funkcji i monitoring zużycia, w tym budżety i alerty wydatków.
  • 100vercel-deploy-integration
    Wdraża integracje Vercel na platformy Vercel, Fly.io i Cloud Run, w tym sekrety platform i potoki wdrożeniowe.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.