external/vercel-cost-optimization/SKILL.md
Analyze Vercel billing data, identify primary cost drivers, map them to your code, and provide scored optimization recommendations. Use when asked to optimize Vercel costs, reduce Vercel bill, analyze Vercel usage, or improve Vercel spending efficiency.
npx skillsauth add seikaikyo/dash-skills vercel-cost-optimizationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Analyzes your Vercel billing data, detects your project stack, maps cost drivers to specific code locations, and provides scored, actionable optimization recommendations ranked by estimated savings.
npm i -g vercel && vercel login)vercel link in project root)package.json in the working directoryVerify setup:
vercel whoami # Should print your username
vercel project # Should show linked project
Follow these 6 steps in order. Each step builds on the previous.
Run the usage script to pull billing data for the current billing period:
bash scripts/get-usage.sh --from YYYY-MM-DD --to YYYY-MM-DD
--breakdown for per-resource granularity if overall costs are unclearParse the JSON output and identify:
Run the stack detection script in the project root:
bash scripts/detect-stack.sh .
This outputs a JSON object with:
framework, frameworkVersion — determines which optimization patterns applyhasAppRouter, hasPagesRouter — affects routing-specific recommendationstypescript — for code example formattingorm — triggers stack-specific advice (Prisma, Drizzle, etc.)isMonorepo — may affect path-based investigationconfigFlags — already-enabled optimizationshasCron, cronCount — cron-specific cost investigationRead the billing service mapping reference:
resources/billing-service-mapping.md
For each of the top 3 cost drivers identified in Step 1:
Record findings as a list of (billing_service, file, line, issue_description) tuples.
Read the optimization patterns and version gating references:
resources/optimization-patterns.md
resources/version-gating.md
For each code issue found in Step 3:
frameworkVersionreact-best-practices rulesIf the detected orm is not "none", also read:
resources/stack-specific-advice.md
And include any applicable ORM/library-specific recommendations.
Read the scoring guide:
resources/scoring-guide.md
For each applicable optimization from Step 4:
score = estimated_savings × effort_multiplier × confidenceSort remaining recommendations by score descending.
Use the report template below to present findings to the user.
Present the following report to the user:
Project: {project_name} Stack: {framework} {frameworkVersion} | {orm} | {app_router/pages_router} Billing Period: {from} to {to} Total Cost: ${total}
| Service | Cost | % of Total | |---------|------|------------| | {service_1} | ${amount} | {pct}% | | {service_2} | ${amount} | {pct}% | | ... | ... | ... |
For each top cost driver, explain:
Group by tier:
High Impact (>$20/mo savings)
| # | Pattern | Est. Savings | Effort | Confidence | Score | |---|---------|-------------|--------|------------|-------| | 1 | {ID}: {title} | ${savings}/mo | {Low/Med/High} | {confidence} | ${score} |
For each recommendation, provide:
react-best-practices rule if applicable (e.g., "See rule async-parallel")Medium Impact ($10-20/mo savings)
(Same table format)
Quick Wins ($5-10/mo savings)
(Same table format)
Check these Vercel platform settings:
If total estimated savings < $10/mo:
Your project is already well-optimized. The identified optimizations would yield minimal savings. Consider revisiting after traffic grows significantly.
This skill references the following rules from react-best-practices. Reference them by name — do not duplicate the rule content:
| Rule | Used In | Context |
|------|---------|---------|
| async-parallel | DUR-01 | Parallel data fetching with Promise.all |
| server-parallel-fetching | DUR-01 | Restructure components for parallel fetches |
| server-cache-react | DUR-05 | React.cache() for request deduplication |
| server-cache-lru | DUR-05 | LRU cache for cross-request caching |
| server-after-nonblocking | DUR-06 | after() for non-blocking operations |
| bundle-dynamic-imports | BW-02 | next/dynamic for heavy components |
| bundle-barrel-imports | BW-03 | Direct imports to avoid barrel files |
| bundle-defer-third-party | BW-04 | Defer analytics and third-party scripts |
| async-suspense-boundaries | BW-05 | Suspense boundaries for streaming |
When presenting a recommendation that maps to a react-best-practices rule, mention:
"See
react-best-practicesrule{rule-name}for detailed implementation guidance."
Install the Vercel CLI: npm i -g vercel
Run vercel login and follow the prompts.
Run vercel link in the project root to connect to your Vercel project.
The detection script works without jq but results are more reliable with it installed:
brew install jqapt-get install jq or yum install jqnode_modules is installed (npm install) for accurate version detectionpackage.json — verify your dependencies are listed correctlySavings estimates are conservative approximations based on billing data and code patterns. Actual savings depend on traffic patterns, caching hit rates, and implementation details. Monitor your Vercel bill after applying changes to validate impact.
development
拋棄式 HTML mockup 比稿:產出 2 到 3 個設計立場不同的變體(密度 / 版式 / 強調軸,不是換色),各附取捨說明,最後給有立場的對比結論。適用:「畫個草圖」「比較 A 版 B 版」「先看方向再做」「給我看幾種做法」。要 production 元件或設計已定案時不適用。
tools
需求不明時的意圖萃取訪談:一次一題、每題附上自己的猜測、聽出「真正想要 vs 覺得應該要」,直到能預測使用者反應(約 95% 信心)才動工。適用:需求缺少對象 / 動機 / 成功標準 / 約束,或使用者點名「訪談我」「先確認一下」「我們確定嗎」。明確自足的指示、純資訊查詢、機械性操作不適用。
development
對非平凡決策啟動新鮮 context 對抗審查(找碴不背書),在修正還便宜的時候抓出錯誤方向。適用:高風險改動(production、資安敏感邏輯、不可逆操作)、不熟的程式碼、要宣稱「這樣是安全的 / 可行的」之前。機械性操作與一行修改不適用。
testing
Reference for writing and editing agent skills well — the vocabulary and principles that make a skill predictable. Consult when authoring, reviewing, or pruning a SKILL.md.