Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计异常

vercel-deployVercel 部署

Agent Skill

用于辅助云资源、部署、容器、基础设施和运维自动化任务。它适合让 Agent 检查配置、整理部署步骤、分析资源状态、生成排障思路或辅助云服务接入。使用时需要明确目标环境、账号权限、区域和资源组,区分本地测试与生产操作;涉及删除资源、重启服务、修改网络或权限配置时,应先确认影响范围。

总安装

706

周安装

30

GitHub Stars

25

下载量

247
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:vercel-deploy(Vercel 部署)
来源仓库:https://github.com/oimiragieo/agent-studio
仓库路径:skills/vercel-deploy
安装命令:
npx skills add https://github.com/oimiragieo/agent-studio --skill vercel-deploy
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/oimiragieo/agent-studio --skill vercel-deploy

简介

用于辅助云资源、部署、容器、基础设施和运维自动化任务。

  • 适合检查配置、整理部署步骤、分析资源状态或生成排障思路。
  • 使用时需明确目标环境、账号权限、区域和资源组,区分本地测试与生产操作。
  • 涉及删除资源、重启服务、修改网络或权限配置时应先确认影响范围。
  • 安装前建议确认权限范围和维护状态,避免误操作生产系统。

SKILL.md

Vercel Deploy

Zero-auth deployment to Vercel with automatic framework detection. Deploy any web application with a single command and receive preview URLs, claim URLs, and deployment metadata.

When to Apply

Use this skill when:

  • Deploying a web application to Vercel for preview or production
  • Setting up a deployment pipeline for a new project
  • Creating preview deployments for pull request review
  • Testing production builds in a live environment
  • Demonstrating a prototype or proof of concept

Supported Frameworks

Vercel auto-detects and configures builds for these frameworks:

FrameworkDetectionBuild Command
Next.jsnext.config.*next build
Vitevite.config.*vite build
Remixremix.config.*remix build
SvelteKitsvelte.config.*vite build
Astroastro.config.*astro build
Nuxtnuxt.config.*nuxt build
Gatsbygatsby-config.*gatsby build
Angularangular.jsonng build
Vue CLIvue.config.*vue-cli-service build
Create React Appreact-scripts in depsreact-scripts build
Emberember-cli-build.jsember build
Hugoconfig.toml / hugo.tomlhugo
Jekyll_config.ymljekyll build
Eleventy.eleventy.jseleventy
Docusaurusdocusaurus.config.*docusaurus build
Static HTMLindex.html at rootNone

Deployment Workflow

Step 1: Prerequisites

Ensure the Vercel CLI is installed:

# Install globally
npm install -g vercel

# Or use npx (no install needed)
npx vercel

Step 2: Project Setup (First Time Only)

For new projects not yet linked to Vercel:

# Interactive setup -- creates .vercel/project.json
vercel link

# Or create a new project
vercel --yes

Step 3: Deploy

Preview Deployment (Default)

# Deploy to preview environment
vercel

# Output:
# Vercel CLI 34.x.x
# Linked to username/project-name
# Inspect: https://vercel.com/username/project-name/abcdef
# Preview: https://project-name-abc123.vercel.app

Production Deployment

# Deploy to production
vercel --prod

# Output includes production URL:
# Production: https://project-name.vercel.app

Zero-Auth Deployment (Agent Mode)

For automated deployments without authentication prompts:

# Using VERCEL_TOKEN environment variable
VERCEL_TOKEN=your-token vercel --yes --token=$VERCEL_TOKEN

# Or with npx for zero-install
VERCEL_TOKEN=your-token npx vercel --yes --token=$VERCEL_TOKEN

Step 4: Deployment Output

Successful deployments return JSON-compatible metadata:

{
  "url": "https://project-name-abc123.vercel.app",
  "inspectUrl": "https://vercel.com/team/project/deployment-id",
  "projectId": "prj_abc123",
  "deploymentId": "dpl_abc123",
  "readyState": "READY"
}

