vercel-optimize

vercel-optimize is a cursor rule for Cursor from kok-o/koko-contextos-agents. It costs 13 tokens per session (857 once invoked), scanned A, original, MIT.

A read-only performance and cost review for applications deployed on Vercel, a hosting platform for web apps. It uses production usage data and code scanning to produce ranked recommendations for supported web frameworks.

In plain words
What is it for?
Use it when reviewing Vercel bills, function usage, data transfer, build time, route speed, runtime choices, caching, or Core Web Vitals.
Why use it?
It helps investigate high hosting costs, slow serverless requests, cold starts, caching opportunities, and declining web performance.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node scripts/collect-signals.mjs [projectId] > "$RUN_DIR/vercel-signals.json".

Good fit Use it when reviewing Vercel bills, function usage, data transfer, build time, route speed, runtime choices, caching, or Core Web Vitals.

Compare 6 cursor rules from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/kok-o/koko-contextos-agents
agentmods
npx agentmods add rules/kok-o/koko-contextos-agents/vercel-optimize

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for vercel-optimize

README.md
[![agentmods](https://agentmods.dev/badge/rules/kok-o/koko-contextos-agents/vercel-optimize/github.svg)](https://agentmods.dev/rules/kok-o/koko-contextos-agents/vercel-optimize)
Your own site
<a href="https://agentmods.dev/rules/kok-o/koko-contextos-agents/vercel-optimize"><img src="https://agentmods.dev/badge/rules/kok-o/koko-contextos-agents/vercel-optimize/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for vercel-optimize

Your own site · 80×15
<a href="https://agentmods.dev/rules/kok-o/koko-contextos-agents/vercel-optimize"><img src="https://agentmods.dev/badge/rules/kok-o/koko-contextos-agents/vercel-optimize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 857 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00013 $0.00857
Opus 5 $0.00006 $0.00428
Sonnet 5 $0.00003 $0.00171
Haiku 4.5 $0.00001 $0.00086

Measured 4d ago against content hash 22596bfe1eb9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

vercel-optimize scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/vercel-optimize.mdc · 86 lines

How it starts

The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Skill: vercel-optimize

Vercel Optimize

Overview

Observability-first Vercel performance and cost reduction optimization skill. Evaluates deployed Next.js, SvelteKit, Nuxt, and Astro projects using production telemetry signals (signals.json), deterministic candidate gating, and code scanning to deliver ranked, verified architectural recommendations.

When to Use

  • When tasked with reducing Vercel bills, Function Invocations, Fast Data Transfer, or Build Minutes.
  • When diagnosing slow serverless routes, cold starts, or Edge vs Node runtime mismatches.
  • When evaluating caching opportunities (stale-while-revalidate, ISR, CDN edge caching) or Core Web Vitals degradation.

Rules & Patterns

1. Prerequisites & Framework Support

  • Vercel CLI v53+ with vercel metrics, vercel usage, vercel contract, and vercel api.
  • Authenticated CLI session (vercel login) and linked app directory (vercel link).
  • Framework support: Next.js App Router (Full), Pages Router (Supported), SvelteKit (Supported), Nuxt (Supported), Astro (Limited).
  • Security rule: Never put auth tokens in shell commands (VERCEL_TOKEN=... is banned in chat/logs).

2. Core Doctrine & Gating Pipeline

  • Metrics First: Recommendations start from Vercel production signals (14-day window), not repo-wide grep.
  • Deterministic Gates: scripts/gate-investigations.mjs selects code-scope and platform-scope candidates.
  • Candidate-Bound Scope: Inspect only files named by a candidate or a route-local import chain.
  • Version-Aware Citations: Use only verified citations matching the target framework version.
  • Specific Cache Policies: When recommending caching, state the exact cache policy and headers; keep auth-sensitive and error responses dynamic.

3. Recommendation Rules

  • Every recommendation must trace to a launched candidate and include observed metric evidence.
  • Cite verified files with line numbers when code changes are proposed.
  • Use precise observed performance numbers; avoid customer-facing speculative $N savings formulas.
  • Do not recommend duration reductions for Vercel Workflow runtime endpoints (/.well-known/workflow/v1/*).

Read the full file on GitHub · 86 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 86 lines · 13 tokens per session scan A 22596bfe1eb9

Subscribe to this mod's changes

vercel-optimize is a cursor rule published in the GitHub repository kok-o/koko-contextos-agents (2 stars, last pushed 5d ago), licensed MIT. It adds 13 tokens to every session and 857 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.