Agent skill

Vercel Performance Tuning

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Optimize Vercel deployment performance with caching, bundle optimization, and cold start reduction.

MITAuto-check passedBackend & APIs

Install Vercel Performance Tuning

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill vercel-performance-tuning -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace vercel-performance-tuning --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/vercel-performance-tuning .claude/skills/vercel-performance-tuning && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
vercel-performance-tuning
GitHub stars
2.8k
Token cost
~2.1k tokens
SKILL.md length
387 words
Files
4 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Optimize Vercel deployment performance with caching, bundle optimization, and cold start reduction.

  • Works in 6 steps: Establish Performance Baseline → Configure Edge Caching → Incremental Static Regeneration (ISR) → …
  • Experiencing slow page loads
  • SKILL.md covers Overview, Prerequisites, Instructions and Performance Budget Reference, plus 5 more sections
  • Calls npx, vercel and jq; needs REVALIDATION_SECRET

What it does

Vercel Performance Tuning is an agent skill from jeremylongshore/tons-of-skills-marketplace. Optimize Vercel deployment performance with caching, bundle optimization, and cold start reduction. Use when experiencing slow page loads, optimizing Core Web Vitals, or reducing serverless function cold start times. Trigger with phrases like "vercel performance", "optimize vercel", "vercel latency", "vercel caching", "vercel slow", "vercel cold start".

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/caching-strategy.md`, `references/errors.md` and `references/examples.md`). Compatibility notes: Designed for Claude Code

It sits in Backend & APIs, covering Web performance, Caching and Serverless. It works with Vercel. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Experiencing slow page loads
  • Optimizing Core Web Vitals
  • Reducing serverless function cold start times
  • With phrases like vercel performance

Example prompts

  • “vercel performance”
  • “optimize vercel”
  • “vercel latency”
  • “/vercel-performance-tuning”

Requirements

  • Node.js
  • A credential in REVALIDATION_SECRET
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Bash(vercel:*), Bash(npx:*)

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Establish Performance Baseline
  2. Configure Edge Caching
  3. Incremental Static Regeneration (ISR)
  4. Reduce Cold Starts
  5. Bundle Size Optimization
  6. Image Optimization

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Bash(vercel:*)
    • Bash(npx:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx
    • vercel
    • jq

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • vercel.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • REVALIDATION_SECRET

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Vercel Performance Tuning loads about 2.1k tokens when it runs, and up to ~2.6k if it reads all its reference files. Until then it costs about 95 tokens; SKILL.md has 387 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~95
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 387 words, ~2,103 tokens.

Download SKILL.mdSave it as .claude/skills/vercel-performance-tuning/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
vercel-performance-tuning
description
Optimize Vercel deployment performance with caching, bundle optimization, and cold start reduction. Use when experiencing slow page loads, optimizing Core Web Vitals, or reducing serverless function cold start times. Trigger with phrases like "vercel performance", "optimize vercel", "vercel latency", "vercel caching", "vercel slow", "vercel cold start".
allowed-tools
Read, Write, Edit, Bash(vercel:*), Bash(npx:*)
compatibility
Designed for Claude Code
version
1.18.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, vercel, performance, caching, optimization

Vercel Performance Tuning

Overview

Optimize Vercel deployment performance across four levers: edge caching, bundle size reduction, serverless function cold start elimination, and Core Web Vitals improvement. Uses real Vercel cache headers, ISR, and Edge Functions for maximum performance.

Prerequisites

  • Vercel project deployed with accessible URL
  • Access to Vercel Analytics (dashboard)
  • Bundle analyzer available (@next/bundle-analyzer or similar)

Instructions

Step 1: Establish Performance Baseline
bash
# Check deployment size and function count
vercel inspect https://my-app.vercel.app

# Run Lighthouse via CLI
npx lighthouse https://my-app.vercel.app --output=json --quiet \
  | jq '{performance: .categories.performance.score, lcp: .audits["largest-contentful-paint"].numericValue, cls: .audits["cumulative-layout-shift"].numericValue}'

# Check bundle size (Next.js)
ANALYZE=true npx next build
# Opens bundle analyzer report in browser

Enable Vercel Analytics in the dashboard under Analytics tab for ongoing monitoring.

Step 2: Configure Edge Caching
typescript
// api/cached-data.ts — cache API responses at the edge
import type { VercelRequest, VercelResponse } from '@vercel/node';

export default function handler(req: VercelRequest, res: VercelResponse) {
  // Cache at Vercel edge for 60s, serve stale for 300s while revalidating
  res.setHeader('Cache-Control', 's-maxage=60, stale-while-revalidate=300');
  res.json({ data: fetchData(), cachedAt: new Date().toISOString() });
}
json
// vercel.json — cache static assets aggressively
{
  "headers": [
    {
      "source": "/static/(.*)",
      "headers": [
        { "key": "Cache-Control", "value": "public, max-age=31536000, immutable" }
      ]
    },
    {
      "source": "/api/public-data",
      "headers": [
        { "key": "Cache-Control", "value": "s-maxage=3600, stale-while-revalidate=86400" }
      ]
    }
  ]
}

Cache header reference:

HeaderEffect
s-maxage=NCache at Vercel edge for N seconds
stale-while-revalidate=NServe stale while revalidating in background
max-age=NCache in browser for N seconds
immutableNever revalidate (use with content-hashed filenames)
no-cacheAlways revalidate (edge still caches)
no-storeNever cache anywhere
Step 3: Incremental Static Regeneration (ISR)
typescript
// app/products/[id]/page.tsx (Next.js App Router)
export const revalidate = 60; // Revalidate every 60 seconds

export default async function ProductPage({ params }) {
  const product = await fetchProduct(params.id);
  return <ProductView product={product} />;
}

// Generate static pages at build time, regenerate on-demand
export async function generateStaticParams() {
  const products = await fetchTopProducts(100);
  return products.map(p => ({ id: p.id }));
}

On-demand revalidation via API route:

typescript
// api/revalidate.ts
import type { VercelRequest, VercelResponse } from '@vercel/node';

export default async function handler(req: VercelRequest, res: VercelResponse) {
  const secret = req.query.secret;
  if (secret !== process.env.REVALIDATION_SECRET) {
    return res.status(401).json({ error: 'Invalid secret' });
  }

  const path = req.query.path as string;
  await res.revalidate(path);
  res.json({ revalidated: true, path });
}
// Trigger: POST /api/revalidate?secret=xxx&path=/products/123
Step 4: Reduce Cold Starts
typescript
// Lazy initialization — don't import heavy modules at top level
// BAD: Cold start loads everything
import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient(); // Runs on every cold start

// GOOD: Lazy singleton — only connects when first used
let prisma: PrismaClient | null = null;
function getDb(): PrismaClient {
  if (!prisma) {
    prisma = new PrismaClient();
  }
  return prisma;
}

export default async function handler(req, res) {
  const users = await getDb().user.findMany();
  res.json(users);
}

Move latency-critical paths to Edge Functions (zero cold starts):

typescript
// api/fast.ts
export const config = { runtime: 'edge' };

export default function handler(request: Request) {
  return Response.json({ fast: true }); // No cold start, runs globally
}
Step 5: Bundle Size Optimization
javascript
// next.config.js — tree-shaking and optimization
module.exports = {
  experimental: {
    optimizePackageImports: ['lodash', '@mui/material', '@mui/icons-material'],
  },
  // Exclude server-only deps from client bundle
  webpack: (config, { isServer }) => {
    if (!isServer) {
      config.resolve.fallback = { fs: false, net: false, tls: false };
    }
    return config;
  },
};
bash
# Find large dependencies
npx depcheck
npx cost-of-modules

# Replace heavy libraries with lighter alternatives
# moment.js (300KB) → dayjs (2KB)
# lodash (72KB) → lodash-es with tree-shaking
# axios (29KB) → native fetch
Step 6: Image Optimization
typescript
// Use Vercel's built-in image optimization
import Image from 'next/image';

// Automatic: resizes, converts to WebP/AVIF, caches at edge
<Image
  src="/hero.jpg"
  width={1200}
  height={600}
  alt="Hero"
  priority  // Preload for LCP
  sizes="(max-width: 768px) 100vw, 1200px"
/>
json
// vercel.json — configure image optimization
{
  "images": {
    "sizes": [640, 750, 828, 1080, 1200],
    "domains": ["images.example.com"],
    "formats": ["image/avif", "image/webp"],
    "minimumCacheTTL": 86400
  }
}

Performance Budget Reference

MetricTargetVercel Tool
LCP< 2.5sVercel Analytics
FID/INP< 200msVercel Analytics
CLS< 0.1Vercel Analytics
TTFB< 200msEdge caching
Function cold start< 500msLazy init / Edge Functions
Bundle size (gzipped)< 200KB JSBundle analyzer

Output

  • Edge caching configured with optimal cache-control headers
  • ISR or on-demand revalidation for dynamic pages
  • Cold starts eliminated via lazy initialization and Edge Functions
  • Bundle size reduced through tree-shaking and import optimization
  • Image optimization configured
Show full SKILL.md (157 more words)Show less

Error Handling

ErrorCauseSolution
Cache not hittingMissing s-maxage headerAdd to response or vercel.json headers
ISR page always stalerevalidate set too highLower the revalidation interval
Large bundle warningImporting entire libraryUse specific imports: import { map } from 'lodash-es'
Cold start > 1sHeavy top-level importsMove to lazy initialization pattern
Images not optimizedExternal domain not whitelistedAdd to images.domains in config

Examples

Tune caching with a correctness guardrail

Choose a read-only route with no per-user content, deploy a preview change that adds a conservative s-maxage and stale-while-revalidate policy, and compare cache headers, response content, and P95 latency with synthetic requests. Keep an automated assertion that authenticated or cookie-dependent responses are never cached publicly. If the content is stale or personalized, revert the header change immediately and preserve the preview metrics for the next design review.

Resources

Next Steps

For cost optimization, see vercel-cost-tuning.

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in skills/.curated/vercel-performance-tuning of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/caching-strategy.md
  • references/errors.md
  • references/examples.md

Open the folder on GitHubat commit cfae287

Compare with similar skills

Vercel Performance Tuning next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Vercel Performance Tuning compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Vercel Performance Tuning this skilljeremylongshore/tons-of-skills-marketplace2.8k—~2.1kAutomated safety check: PassMIT
Vercel Optimize Auditvercel-labs/agent-skills32k8 repos~4.3kAutomated safety check: PassNone
Cloudflare Workers Performancesecondsky/claude-skills227—~1.6kAutomated safety check: PassMIT
Nitro Server Toolkitantfu/skills6k—~948Automated safety check: PassMIT
Deploy Verceljohnku2011/boilerplates-with-ai-skills240—~660Automated safety check: NotesMIT
Frontmcp Configagentfront/frontmcp146—~7kAutomated safety check: PassApache-2.0

Similar skills

  • Vercel Optimize Audit

    vercel-labs/agent-skills

    Official

    Runs a metrics-first audit of a deployed Vercel project, gating investigations on real signals to produce ranked, citation-backed cost and performance recommendations.

    32k GitHub starsUsed in 8 repos~4.3k tokens
    DevOps & CloudAuto-check passed
  • Cloudflare Workers Performance

    secondsky/claude-skills

    Cloudflare Workers performance optimization with CPU, memory, caching, bundle size.

    227 GitHub stars~1.6k tokensUpdated 13 days ago
    Backend & APIsAuto-check passed
  • Reference for Nitro v3, the server toolkit behind Nuxt: file routing, route rules, caching, storage, tasks, websockets and deployment presets.

    6k GitHub stars~948 tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • Deploy Vercel

    johnku2011/boilerplates-with-ai-skills

    A skill your agent uses when deploying or configuring this project on Vercel — env vars, build settings, serverless limits, and production checks for Next.js or Express.

    240 GitHub stars~660 tokensUpdated 1 mo ago
    Backend & APIsAuto-check: notes
  • Frontmcp Config

    agentfront/frontmcp

    A skill your agent uses when configuring a FrontMCP server through frontmcp.config or the @FrontMcp options.

    146 GitHub stars~7k tokensUpdated today
    Backend & APIsAuto-check passed
  • Amazon Elasticache

    aws/agent-toolkit-for-aws

    Official

    Activate when developers have latent caching needs: slow API responses, database read bottlenecks, DynamoDB throttling or cost, RDS/Aurora scaling pressure, Bedrock latency or cost, or adding a…

    2.8k GitHub stars~4.5k tokensUpdated yesterday
    Backend & APIsAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Works with

Questions about Vercel Performance Tuning

What does Vercel Performance Tuning do?

Optimize Vercel deployment performance with caching, bundle optimization, and cold start reduction. Vercel Performance Tuning is an agent skill from jeremylongshore/tons-of-skills-marketplace. Optimize Vercel deployment performance with caching, bundle optimization, and cold start reduction.

When should I use Vercel Performance Tuning?

Vercel Performance Tuning fits situations like: experiencing slow page loads; optimizing Core Web Vitals; reducing serverless function cold start times; with phrases like vercel performance.

How do I install Vercel Performance Tuning in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill vercel-performance-tuning -a claude-code`. Or copy the skill folder (skills/.curated/vercel-performance-tuning in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/vercel-performance-tuning in your project. Claude Code loads it when a task matches its description.

How do I install Vercel Performance Tuning in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill vercel-performance-tuning -a codex`. Or copy the skill folder (skills/.curated/vercel-performance-tuning in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/vercel-performance-tuning in your project. Codex loads it when a task matches its description.

Can I use Vercel Performance Tuning in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill vercel-performance-tuning -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/vercel-performance-tuning, .gemini/skills/vercel-performance-tuning, .github/skills/vercel-performance-tuning and .opencode/skills/vercel-performance-tuning in your project.

What does Vercel Performance Tuning need to run?

Going by SKILL.md and its folder, Vercel Performance Tuning needs the command-line tools its instructions call (npx, vercel and jq) and credentials named REVALIDATION_SECRET. Our summary lists: Node.js; A credential in REVALIDATION_SECRET. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash(vercel:*), Bash(npx:*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Vercel Performance Tuning access the network?

SKILL.md names 1 domain. As links in the text: vercel.com. This is read from the text; nothing was executed.

Is Vercel Performance Tuning safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Vercel Performance Tuning use?

Vercel Performance Tuning is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Vercel Performance Tuning use?

About 2.1k tokens (SKILL.md is roughly 8.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 449 tokens, read only when the agent opens those files.

What are the alternatives to Vercel Performance Tuning?

Skills that share tags, products or a category with Vercel Performance Tuning: Vercel Optimize Audit (vercel-labs/agent-skills, 32k stars), Cloudflare Workers Performance (secondsky/claude-skills, 227 stars), Nitro Server Toolkit (antfu/skills, 6k stars) and Deploy Vercel (johnku2011/boilerplates-with-ai-skills, 240 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Vercel Performance Tuning?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.