deploy-vercel-supabase

deploy-vercel-supabase is a skill for Claude Code, Codex from weiyi88/cc-code. It costs 16 tokens per session (1,505 once invoked), scanned A, original, MIT.

A deployment workflow that moves a Next.js application and its local PostgreSQL database schema to Vercel and Supabase. Vercel hosts the application, while Supabase provides the hosted database.

In plain words
What is it for?
Use it to export a PostgreSQL schema, import it into Supabase, configure Vercel environment variables, connect the GitHub repository, and deploy the Next.js application.
Why use it?
It removes the repeated manual work of exporting the database structure, configuring environment settings, connecting GitHub, and starting a production deployment. It still requires the listed accounts, tokens, and local configuration.

Skill for Claude CodeCodex

Written for Claude Code and Codex: disable-model-invocation in frontmatter, but also agents/openai.yaml present.

Part of the cc-code plugin — 17 skills, 3 agents, 1 hook shipped together

Good fit Use it to export a PostgreSQL schema, import it into Supabase, configure Vercel environment variables, connect the GitHub repository, and deploy the Next.js application.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/weiyi88/cc-code/deploy-vercel-supabase
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add weiyi88/cc-code --skill deploy-vercel-supabase
Clone the repo
git clone --depth 1 https://github.com/weiyi88/cc-code

Made for: Claude Code, Codex.

Or install cc-code, the plugin that ships this one along with the rest of its 17 skills, 3 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for deploy-vercel-supabase

