vercel-optimize
Use for Vercel cost and performance optimization on deployed projects, especially Next.js, SvelteKit, Nuxt, and limited Astro apps.
Install / Use
npx skills add vercel-labs/agent-skills --skill vercel-optimizeInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
OperationsSupported Platforms
Tags
Our assessment of vercel-optimize
vercel-optimize scores 90/100 on our quality scale, 131st of 393 Operations skills we index (top 34%).
Its SKILL.md is 17 KB long, well organised into 19 sections with 16 code examples: a thorough specification that gives an agent plenty to work with.
With 31,498 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 30 days ago, so vercel-optimize is actively maintained.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
vercel-optimize compared with similar skills
All 4 of these similar skills score higher than vercel-optimize; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| vercel-optimize (this skill)by vercel-labs | 90 | 31.5k | 30d ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 5d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 5d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 130.2k | 6d ago | SKILL.md |
| ui-ux-pro-maxby nextlevelbuilder | 100 | 130.2k | 6d ago | SKILL.md |
Frequently asked questions
- How do I install vercel-optimize?
- Run
npx skills add vercel-labs/agent-skills --skill vercel-optimize. The install tabs above show the steps for each supported agent. - Which AI agents does vercel-optimize work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is vercel-optimize safe to use?
- It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is vercel-optimize still maintained?
- The repository was last updated 30 days ago, so vercel-optimize is actively maintained.
Skill content
View source on GitHubname: vercel-optimize description: "Use for Vercel cost and performance optimization on deployed projects, especially Next.js, SvelteKit, Nuxt, and limited Astro apps. Collect Vercel metrics, usage, project config, and code scan results first; investigate only metric-backed candidates; produce ranked recommendations grounded in verified files and version-aware Vercel/framework docs. Trigger for Vercel bill reduction, slow or expensive routes, caching opportunities, Function Invocations, Build Minutes, Fast Data Transfer, Core Web Vitals, Bot Management, Fluid compute, or cost breakdown requests." metadata: version: "1.2.0"
Vercel Optimize
Run an observability-first Vercel optimization audit. Do not inspect source files until signals.json exists and a deterministic gate points to a route, file, or project setting.
Core doctrine: read references/doctrine.md if any rule is unclear.
- Metrics first. Recommendations start from Vercel production signals, not repo-wide grep.
- Deterministic gates.
scripts/gate-investigations.mjsdecides what deserves investigation. - Candidate-bound scope. Read only files named by a candidate or a route-local import chain.
- Version-aware citations. Use only
references/docs-library.json; invalid or version-mismatched citations are stripped. - Customer copy. Read references/voice.md before writing report text or chat output.
Prerequisites
- Vercel CLI v53+ with
vercel metrics,vercel usage,vercel contract, andvercel api. - Authenticated CLI session:
vercel login. - Linked app directory:
vercel link.VERCEL_PROJECT_IDcan help resolve project config, butvercel metricsstill requires directory linkage. The link or environment must include the intended project org/team/user scope so the collector can resolve a CLI-safe--scopeand keepvercel metrics,vercel usage, andvercel contracton the same account. - Node.js 20+.
- Observability Plus for route-level metric-backed recommendations.
Never put auth tokens in shell commands. Do not type VERCEL_TOKEN=..., --token ..., or Authorization: Bearer ... into commands that may be echoed in chat.
Framework Support
The preflight reads package.json and sets expectations before metric fan-out.
| Framework | Status | Notes |
|---|---|---|
| Next.js App Router | supported | strongest route mapping, scanners, playbooks, citations |
| Next.js Pages Router | supported | scoped to Pages Router idioms when detected |
| SvelteKit | supported | route mapping for src/routes files and SvelteKit scanner |
| Nuxt | supported | route mapping plus generic/platform checks; fewer framework-specific recs |
| Astro | limited | route mapping plus generic checks; fewer framework-specific recs |
| Hono / Remix / unknown | blocked by default | continue only if the user accepts a limited platform/code-only audit |
If unsupported, stop and ask before scanning or gating:
This project uses <framework>. Vercel Optimize supports metric-backed code recommendations for Next.js, SvelteKit, and Nuxt. Astro support is limited. For <framework>, I can still run a limited platform/scanner audit, but route-level Vercel metrics may not map back to source files.
Do you want me to continue with the limited audit, or stop here?
If the user continues, rerun collection with --continue-unsupported-framework.
Run Directory
Use a fresh run directory for every audit. Do not reuse briefs, sub-agent outputs, or reports across runs.
RUN_DIR="$(mktemp -d -t vercel-optimize-XXXXXX)"
Pipeline
1. Collect, scan, and merge signals
Run from the linked app directory or pass --cwd where a script supports it. Keep stdout JSON separate from stderr logs. Do not combine streams.
node scripts/collect-signals.mjs [projectId] > "$RUN_DIR/vercel-signals.json" 2> "$RUN_DIR/collect.stderr"
node -e 'JSON.parse(require("fs").readFileSync(process.argv[1], "utf8"))' "$RUN_DIR/vercel-signals.json"
node scripts/scan-codebase.mjs <repo-root> > "$RUN_DIR/codebase.json"
node scripts/merge-signals.mjs "$RUN_DIR/vercel-signals.json" "$RUN_DIR/codebase.json" --out "$RUN_DIR/signals.json"
Collection details, schemas, metric IDs, and degradation behavior live in references/data-collection.md. The metric registry is lib/queries.mjs; keep all queries on the shared 14-day window.
collect-signals.mjs resolves the linked project owner to commandScope.cliScope and verifies that the resolved account can read the resolved project before it checks Observability Plus. Downstream scripts reuse that scope for every Vercel CLI command that accepts --scope. Do not run vercel usage, vercel metrics, or vercel contract manually without the same scope; unscoped usage can report the user's personal organization while route metrics come from the team project.
If project or scope resolution is ambiguous, stop and ask the user which Vercel project and team/personal scope they want audited. Do not infer the intended scope from the current vercel whoami team, and do not proceed with metrics, usage, or contract collection until the link, an exact project match in .vercel/repo.json, or VERCEL_PROJECT_ID + VERCEL_ORG_ID identifies the intended account.
Use this prompt for PROJECT_SCOPE_UNRESOLVED, SCOPE_UNRESOLVED, or PROJECT_SCOPE_MISMATCH:
I can't safely identify the Vercel project and account for this audit yet.
Please confirm the Vercel project name or ID and the team slug/name, or tell me it's under your personal account. Once confirmed, I'll relink or rerun collection against that exact scope before checking metrics.
1.1 Stop on blockers
Check blockers before gating:
jq '{frameworkSupportBlocker, observabilityPlus, observabilityPlusUsable, observabilityPlusBlocker, observabilityPlusBlockerDetail}' "$RUN_DIR/signals.json"
Required actions:
frameworkSupportBlocker === "unsupported_framework": use the unsupported-framework prompt above.PROJECT_SCOPE_UNRESOLVED,SCOPE_UNRESOLVED, orPROJECT_SCOPE_MISMATCH: stop and ask which Vercel project and team/personal scope the user wants audited. For team projects, rerun aftervercel link --yes --project <project-name-or-id> --team <team-slug>; for personal projects, rerun after linking under the intended user account or after setting bothVERCEL_PROJECT_IDandVERCEL_ORG_ID.observabilityPlusBlocker === null: continue.no_traffic: tell the user route metrics are sparse; continue only if they accept limited output.payment_requiredorno_oplus_probe: render references/observability-plus.md verbatim and ask.project_disabled: tell the user to enable Observability Plus for the project or accept a limited audit.daily_quota_exceeded: stop and tell the user the Observability query quota is exhausted; retry after the next UTC midnight reset, or ask whether to continue with a limited code-only audit.not_linked: link the app directory, then rerun Step 1. If app path and project are known:
vercel link --yes --project <project-name-or-id> --cwd <app-dir>
# add --team <team-id-or-slug> when known
forbiddenorproject_not_found: fix auth/team scope. Do not pitch Observability Plus.all_failed_other: show the raw error code and ask whether to continue in limited code-only mode.
Do not silently fall back to code-only mode. If the user accepts a limited audit, rerun collection with:
node scripts/collect-signals.mjs [projectId] --continue-without-observability > "$RUN_DIR/vercel-signals.json" 2> "$RUN_DIR/collect.stderr"
Then scan and merge again.
2. Gate candidates
node scripts/gate-investigations.mjs "$RUN_DIR/signals.json" > "$RUN_DIR/gate.json"
Output shape:
toLaunch: code-scope candidates to investigate.platform: project/account-scope recommendations.gated: skipped, covered, or disqualified candidates that must still appear in the report.budget: candidate budget and selection mode.
Default budget is 6 code-scope candidates with a diversity guardrail. To expand:
node scripts/gate-investigations.mjs "$RUN_DIR/signals.json" --max-candidates 12 > "$RUN_DIR/gate.json"
node scripts/gate-investigations.mjs "$RUN_DIR/signals.json" --max-candidates all > "$RUN_DIR/gate.json"
Generated candidate docs: references/candidates.md.
2.1 Ask about audit scope when needed
Before deep-dive, run:
node scripts/budget-summary.mjs "$RUN_DIR/gate.json" --format json > "$RUN_DIR/budget-summary.json"
If shouldAsk is false, continue.
If shouldAsk is true:
- Print
exactChatMessage.bodyexactly as returned. Do not summarize, truncate, reorder, or rewrite it. - Then ask
questionTextusingquestionPayloadwhen the host supports structured questions. - If the user chooses a different number, rerun the gate with
--max-candidates <choice>.
Never put the long preview inside the question field. The preview and the question are separate surfaces.
2.2 Deep-dive and reconcile
node scripts/deep-dive.mjs "$RUN_DIR/signals.json" "$RUN_DIR/gate.json" --cwd <project-dir> > "$RUN_DIR/investigation-evidence.json"
node scripts/reconcile-candidates.mjs "$RUN_DIR/investigation-evidence.json" \
--gate "$RUN_DIR/gate.json" \
--out "$RUN_DIR/reconciled-investigation.json"
--cwd must be the linked project directory so deep-dive.mjs can verify the same project link and reuse signals.json.commandScope.cliScope for any follow-up vercel metrics calls.
Reconciliation deterministically converts disproven candidates into observations before any source investigation:
metric_mismatcherror_stormdeployment_regressionscanner_only_no_metric
2.3 Generate briefs and investigate
List the work:
node scripts/prepare-investigation-brief.mjs "$RUN_DIR/signals.json" "$RUN_DIR/reconciled-investigation.json" --list > "$RUN_DIR/briefs-manifest.json"
Generate one brief for every entry in briefs-manifest.json.briefs. The group can be toLaunch or platform; do not generate only toLaunch briefs.
mkdir -p "$RUN_DIR/briefs" "$RUN_DIR/sub-agent-outputs"
node scripts/prepare-investigation-brief.mjs "$RUN_DIR/signals.json" "$RUN_DIR/reconciled-investigation.json" \
--group <brief.group> --index <brief.index> --out "$RUN_DIR/briefs/<brief.group>-<brief.index>.md"
Use briefs-manifest.json.briefs[].label for visible worker names, for example Low cache-hit route on /docs/llm-digest/[...slug], not toLaunch-7.
Fan-out rule:
- 1-2 briefs: investigate inline.
- 3+ briefs: spawn one sub-agent per brief when the host supports it.
- Hosts without sub-agents: run inline serially.
Sub-agent contract:
- The brief is the whole prompt.
- Read only files listed in the brief, plus route-local imports when needed.
- Emit one JSON recommendation or one JSON no-change finding using references/recommendations.md.
- Do not cite URLs outside the provided citation subset.
- Do not recommend framework features unavailable in the detected version.
If a sub-agent reaches for repo-wide grep, the candidate is malformed; drop or abstain rather than widening scope.
2.4 Collect outputs
Save each raw investigation result in $RUN_DIR/sub-agent-outputs/, then collect:
node scripts/collect-sub-agent-outputs.mjs \
--manifest "$RUN_DIR/briefs-manifest.json" \
--out "$RUN_DIR/recommendations.json" \
"$RUN_DIR/sub-agent-outputs/"
The collector extracts JSON, prepends pre-resolved records, enforces manifest order, and fails on missing, duplicate, unknown, or mismatched candidateRef values.
3. Verify recommendations
node scripts/verify-and-regen.mjs "$RUN_DIR/recommendations.json" \
--signals "$RU
Truncated for display — read the full file on GitHub.
Related Skills
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
130.2kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
ui-ux-pro-max
130.2kUI/UX design intelligence for web, mobile, and desktop. This skill should be used when designing, building, reviewing, or fixing interfaces, including pages, components, design systems, accessibility, interaction, responsive layout, typography, color, charts, and stack-specific UI implementation.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
