Vercel cost and performance tuning

Audits a deployed Vercel project for cost and performance: collects metrics first, picks candidates by fixed thresholds, inspects only flagged routes and returns verified, cited recommendations. Use when cutting a Vercel bill or fixing slow routes.

DevOpsPack: Vercel skillslinkvercel-optimize
Author
Source
vercel-labs/agent-skills/skills/vercel-optimize @ 1a2c79d
License
none stated

About this skill

What it does

The skill audits a deployed Vercel project for cost and performance and reads metrics before any code. Node scripts in scripts/ do the work:

  1. collect-signals.mjs pulls 14 days of metrics, usage and project settings through the Vercel CLI; scan-codebase.mjs runs static scanners (force-dynamic, missing cache headers, production source maps and more).
  2. gate-investigations.mjs applies fixed thresholds, not model judgement: slow or uncached routes, cold starts, errors, ISR over-revalidation, heavy middleware, poor Core Web Vitals, bot traffic.
  3. deep-dive.mjs and reconcile-candidates.mjs drop what the data disproves; prepare-investigation-brief.mjs writes a brief per candidate, and from three briefs up each goes to a subagent that reads only the files named.
  4. verify-and-regen.mjs checks cited files and citations and reruns failures; render-report.mjs writes a Markdown report and a final message.

Citations come only from the allow-list references/docs-library.json and must fit the framework version. Cost is given as magnitude, never in dollars. Skipped candidates are listed with the reason. references/ and lib/ hold the doctrine, playbooks, gates and scanners.

When to use it, and when not

Use it for a Vercel bill to cut, slow or expensive routes, caching, Function Invocations, Build Minutes or Fast Data Transfer, on a project with real traffic. Next.js and SvelteKit get the deepest coverage, Nuxt is supported, Astro limited; for Hono, Remix or an unknown framework the agent stops and asks.

It is not for projects outside Vercel, sites without traffic or general code review. Without Observability Plus the agent stops and offers a limited scanner-only run.

How to run it

We do not copy this skill: SKILL.md names no licence, and although its README says MIT, the repository ships no licence text. Install it from Vercel's repository with the button to the source: npx skills add vercel-labs/agent-skills --skill vercel-optimize, or copy the folder to .agents/skills/vercel-optimize and point to it from AGENTS.md. It needs Node.js 20+, Vercel CLI v53+, vercel login, a folder linked with vercel link, and jq.

  • Claude Code: /vercel-optimize, or ask for the skill by name.
  • Codex: $vercel-optimize.
  • Cursor: type / in the Agent chat and pick vercel-optimize.

Example: /vercel-optimize Function Invocations doubled this month. Find which routes drive it.

How it differs from similar skills

Web performance audit traces one page through Chrome DevTools MCP and sees no billing. Performance optimization runs a measure-fix-remeasure loop on any stack. React and Next.js performance rules applies rules without metrics; this skill can cite them by name. Only this one starts from Vercel usage data.

Install

This skill is not copied to the catalog: the author's repository has no licence text. Install it from there.

Open the source

Connect through AnyModel API

This skill runs on whatever model your agent uses. Point Claude Code, Codex or Cursor at AnyModel to run it on Claude, GPT, Gemini and more with one key — pay per token, no subscription.

More from the pack Vercel skills

React and Next.js performance rules

Gives the agent Vercel's 70 React and Next.js performance rules, ranked by impact: request waterfalls, bundle size, server work, re-renders, rendering. Use when writing, refactoring or reviewing React or Next.js code for speed.

React composition patterns

Applies eight Vercel rules that replace boolean props with compound components, provider-held state and explicit variants, plus React 19 ref and use() changes. Use when a component has too many flags or when designing a component library.

React Native best practices

Applies Vercel's React Native and Expo rules: virtualized lists, transform and opacity animations, native navigators, expo-image, state, monorepo setup. Use when building or speeding up a mobile app or reviewing React Native code.

React view transitions

Implements animations with React's View Transition API: shared element morphs, Suspense reveals, list reorder and directional route slides, with CSS recipes and Next.js integration. Use when adding page or state transitions to a React or Next.js app.

Deploy to Vercel, Vercel Labs

Deploys a project to Vercel as a preview, choosing git push, CLI deploy, linking first or a temporary deploy without an account by the project's state, and returns the URL. Use when asked to deploy an app and get a link.

Vercel CLI with tokens

Runs the Vercel CLI from an access token instead of a browser login: finds the token, deploys previews, manages env vars, logs and domains, keeps the token out of command flags. Use when working with Vercel from a non-interactive shell.

Web Interface Guidelines review

Reviews UI code against Vercel's Web Interface Guidelines, fetched fresh on each run, and lists findings as file:line: accessibility, focus, forms, animation, typography, images, performance. Use when checking components or pages before a pull request.

Writing Guidelines review

Reviews docs and prose against Vercel's writing handbook, fetched fresh on each run, and lists findings as file:line: voice, structure, headings, code samples, units, typography. Use when checking English docs before publishing.