Use --json flag for machine-readable output:

vercel --json

Step 5: Post-Deployment Verification

# Check deployment status
vercel inspect <deployment-url>

# View deployment logs
vercel logs <deployment-url>

# List recent deployments
vercel list

Configuration Options

Environment Variables

# Set environment variables for deployment
vercel env add VARIABLE_NAME production
vercel env add VARIABLE_NAME preview
vercel env add VARIABLE_NAME development

# Or pass inline
vercel -e KEY=value -e KEY2=value2

Build Configuration

Override auto-detected settings in vercel.json:

{
  "buildCommand": "npm run build",
  "outputDirectory": "dist",
  "installCommand": "npm install",
  "framework": "vite",
  "rewrites": [{ "source": "/(.*)", "destination": "/index.html" }]
}

Custom Domains

# Add a custom domain
vercel domains add example.com

# Assign domain to project
vercel alias <deployment-url> example.com

Framework-Specific Patterns

Next.js

{
  "framework": "nextjs",
  "buildCommand": "next build",
  "outputDirectory": ".next"
}

Next.js deployments automatically enable:

  • Edge Runtime for middleware
  • ISR (Incremental Static Regeneration)
  • Image Optimization via next/image
  • Server Actions

Vite / React SPA

{
  "framework": "vite",
  "buildCommand": "vite build",
  "outputDirectory": "dist",
  "rewrites": [{ "source": "/(.*)", "destination": "/index.html" }]
}

SvelteKit

{
  "framework": "sveltekit",
  "buildCommand": "vite build",
  "outputDirectory": ".svelte-kit/output"
}

SvelteKit uses the @sveltejs/adapter-vercel adapter for optimal deployment.

Deployment Strategies

Preview per Pull Request

Configure GitHub integration for automatic preview deployments:

  1. Connect repository in Vercel dashboard
  2. Every PR gets a unique preview URL
  3. Comments added to PR with preview link
  4. Preview is torn down when PR is closed

Staged Rollouts

# Deploy to staging first
vercel --env ENVIRONMENT=staging

# Promote to production after validation
vercel promote <deployment-url>

Rollback

# List recent deployments
vercel list

# Rollback to a previous deployment
vercel rollback <deployment-url>

Troubleshooting

Build Fails

  1. Check build logs: vercel logs <url>
  2. Verify buildCommand matches local build
  3. Check environment variables are set for the target environment
  4. Ensure Node.js version matches (use engines in package.json)

404 on Client-Side Routes

Add rewrites for SPA frameworks:

{
  "rewrites": [{ "source": "/(.*)", "destination": "/index.html" }]
}

Large Bundle Warnings

  1. Enable tree-shaking in bundler config
  2. Use dynamic imports for heavy dependencies
  3. Check Vercel's bundle analysis: vercel inspect --logs

Timeout Issues

  • Serverless functions: Default 10s timeout (configurable up to 300s on Pro)
  • Edge functions: 25ms CPU time limit (wall-clock can be longer with I/O)
  • Static generation: 45s default timeout
{
  "functions": {
    "api/heavy-route.ts": {
      "maxDuration": 60
    }
  }
}

Security Considerations

  • Never commit VERCEL_TOKEN to version control
  • Use environment variables for secrets (not hardcoded)
  • Enable Vercel's DDoS protection for production
  • Use vercel env pull to sync environment variables locally
  • Review deployment protection settings for preview URLs

References

Iron Laws

  1. ALWAYS test the build locally before deploying to ensure the deployment will succeed
  2. NEVER deploy to production without first creating and validating a preview deployment
  3. ALWAYS verify environment variables are configured in the Vercel project before deploying
  4. NEVER store sensitive secrets in deployment commands or public URLs
  5. ALWAYS check the deployment logs immediately after deployment to confirm the build succeeded

Anti-Patterns

