
Vercel Optimize
SkillVercel 官方成本与性能优化技能:先采集线上指标、用量与项目配置,只排查指标指向的路由和文件,输出带文档依据的优化建议排序;支持 Next.js、SvelteKit 与 Nuxt。需要 Vercel CLI v53+ 登录并关联项目。
vercel-optimize
Optimize cost and performance for supported projects on Vercel.
This skill uses Vercel metrics to find high-impact improvements in your app. Every recommendation is backed by observed data, scoped code evidence, and version-aware docs.
Install
Install just this skill:
npx skills add vercel-labs/agent-skills --skill vercel-optimize
Manual install: copy skills/vercel-optimize into .agents/skills/vercel-optimize and reference SKILL.md from your project AGENTS.md.
Requirements
- Node.js 20+
- Vercel CLI with
vercel metrics,vercel usage,vercel contract, andvercel apisupport (npm i -g vercel@latest). The skill enforces v53+ as its compatibility floor. - Authenticated Vercel CLI session (
vercel login) - Linked Vercel project directory (
vercel link) for route metrics.VERCEL_PROJECT_IDcan resolve project config, but it does not replace directory linkage forvercel metrics. The project must resolve to a CLI-safe team or personal scope sovercel metrics,vercel usage, andvercel contractall run against the same account. - Observability Plus for metric-backed route ranking
- Code-backed recommendation coverage is strongest for Next.js and SvelteKit, supported for Nuxt route mapping with generic checks, and limited for Astro. Hono, Remix, and unknown frameworks pause up front.
If route-level metrics are unavailable, the skill pauses before scanner-only mode. Scanner-only can catch traffic-independent code issues, but it cannot rank hot routes or prove cost impact.
Use
From the Vercel project directory, ask your coding agent:
optimize this Vercel project
The agent should collect metrics first. If it starts by reading source files or guessing from vercel.json, the skill was not loaded correctly.
Roadmap
| Attribute | Status |
|---|---|
| Route-level Vercel Function invocations, duration, TTFB, and cold starts | Supported |
| Vercel Function CPU, memory, and GB-hours | Supported |
| Request volume, cache hit rate, HTTP status, and method distribution | Supported |
| Fast Data Transfer and bot traffic patterns | Supported |
| ISR reads, writes, and over-revalidation | Supported |
| Routing Middleware volume and duration | Supported |
| External API latency, volume, and transfer bytes | Supported |
| Core Web Vitals from Speed Insights | Supported |
| Image Optimization usage, source hosts, and source bytes | Supported |
| Build Minutes fan-out | Supported |
| Usage spikes by billing service | Supported |
| Bot Protection and BotID configuration | Supported |
| Fluid Compute configuration and compute signals | Supported |
| Region pinning and project configuration mismatches | Supported |
| Observability Events cost attribution | Supported |
| Route-to-file recommendations for Next.js and SvelteKit | Supported |
| Nuxt route mapping with generic/platform checks | Supported |
| Generic route mapping and platform checks for Astro | Supported |
| Hono route-to-file mapping | Planned |
| Remix route-to-file mapping | Planned |
| AI Gateway usage and cost optimization | Planned |
| Sandbox usage and cost optimization | Planned |
| Blob, Edge Config, Runtime Cache, Workflows, Queues, Flags, and Microfrontends billing dimensions | Planned |
What You Get
- Ranked recommendations tied to observed Vercel metrics
- Specific route and file references when source changes are justified
- Before/after code for ready recommendations
- Citations from a curated, version-aware documentation allow-list
- Held-back findings when evidence is real but not strong enough for a recommendation
- A concise final message plus a full Markdown report
Trust Model
- Metrics come first. Code investigation starts only after signals are collected.
- Gates are deterministic JavaScript thresholds. No LLM decides whether a metric qualifies.
- Citations are allow-listed. Unknown URLs and version-mismatched framework docs are stripped.
- Project config contradictions are rejected. For example, the verifier blocks "enable Fluid Compute" when Fluid Compute is already on.
- Cost impact uses magnitude framing, not invented exact savings.
Contributing
See CONTRIBUTING.md. New gates, scanners, playbooks, citations, and sanitizers need fixture coverage in packages/vercel-optimize-tests.
License
MIT
相關資源

Vercel Plugin
PluginVercel 官方插件:内置 Vercel 生态知识图谱、数十个技能、部署与性能等专家子代理,以及部署、环境变量、项目状态命令,覆盖 Next.js、AI SDK、存储与 CI/CD。需 Node.js 18+ 与 Bun,默认开启遥测(可关闭)。
vercel/vercel-plugin308
Vercel React Best Practices
SkillVercel 工程团队整理的 React 与 Next.js 性能规范,70 条规则按影响排序,涵盖消除请求瀑布、包体积、服务端性能与重复渲染,供编写、评审与重构时对照。Vercel 官方维护。
vercel-labs/agent-skills32.6k
Next.js Skills
PluginNext.js 官方插件,随 vercel/next.js 仓库发布:引导启用和优化 Cache Components 与 Partial Prefetching,并结合 Next.js MCP 与 agent-browser 在运行中的 dev server 上验证改动。
vercel/next.js143k
Deploy to Vercel
SkillVercel 官方部署技能:先检查 git 远程、项目关联与 CLI 登录状态,再用 git 推送或 vercel deploy 发布预览(默认)或生产环境;沙箱里无法登录时可生成可认领的预览链接。
vercel-labs/agent-skills32.5k
Vercel CLI
CLIVercel 官方命令行,一条命令把前端与全栈项目部署上线,并管理预览环境、环境变量、域名与日志。官方维护,需要 Vercel 账号(有免费档)。
vercel/vercel16.4k
next-dev-loop
Skill改完代码后让 agent 结合 /_next/mcp 与 agent-browser 在运行中的 Next.js 应用里核对路由、报错与页面表现,确认改动真正生效。Next.js 官方维护,需要 Next.js 16.3+(Turbopack)与 agent-browser。
vercel/next.js143k