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.
vercel-optimize- Author
- Vercel
- 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:
collect-signals.mjspulls 14 days of metrics, usage and project settings through the Vercel CLI;scan-codebase.mjsruns static scanners (force-dynamic, missing cache headers, production source maps and more).gate-investigations.mjsapplies fixed thresholds, not model judgement: slow or uncached routes, cold starts, errors, ISR over-revalidation, heavy middleware, poor Core Web Vitals, bot traffic.deep-dive.mjsandreconcile-candidates.mjsdrop what the data disproves;prepare-investigation-brief.mjswrites a brief per candidate, and from three briefs up each goes to a subagent that reads only the files named.verify-and-regen.mjschecks cited files and citations and reruns failures;render-report.mjswrites 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 pickvercel-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.
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.
AnyModel