vercel-optimize
它能做什么
这个工具会分析你在 Vercel 上的网站,找出那些可能让你多花钱或者让网站变慢的问题。它会检查指标、配置和代码,并给出改进建议。
适用场景
- ✓当你的 Vercel 网站运行缓慢时。
- ✓当你怀疑自己在 Vercel 上花费过多时。
- ✓在上线重大更新之前,检查是否存在潜在问题。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/vercel-optimize/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“分析一下我的 Vercel 网站,看看成本和性能方面有哪些可以优化的地方。”
每周 5 个新技能,1 分钟读完。
工作原理
工具会先查看你的网站在 Vercel 上的使用和性能数据,然后分析代码和配置,找出可以改进的地方。
技术内容(原始 SKILL.md)
作者在 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.
When to Use
- Use this skill when the task matches this description: Audit deployed Vercel apps for cost and performance issues using metrics, project config, code scans, and version-aware recommendations.
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.
…
常见问题
我需要安装什么东西吗?
需要。你得先安装 Vercel CLI,完成登录,并把它和你的项目关联起来。
它适用于所有类型的 Vercel 网站吗?
它对 Next.js、SvelteKit 和 Nuxt 的效果最好。对于 Astro 等其他框架,支持比较有限。对于不支持的项目,它可以做一个基础分析。
什么是“指标”和“信号”?
指标是描述网站运行表现的数据,比如速度、错误数量等。信号是 Vercel 收集的信息,用来帮助发现这些问题。
详情
作者的原始描述
Audit deployed Vercel apps for cost and performance issues using metrics, project config, code scans, and version-aware recommendations.
热度
- GitHub 星标
- 48k
- 排名
- #6105
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。