Labsco
vercel logo

vercel-plugin-eval

โ˜… 209

by vercel-labs ยท part of vercel-labs/vercel-plugin

Run live eval sessions against the vercel-plugin to verify hook behavior, skill injection, dedup correctness, and coverage. Launches real Claude Code sessions via WezTerm, monitors debug logs, and produces a structured coverage report.

๐Ÿ”Œ This skill ships inside the vercel plugin โ€” install the plugin and you also get 5 slash commands, 3 sub-agents, hooks, an MCP server.

This is the playbook your agent receives when the skill activates โ€” you don't need to read it to use the skill, but it's here to audit before installing.

Plugin Eval

Launch real Claude Code sessions with the plugin installed, monitor debug logs in real-time, and verify every hook fires correctly with proper dedup.

DO NOT (Hard Rules)

  • DO NOT use claude --print or -p โ€” hooks don't fire, no files created
  • DO NOT use --dangerously-skip-permissions
  • DO NOT create projects in /tmp/ โ€” always use ~/dev/vercel-plugin-testing/
  • DO NOT manually wire hooks or create settings.local.json โ€” use npx add-plugin
  • DO NOT set CLAUDE_PLUGIN_ROOT manually
  • DO NOT use bash -c in WezTerm โ€” use /bin/zsh -ic
  • DO NOT use full path to claude โ€” use the x alias
  • DO NOT write eval scripts โ€” do everything as Bash tool calls in the conversation

Copy the exact commands below. Do not improvise.

What to Monitor

Hook firing (all 8 registered hooks)

LOG=~/.claude/debug/<session-id>.txt

# SessionStart (3 hooks)
grep "SessionStart.*success" "$LOG"

# PreToolUse skill injection
grep -c "executePreToolHooks" "$LOG"        # total calls
grep -c "provided additionalContext" "$LOG"  # injections

# UserPromptSubmit
grep "UserPromptSubmit.*success" "$LOG"

# PostToolUse validate + shadcn font-fix
grep "posttooluse-validate.*provided" "$LOG"
grep "PostToolUse:Bash.*success" "$LOG"

# SessionEnd cleanup
grep "SessionEnd" "$LOG"

Dedup correctness (the key metric)

TMPDIR=$(node -e "import {tmpdir} from 'os'; console.log(tmpdir())" --input-type=module)
CLAIMDIR="$TMPDIR/vercel-plugin-<session-id>-seen-skills.d"

# Claim files = one per skill, atomic O_EXCL
ls "$CLAIMDIR"

# Compare: injections should equal claims
inject_meta=$(grep -c "skillInjection:" "$LOG")
claims=$(ls "$CLAIMDIR" 2>/dev/null | wc -l | tr -d ' ')
echo "Injections: $((inject_meta / 3)) | Claims: $claims"

skillInjection: appears 3x per actual injection in the debug log (initial check, parsed, success). Divide by 3.

PostToolUse validate quality

Look for real catches โ€” API key bypass, outdated models, wrong patterns:

grep "VALIDATION" "$LOG" | head -10

Scenario Design

Describe products and features, never name specific technologies. Let the plugin infer which skills to inject. Always end prompts with: "Link the project to my vercel-labs team so we can deploy it later. Skip any planning and just build it. Get the dev server running."

Coverage targets by scenario type

Scenario TypeSkills Exercised
AI chat appai-sdk, ai-gateway, nextjs, ai-elements
Durable workflowworkflow, ai-sdk, vercel-queues
Monorepoturborepo, turbopack, nextjs
Edge auth + routingrouting-middleware, auth, sign-in-with-vercel
Chat bot (multi-platform)chat-sdk, ai-sdk, vercel-storage
Feature flags + CRMvercel-flags, vercel-queues, ai-sdk
Email pipelineemail, satori, ai-sdk, vercel-storage
Marketplace/paymentspayments, marketplace, cms
Kitchen sinkmicro, ncc, all niche skills

Hard-to-trigger skills (8 of 44)

These need explicit technology references in the prompt because agents don't naturally reach for them:

  • ai-elements โ€” say "use the AI Elements component registry"
  • v0-dev โ€” say "generate components with v0"
  • vercel-firewall โ€” say "use Vercel Firewall for rate limiting"
  • marketplace โ€” say "publish to the Vercel Marketplace"
  • geist โ€” say "install the geist font package"
  • json-render โ€” name files components/chat-*.tsx

Coverage Report

Write results to .notes/COVERAGE.md with:

  1. Session index โ€” slug, session ID, unique skills, dedup status
  2. Hook coverage matrix โ€” which hooks fired in which sessions
  3. Skill injection table โ€” which of the 44 skills triggered
  4. Dedup stats โ€” injections vs claims per session
  5. Issues found โ€” bugs, pattern gaps, validation findings

Cleanup

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