vercel-optimize
Fungsinya
Skill ini mencari cara menurunkan biaya Vercel dan mempercepat aplikasi web yang sudah di-deploy. Cocok untuk pengembang yang menginginkan perbaikan berdasarkan data produksi nyata.
Kapan dipakai
- ✓Saat tagihan Vercel Anda lebih tinggi dari perkiraan dan Anda ingin mencari penyebabnya.
- ✓Saat aplikasi Next.js atau sejenis yang sudah di-deploy lambat di produksi.
- ✓Saat Anda ingin rekomendasi berperingkat dan berbasis bukti untuk proyek Vercel.
Link skill
https://github.com/vercel-labs/agent-skills/blob/main/skills/vercel-optimize/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
“Tagihan Vercel saya melonjak bulan ini. Cari tahu apa yang mendorong biayanya dan apa yang bisa saya ubah.”
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Skill pertama-tama mengumpulkan metrik produksi, penggunaan, dan pengaturan proyek dari alat baris perintah Vercel. Hanya kandidat yang didukung metrik yang diperiksa di kode, dan setiap rekomendasi diberi peringkat beserta buktinya.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
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 `verce
Pertanyaan umum
Apakah ia memeriksa kode dulu?
Tidak. Skill mulai dari sinyal produksi dan hanya memeriksa file yang ditunjuk oleh metrik.
Apa yang dibutuhkan?
Diperlukan alat baris perintah Vercel, sesi yang sudah masuk, proyek yang sudah tertaut, dan fitur observabilitas tertentu untuk metrik tingkat rute.
Apakah skill ini menerapkan perbaikannya sendiri?
Skill menghasilkan rekomendasi berperingkat untuk Anda tinjau, bukan serangkaian perubahan otomatis.
Detail
Deskripsi asli dari pembuat
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.
repo: vercel-labs/agent-skills
Popularitas
- Bintang GitHub
- 33k
- Peringkat
- #8433
- Lisensi
- —
- Diperbarui
- 28/10/2026
Komentar
- …
Skill lain dari repositori ini
vercel-react-native-skills
33kMemberi agent Anda praktik terbaik untuk aplikasi React Native dan Expo, mencakup performa daftar, animasi, navigasi, dan modul native.
vercel-react-view-transitions
33kMengajari agent Anda menambahkan animasi halaman dan elemen yang halus dan terasa alami di React, dengan memakai View Transition API bawaan browser.
Skill serupa
openclaw-update
394kMembantu agent Anda memperbarui OpenClaw Gateway yang sudah ada, dengan memilih metode pembaruan yang sesuai cara pemasangannya dan menjaga sesi Anda tetap berjalan.
diagnose-gateway
394kMembantu agent Anda mencari tahu mengapa OpenClaw Gateway gagal dengan memeriksa pengaturan, channel, dan port tanpa mengubah apa pun.
crabbox-apps
394kMembantu agent Anda membuka dan menjalankan aplikasi di mesin cloud sementara, lalu menampilkan tampilannya di panel samping chat Anda.