README.md
[![agentmods](https://agentmods.dev/badge/skills/weiyi88/cc-code/deploy-vercel-supabase/github.svg)](https://agentmods.dev/skills/weiyi88/cc-code/deploy-vercel-supabase)
Your own site
<a href="https://agentmods.dev/skills/weiyi88/cc-code/deploy-vercel-supabase"><img src="https://agentmods.dev/badge/skills/weiyi88/cc-code/deploy-vercel-supabase/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for deploy-vercel-supabase

Your own site · 80×15
<a href="https://agentmods.dev/skills/weiyi88/cc-code/deploy-vercel-supabase"><img src="https://agentmods.dev/badge/skills/weiyi88/cc-code/deploy-vercel-supabase.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,505 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00016 $0.01505
Opus 5.5 $0.00006 $0.00602
Sonnet 5.5 $0.00003 $0.00301
Haiku 4.5 $0.00002 $0.00151

Measured 1mo ago against content hash 25241039782b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

deploy-vercel-supabase scanned grade A with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

**不能用直连**(中国网络 DNS 解析失败),必须用 REST API + curl。

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

result = subprocess.run([
skills/deploy-vercel-supabase/SKILL.md · 193 lines

How it starts

The opening of the file, as written. The whole thing — 193 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Vercel + Supabase 一键部署

前置条件(用户需提前完成)

  1. 本地 .env 已配置(我直接读取,无需用户手动提供)
  2. Supabase Access Token(sbp_ 开头),用户在对话中提供
  3. GitHub 远程仓库已配置(git remote -v 可见)
  4. Vercel CLI 已本地登录(vercel whoami 可用)
  5. GitHub OAuth App Callback URL 已改为新生产域名(唯一需要用户手动操作的步骤)

部署流程

Step 1:读取环境配置

cat .env

从 .env 提取:

  • DATABASE_URL(Supabase Transaction Pooler,端口 6543)
  • DIRECT_URL(Supabase Direct Connection,端口 5432)
  • NEXTAUTH_URL(生产域名)
  • 其他所有变量

从 DIRECT_URL 解析出 Supabase Project Ref(格式:db.<ref>.supabase.co)


Step 2:提取本地 PostgreSQL Schema

pg_dump -h localhost -U <本地DB用户> -d <本地DB名> \
  --schema-only --no-owner --no-acl \
  -f .cc_code/scripts/schema_export.sql

注意:用户名不是 postgres,是本地系统用户(如 blue_focus)。如果失败,用 psql -l 查看实际用户。


Step 3:通过 Supabase Management API 导入 Schema

不能用直连(中国网络 DNS 解析失败),必须用 REST API + curl。

import subprocess, re

access_token = "<用户提供的 sbp_ token>"
project_ref = "<从 DIRECT_URL 解析的 ref>"

with open(".cc_code/scripts/schema_export.sql") as f:
    sql_content = f.read()

# 逐行状态机解析 SQL 语句(处理多行 + dollar-quoting)
statements = parse_sql_statements(sql_content)

for i, stmt in enumerate(statements):
    payload = {"query": stmt}
    result = subprocess.run([
        "curl", "-s", "-X", "POST",
        f"https://api.supabase.com/v1/projects/{project_ref}/database/query",
        "-H", f"Authorization: Bearer {access_token}",
        "-H", "Content-Type: application/json",
        "-d", json.dumps(payload)
    ], capture_output=True, text=True)
    print(f"[{i+1}/{len(statements)}] {'✓' if '\"error\"' not in result.stdout else '✗'}")

SQL 解析规则(状态机,非正则):

  • 遇到 $$ 进入 dollar-quote 模式,直到下一个 $$ 退出
  • 遇到 ' 进入字符串模式,'' 是转义不退出
  • 遇到 -- 跳过行注释
  • ; 在普通模式下才是语句分隔符

Step 4:推送代码到 GitHub

git add -A
git commit -m "feat(deploy): deploy to Vercel + Supabase"
git push origin main

Step 5:配置 Vercel 环境变量

# 检查项目是否已关联
vercel ls

# 如果是新项目,先关联
vercel link

# 批量设置环境变量(从 .env 读取)
vercel env add DATABASE_URL production
vercel env add DIRECT_URL production
vercel env add AUTH_SECRET production
vercel env add AUTH_GITHUB_ID production
vercel env add AUTH_GITHUB_SECRET production
vercel env add SMTP_USER production
vercel env add SMTP_PASS production
vercel env add SMTP_FROM production
vercel env add NEXTAUTH_URL production
vercel env add THIRD_PARTY_AI_KEY production
vercel env add THIRD_PARTY_AI_BASE_URL production
vercel env add THIRD_PARTY_AI_MODEL production

Read the full file on GitHub · 193 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · -68 tokens per session 25241039782b
  2. 1mo ago First seen · 193 lines · 84 tokens per session scan A 1eda7d1ca104

Subscribe to this mod's changes

deploy-vercel-supabase is a skill published in the GitHub repository weiyi88/cc-code (5 stars, last pushed yesterday), licensed MIT. It adds 16 tokens to every session and 1,505 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-13.

Related

Other skills, from other repositories

render-postgres

Sets up and optimizes Managed PostgreSQL on Render—connection strings (internal vs external), creation constraints, storage autoscaling, connection limits, high availability, read replicas, backups, and MCP inspection. Use when the user mentions Postgres, PostgreSQL, Render database, connection string, DATABASEURL…

Sarthib7/agentsmith · 83 tokens

cloud-sql-basics

This file generates or explains Cloud SQL resources. Use this file when the user asks to create a Cloud SQL instance or database for MySQL, PostgreSQL, or SQL Server. Cloud SQL manages third-party MySQL, PostgreSQL, and SQL Server instances as resources in Cloud SQL. For example, when Cloud SQL creates an open-source…

google/skills · 108 tokens

moai-platform-database-cloud

Cloud database platform specialist covering Neon (serverless PostgreSQL), Supabase (PostgreSQL 16 with real-time), and Firebase Firestore (NoSQL with offline sync). Use when choosing or setting up cloud databases.

modu-ai/moai-adk · 51 tokens

aws-rds

Manage Amazon RDS for fully managed relational databases. Provision MySQL, PostgreSQL, and Aurora instances with automated backups and patching. Configure read replicas for scaling, snapshots for recovery, and Aurora Serverless for variable workloads.

TerminalSkills/skills · 52 tokens

backup-recovery

Design and verify backups and restoration for owned databases, files and application state. Use when preparing recovery, migrating data or testing backups; protect the source and prove restore into an isolated destination before calling recovery ready.

WrongStack/WrongStack · 45 tokens

aws-rds-spring-boot-integration

Provides patterns to configure AWS RDS (Aurora, MySQL, PostgreSQL) with Spring Boot applications. Configures HikariCP connection pools, implements read/write splitting, sets up IAM database authentication, enables SSL connections, and integrates with AWS Secrets Manager. Use when setting up RDS connections in Spring…

giuseppe-trisciuoglio/developer-kit · 83 tokens