benchmark-testing

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Benchmark Testing

基准测试

Create isolated test projects that exercise vercel-plugin skill injection with realistic, technology-agnostic prompts.
创建隔离的测试项目,通过真实的、不绑定特定技术的提示词测试vercel-plugin的技能注入能力。

Workflow

工作流程

1. Create test directories

1. 创建测试目录

bash
BASE=~/dev/vercel-plugin-testing
mkdir -p "$BASE"/{01-slug,02-slug,...}
bash
BASE=~/dev/vercel-plugin-testing
mkdir -p "$BASE"/{01-slug,02-slug,...}

2. Install the plugin in each directory

2. 在每个目录中安装插件

bash
for dir in "$BASE"/*/; do
  echo "=== $(basename "$dir") ==="
  cd "$dir" && npx add-plugin https://github.com/vercel/vercel-plugin -s project -y 2>&1 | tail -1
done
This creates
.claude/settings.json
with
enabledPlugins
in each directory.
bash
for dir in "$BASE"/*/; do
  echo "=== $(basename "$dir") ==="
  cd "$dir" && npx add-plugin https://github.com/vercel/vercel-plugin -s project -y 2>&1 | tail -1
done
这一步会在每个目录下生成包含
enabledPlugins
配置的
.claude/settings.json
文件。

3. Launch Claude Code in WezTerm panes

3. 在WezTerm窗格中启动Claude Code

Critical details that must all be followed:
  • Use
    --cwd <absolute-path>
    to set the working directory
  • Use
    unset CLAUDECODE
    before
    x
    to avoid nested-session errors
  • Use
    --settings .claude/settings.json
    (not
    --settings project
    ) to load the plugin
  • Use double quotes on the outer
    -ic
    string, single quotes around the prompt
  • Wait 10 seconds between each launch to avoid overwhelming the system
  • Always use
    spawn
    (new tabs) —
    split-pane
    runs out of space after ~4 panes
Working command template:
bash
wezterm cli spawn --cwd /absolute/path/to/test-dir -- /bin/zsh -ic "unset CLAUDECODE; x 'YOUR PROMPT HERE. Link the project to my vercel-labs team so we can deploy it later.' --settings .claude/settings.json; exec zsh"
必须严格遵守的关键注意事项:
  • 使用
    --cwd <absolute-path>
    设置工作目录
  • 在运行
    x
    命令前执行
    unset CLAUDECODE
    避免嵌套会话错误
  • 使用
    --settings .claude/settings.json
    (而非
    --settings project
    )加载插件
  • 外层
    -ic
    字符串使用双引号,提示词内容使用单引号包裹
  • 每次启动间隔10秒避免系统负载过高
  • 始终使用
    spawn
    (新建标签页)——
    split-pane
    在开启约4个窗格后就会出现空间不足问题
可用命令模板:
bash
wezterm cli spawn --cwd /absolute/path/to/test-dir -- /bin/zsh -ic "unset CLAUDECODE; x 'YOUR PROMPT HERE. Link the project to my vercel-labs team so we can deploy it later.' --settings .claude/settings.json; exec zsh"

Prompt Guidelines

提示词规范

  • Never name specific technologies (no "Next.js", "Stripe", "Vercel KV", etc.)
  • Describe the product and features — let the plugin infer which skills to inject
  • Make prompts ambitious and multi-featured to exercise multiple skill triggers
  • Always append: "Link the project to my vercel-labs team so we can deploy it later."
  • 绝对不要指定具体技术(不能出现"Next.js"、"Stripe"、"Vercel KV"等)
  • 描述产品功能——让插件自行推断需要注入的技能
  • 提示词可以设计得复杂一些,包含多个功能,以触发多个技能的注入
  • 始终在末尾追加:"Link the project to my vercel-labs team so we can deploy it later."

Example prompts

示例提示词

SlugPromptExpected skills
recipe-platform"Build a recipe sharing platform where users sign up, upload photos of their dishes, write ingredients and steps, and browse a feed with infinite scroll..."auth, vercel-storage, nextjs
trivia-game"Create a multiplayer trivia game where players join a room with a 6-letter code, answer questions in real-time with a 15-second countdown..."vercel-storage, nextjs
code-review-bot"Build an AI-powered code review dashboard with webhook API routes, LLM streaming analysis, and stats over time..."ai-sdk, nextjs
conference-tickets"Create a conference ticketing system with tiered checkout, QR code emails, admin panel, and payment webhook handling..."payments, email, auth
content-aggregator"Build a content aggregator with hourly scheduled RSS fetching, LLM summaries, category filters, and bookmarks..."cron-jobs, ai-sdk
finance-tracker"Build a personal finance tracker with bank connection, spending charts, and weekly email digest via scheduled job..."cron-jobs, email
multi-tenant-blog"Create a multi-tenant blog where each user gets a subdomain, with request-level routing, headless content API, and role-based auth..."routing-middleware, cms, auth
status-page"Build a SaaS status page with scheduled endpoint pinging, uptime charts, incident logging, and KV-stored history..."cron-jobs, vercel-storage, observability
dog-walking-saas"Build a dog walking SaaS with user accounts, pet photos, booking, monthly invoicing, admin dashboard, and separate dev/prod env configs..."payments, auth, vercel-storage, env-vars
标识提示词预期技能
recipe-platform"Build a recipe sharing platform where users sign up, upload photos of their dishes, write ingredients and steps, and browse a feed with infinite scroll..."auth, vercel-storage, nextjs
trivia-game"Create a multiplayer trivia game where players join a room with a 6-letter code, answer questions in real-time with a 15-second countdown..."vercel-storage, nextjs
code-review-bot"Build an AI-powered code review dashboard with webhook API routes, LLM streaming analysis, and stats over time..."ai-sdk, nextjs
conference-tickets"Create a conference ticketing system with tiered checkout, QR code emails, admin panel, and payment webhook handling..."payments, email, auth
content-aggregator"Build a content aggregator with hourly scheduled RSS fetching, LLM summaries, category filters, and bookmarks..."cron-jobs, ai-sdk
finance-tracker"Build a personal finance tracker with bank connection, spending charts, and weekly email digest via scheduled job..."cron-jobs, email
multi-tenant-blog"Create a multi-tenant blog where each user gets a subdomain, with request-level routing, headless content API, and role-based auth..."routing-middleware, cms, auth
status-page"Build a SaaS status page with scheduled endpoint pinging, uptime charts, incident logging, and KV-stored history..."cron-jobs, vercel-storage, observability
dog-walking-saas"Build a dog walking SaaS with user accounts, pet photos, booking, monthly invoicing, admin dashboard, and separate dev/prod env configs..."payments, auth, vercel-storage, env-vars

Cleanup

清理

bash
rm -rf ~/dev/vercel-plugin-testing
bash
rm -rf ~/dev/vercel-plugin-testing