Anti-PatternWhy It FailsCorrect Approach
Deploying without local build testBuild fails in Vercel, wasted deployment attemptRun build locally before vercel deploy
Skipping preview before productionRegressions reach users before detectionAlways validate preview URL first
Hardcoded env vars in deploy commandSecrets exposed in shell history and logsConfigure env vars in Vercel project settings
Ignoring post-deploy build logsSilent failures go undetectedAlways check logs after deployment
No framework detection verificationWrong settings cause build failuresVerify auto-detected framework in project config

Framework Detection Patterns

Vercel CLI auto-detects frameworks by checking project files in this priority order:

FrameworkDetection FileBuild CommandOutput Dir
Next.jsnext.config.*next build.next
Remixremix.config.*remix buildbuild
SvelteKitsvelte.config.*vite buildbuild
Astroastro.config.*astro builddist
Nuxtnuxt.config.*nuxt build.output
Vitevite.config.*vite builddist
Gatsbygatsby-config.*gatsby buildpublic
Angularangular.jsonng builddist
Vue CLIvue.config.*vue-cli-service builddist
Create React Appreact-scripts in pkgreact-scripts buildbuild
Docusaurusdocusaurus.config.*docusaurus buildbuild
Eleventy.eleventy.jseleventy_site
Hugoconfig.toml (Hugo)hugopublic
Jekyll_config.yml (Jekyll)jekyll build_site
Static HTMLindex.html onlynone.

When auto-detection fails, specify framework explicitly:

vercel --build-env FRAMEWORK_PRESET=nextjs

Environment Variable Management

Setting Environment Variables

# Add env var (prompts for value)
vercel env add MY_VAR production

# Add from .env file
vercel env pull .env.local

# List all env vars
vercel env ls

# Remove env var
vercel env rm MY_VAR production

Environment Scopes

ScopeWhen AppliedUse For
productionProduction deploys onlyAPI keys, secrets
previewPreview deploys (PRs)Staging configs
developmentvercel dev onlyLocal development

Monorepo Configuration

For pnpm/npm/yarn workspaces:

{
  "buildCommand": "cd ../.. && pnpm build --filter=my-app",
  "installCommand": "pnpm install --filter=my-app...",
  "rootDirectory": "packages/my-app"
}

Set root directory in Vercel dashboard or vercel.json:

{
  "framework": "nextjs",
  "buildCommand": "pnpm turbo build --filter=web",
  "outputDirectory": "apps/web/.next"
}

Local Development

vercel dev — runs your project locally with Vercel's edge network simulation

  • Supports: serverless functions, edge functions, environment variables
  • Port: defaults to 3000, use vercel dev --listen 3001 for custom port
  • Hot reload: automatic for Next.js, SvelteKit, Astro, Nuxt
vercel dev                    # Start local dev server on port 3000
vercel dev --listen 3001      # Custom port

vercel.json Configuration Patterns

{
  "rewrites": [{ "source": "/api/(.*)", "destination": "/api/index" }],
  "redirects": [{ "source": "/old", "destination": "/new", "permanent": true }],
  "headers": [{ "source": "/(.*)", "headers": [{ "key": "X-Frame-Options", "value": "DENY" }] }],
  "functions": { "api/heavy.js": { "memory": 3009, "maxDuration": 60 } },
  "crons": [{ "path": "/api/cron", "schedule": "0 * * * *" }]
}

Team & Project Config

vercel teams ls                 # List teams
vercel switch <team-slug>       # Switch active team
vercel link                     # Link local dir to Vercel project
vercel project ls               # List projects in current team

Memory Protocol (MANDATORY)

Before starting: Read .claude/context/memory/learnings.md

After completing:

  • New pattern -> .claude/context/memory/learnings.md
  • Issue found -> .claude/context/memory/issues.md
  • Decision made -> .claude/context/memory/decisions.md

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.56%
按下载量换算85

Claude

27.42%
按下载量换算68

Cursor

18.91%
按下载量换算47

Gemini CLI

9.8%
按下载量换算24

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills