Commit Graph

279 Commits

Author SHA1 Message Date
John Lindquist 753292ffd6 Create three new Vercel skills (cron-jobs, deployments-cicd, env-vars) with SKILL.md files covering setup, CLI commands, and gotchas. Harden the PreToolUse hook (hooks/pretooluse-skill-inject.mjs) by wrapping output in hookSpecificOutput, adding atomic file writes with renameSync, supporting VERCEL_PLUGIN_DEBUG env var alongside VERCEL_PLUGIN_HOOK_DEBUG, and using a safeNow() shim for performance.now compatibility. Expand skill-map.json with new trigger patterns for the added skills and broader coverage for existing ones. Rewrite and expand tests/pretooluse-skill-inject.test.ts to cover the new hook behavior, atomic writes, debug output, and deduplication logic. Add hooks/HOOKS.md documenting the hook architecture. Update vercel.md with new skill references. Add README.txt and vercel.txt with project overview and Vercel platform reference docs. Add .claude/settings.json for project-level Claude settings. 2026-03-05 08:05:14 -07:00
John Lindquist 5b43dbe07f fix: close plugin gaps found during Linear clone build session
- proxy.ts location: document that --src-dir requires src/proxy.ts not root
- @ai-sdk/react: document as required separate install for useChat hooks
- maxSteps removal: replace with stopWhen/stepCountIs across all docs
- toDataStreamResponse: fix remaining v5 references to toUIMessageStreamResponse
- Neon lazy init: add build-time safe pattern (neon() crashes without DATABASE_URL)
- drizzle-kit: document that it doesn't auto-load .env.local
- Marketplace CLI: document AI agent term-acceptance blocker
- Clerk: add org flow gotchas (redirect loop, missing env vars, proxy location)
2026-03-04 18:56:33 -07:00
John Lindquist 69031ac64e chore: expand skill-map trigger coverage and refactor PreToolUse hook 2026-03-04 17:38:29 -07:00
John Lindquist 86d0152a76 Expand skill-map trigger coverage and refactor PreToolUse hook script.
In hooks/skill-map.json: add tailwind.config.*, postcss.config.*, tsconfig.json, and tsconfig.*.json to the nextjs pathPatterns. Add bun/yarn install patterns for @ai-sdk/gateway to ai-gateway bashPatterns. Add bun/yarn install patterns for @vercel/functions to runtime-cache bashPatterns. Add bun/yarn install patterns for @vercel/speed-insights to observability bashPatterns.

In hooks/pretooluse-skill-inject.mjs: refactor the hook script for clarity and robustness.

In tests/pretooluse-skill-inject.test.ts: expand test coverage for the new trigger patterns and refactored hook logic.
2026-03-04 13:51:38 -07:00
John Lindquist dab39f5bb6 Add three new skills (ai-elements, shadcn, json-render) and make OIDC the documented default auth for AI Gateway across the plugin.
Create skills/ai-elements/SKILL.md covering the AI Elements component library — 40+ React components for AI chat UIs (Message, Conversation, Tool, Reasoning, CodeBlock, PromptInput) built as a custom shadcn/ui registry. Document installation via `npx ai-elements`, integration with AI SDK v6 useChat/UIMessage parts, server-side patterns (convertToModelMessages async + toUIMessageStreamResponse), and the DefaultChatTransport client pattern.

Create skills/shadcn/SKILL.md covering shadcn/ui — CLI commands (init, add, build, search, migrate), components.json configuration, namespaced custom registries (@v0, @acme), CSS variable theming with oklch, dark mode setup, the cn() utility, TooltipProvider requirement, RTL support, and framework compatibility (Next.js, Vite, Remix, Astro, Laravel).

Create skills/json-render/SKILL.md covering AI chat response rendering — the UIMessage parts format (text, tool-*, reasoning, step-start), manual rendering patterns for custom chat UIs without AI Elements, ToolResultCard patterns for structured tool output display instead of raw JSON, and the 5 most common v6 rendering mistakes (raw JSON from message.content, tool JSON blobs, convertToModelMessages not awaited, toDataStreamResponse vs toUIMessageStreamResponse, v5 useChat API pattern).

In skills/ai-gateway/SKILL.md, add a full "Authentication (OIDC — Default)" section documenting: VERCEL_OIDC_TOKEN provisioned by `vercel env pull`, @vercel/oidc reading the token automatically, ~24h expiry with re-pull for local dev, auto-refresh on Vercel deployments, AI_GATEWAY_API_KEY as manual alternative, and the auth priority order (API key first, then OIDC fallback).

In skills/ai-sdk/SKILL.md, update the setup section to document OIDC as default auth flow (vercel link → enable gateway → vercel env pull → OIDC token auto-provisioned), rewrite the UI Hooks section with both AI Elements (recommended) and manual rendering patterns showing v6 API changes (DefaultChatTransport, sendMessage, status, message.parts), update Key Patterns to include OIDC, AI Elements, and server-side v6 patterns, and expand the migration section with useChat transport, sendMessage, toUIMessageStreamResponse, and message.parts entries.

In vercel.md ecosystem graph: add AI Elements product entry under AI SDK UI Layer with component list and shadcn dependency, add shadcn/ui product entry under Frameworks with CLI commands and registry system, add OIDC Authentication subsection under AI Gateway with token flow, add AI Elements and custom rendering rows to AI Features decision matrix, update "Build an AI Chatbot" workflow with OIDC steps and AI Elements, add 6 new migration table entries (useChat transport, sendMessage, toUIMessageStreamResponse, message.parts, manual API keys → OIDC), and update AI SDK v6 conventions with OIDC-first auth, AI Elements recommendation, and server/client v6 patterns.

In hooks/skill-map.json, add trigger entries for all 3 new skills: ai-elements (components/ai-elements/**, npx ai-elements, shadcn registry URL patterns), shadcn (components.json, components/ui/**, npx shadcn patterns), json-render (components/chat**, components/message*, chat sidebar patterns).

Run the validator (bun run scripts/validate.ts --coverage skip) to confirm all 8 checks pass with 24 skills, 0 orphans, and all skill-map entries valid.
2026-03-04 13:30:50 -07:00
John Lindquist 39940f6acb fix: update model IDs to latest and remove PreToolUse hook
- Remove PreToolUse hook entirely (gateway preference belongs in
  SessionStart conventions, not per-write checks)
- Fix model ID format: use dots not dashes (claude-sonnet-4.6,
  claude-opus-4.6, claude-haiku-4.5)
- Update to latest flagship models from AI Gateway catalog:
  OpenAI: gpt-5.2 (was gpt-5-mini), gpt-5.3-codex, gpt-5-nano
  Anthropic: claude-sonnet-4.6, claude-opus-4.6
  Google: gemini-3-flash (was gemini-2.5-flash),
          gemini-3.1-pro-preview (was gemini-2.5-pro)
- Update providers reference table with current model lineup
2026-03-04 12:24:22 -07:00
John Lindquist ef3a7bbfb6 feat: enforce AI Gateway as default over direct provider SDKs
Addresses a gap where the plugin allowed agents to use direct provider
SDKs (@ai-sdk/anthropic, @ai-sdk/openai) with manual API keys instead
of routing through Vercel AI Gateway, which provides auto-provisioned
credentials, failover, cost tracking, and observability.

Changes:
- PreToolUse hook: add 3 new checks (10-12) for AI Gateway preference,
  deprecated generateObject/streamObject, and provider API key env vars
- vercel.md: update AI Features decision matrix to make AI Gateway the
  default row, add AI project bootstrap workflow, update Conventions to
  lead with gateway-first and vercel-link-first guidance
- ai-sdk SKILL.md: rewrite Installation, add Setup for AI Projects
  section, update all code examples to use gateway() instead of direct
  provider imports, update Key Patterns to prioritize gateway
2026-03-04 11:20:08 -07:00
John Lindquist cc18742dbd chore: remove assets/ dir, point validator and tests at vercel.md
The ecosystem graph now lives at vercel.md (root). Remove the redundant
assets/ directory and update all references in the validator, tests, and
README.
2026-03-04 11:10:33 -07:00
John Lindquist 4c9cc93665 fix: update generateObject/streamObject to AI SDK v6 Output.object() API
generateObject and streamObject are deprecated in AI SDK v6. Replace all
usage and documentation with generateText/streamText + Output.object().

Also:
- Expand migration tables with CoreMessage, Experimental_Agent deprecations
- Simplify validator to check metadata only (components discovered from dirs)
- Add date to vercel.md header
2026-03-04 11:07:22 -07:00
John Lindquist 758ae294d9 fix: remove unnecessary skills/commands/agents from plugin.json
These fields are for path overrides per the open-plugin spec, not
inventory lists. Components are discovered from the filesystem
automatically. Removing them fixes Claude Code validation errors.
2026-03-04 11:01:02 -07:00
John Lindquist a9ce4311f1 docs: update README for CLAUDE.md → vercel.md rename 2026-03-04 10:54:48 -07:00
John Lindquist 909db57f41 feat: inject vercel.md via SessionStart hook instead of CLAUDE.md
Plugins don't support CLAUDE.md natively. Rename CLAUDE.md to vercel.md
and add a SessionStart hook that cats it into the session context.
2026-03-04 10:45:53 -07:00
John Lindquist dbb17d4eeb refactor: move ecosystem graph + conventions to CLAUDE.md, remove rules/
Rules (.mdc files) aren't supported by Claude Code's plugin system — they
were silently ignored. Move the ecosystem knowledge graph and all three
convention sets (Next.js 16, AI SDK v6, Vercel platform) into CLAUDE.md
so they're always loaded into context.

Also updates repo references from anthropics/open-plugin to
vercel-labs/vercel-plugin.
2026-03-04 10:22:29 -07:00
John Lindquist 211611ade6 docs(skills,commands): expand command guides, skill docs, and validation logic
Add detailed command conventions, enrich deploy/env/marketplace/status
command docs, strengthen validation script with CLI reference tooling,
and expand skill documentation for marketplace, observability, API,
CLI, and storage skills. Update ecosystem graph and verification checklist.
2026-03-04 08:58:53 -07:00
John Lindquist 6a3c0d30e1 docs(manifest): align plugin.json and README with 21 skills
Update plugin.json to enumerate all 21 skills and align README
skill table and counts with the expanded manifest.
2026-03-03 20:18:29 -07:00
John Lindquist 7316796d68 test(validation): add test harness, coverage baseline, and orphan detection
Add bun test suite with validate.test.ts, coverage-baseline.ts for
llms.txt gap analysis, orphan-skill detection in validate.ts, structured
JSON output with --format json, and per-check timing metrics.
2026-03-03 20:18:21 -07:00
John Lindquist 1947103a74 docs(skills): add microfrontends, OG image, and CLI cache guidance
Add Microfrontends & Multi-App Composition to turborepo skill, OG
Image Generation to nextjs skill, and cache management + MCP server
integration to vercel-cli skill.
2026-03-03 20:18:14 -07:00
John Lindquist d1b92034fc feat(skills): add 7 new skills for expanded Vercel coverage
Add routing-middleware, runtime-cache, vercel-sandbox, vercel-queues,
vercel-flags, sign-in-with-vercel, and vercel-agent skills to close
coverage gaps identified by llms.txt baseline analysis.
2026-03-03 20:18:06 -07:00
John Lindquist 67df6739d8 feat(ecosystem): expand ecosystem graph and verification checklist
Build relational ecosystem graph to 793+ lines with 21 skill
cross-references, middleware disambiguation table, and full Vercel
product surface coverage. Add verification checklist tracking
version-sensitive claims with dynamic validator integration.
2026-03-03 20:17:58 -07:00
John Lindquist 0230e4c497 docs(skills): add GitHub repo links for observability, v0-dev, and vercel-storage
Add verified canonical GitHub repository URLs to the Official Documentation
sections for observability (@vercel/analytics, @vercel/speed-insights),
v0-dev (v0-sdk), and vercel-storage skills.
2026-03-03 15:55:44 -07:00
John Lindquist 206b7c7759 docs(vercel-skills): add verified GitHub repo links
Added canonical GitHub repository links as the final bullets in the Official Documentation sections for vercel-api, vercel-cli, and vercel-functions.
Each link was added only after validating repository availability.

Verified: node docs section check for expected last bullets (pass)
Verified: curl status checks for vercel/sdk=200, vercel/vercel=200, vercel/firewall=404 (pass)
Swarm-Agent: codex-github-platform
2026-03-03 15:39:02 -07:00
John Lindquist 5ec3065104 docs(skills): add canonical GitHub repo links
Add canonical GitHub repository URLs to the Official Documentation
sections for Next.js, Turbopack, and Turborepo skills.

Verified: bash scoped check confirms each GitHub link is the final
Official Documentation bullet in the three changed SKILL.md files.
Verified: curl -s -o /dev/null -w '%{http_code}' on each repository URL
returns an allowed status (200).
Swarm-Agent: codex-github-framework
2026-03-03 15:37:06 -07:00
John Lindquist 96e998867f docs(ai-skills): add canonical GitHub repo links
Add canonical GitHub repository references to Official Documentation sections for AI Gateway, AI SDK, and Workflow skills to improve source discoverability.

Verified: git diff --check -- skills/ai-gateway/SKILL.md skills/ai-sdk/SKILL.md skills/workflow/SKILL.md
Verified: test ""200"" = "200" && test ""200"" = "200"
Verified: rg -n "GitHub: AI SDK|GitHub: Workflow DevKit" skills/ai-gateway/SKILL.md skills/ai-sdk/SKILL.md skills/workflow/SKILL.md
Swarm-Agent: codex-github-ai
2026-03-03 15:35:27 -07:00
John Lindquist 625c52145a docs(ai-skills): update AI SDK domain to ai-sdk.dev
Replace legacy sdk.vercel.ai documentation links with canonical ai-sdk.dev URLs in the AI Gateway and AI SDK skill docs.

Verified: git diff --check -- skills/ai-gateway/SKILL.md skills/ai-sdk/SKILL.md
Verified: ! rg -n "sdk\.vercel\.ai" skills/ai-gateway/SKILL.md skills/ai-sdk/SKILL.md
Swarm-Agent: codex-github-ai
2026-03-03 15:34:58 -07:00
John Lindquist 372189c57e fix(skills): update broken and redirected doc URLs
These skill references included 404s and redirected paths that no longer
resolve to canonical docs. This update applies the exact URL mapping
requested across the assigned eight SKILL.md files.

Verified: scoped URL verification via rg patterns (old URLs absent, new URLs present)
Verified: set -euo pipefail; ! rg old-patterns ...; rg required-new-patterns ... (pass)
Swarm-Agent: codex-broken-urls
2026-03-03 15:32:38 -07:00
John Lindquist 4a0300a59a docs(turbo-skills): update Turbo docs domain references
Replace all turbo.build domain references with turborepo.dev in\nassigned Turbopack and Turborepo skill documentation files.\n\nVerified: ! rg -n "turbo\.build" skills/turbopack/SKILL.md skills/turborepo/SKILL.md\nVerified: rg -n "turborepo\.dev" skills/turbopack/SKILL.md skills/turborepo/SKILL.md\nSwarm-Agent: codex-turbo-urls
2026-03-03 15:30:56 -07:00
John Lindquist e81f33cc01 fix(vercel-storage): remove invalid Neon compat package docs
The skill documented @neondatabase/vercel-postgres-compat, which is not a valid npm package.\nRemoved the install command and migration snippet that imported it while keeping\nall @neondatabase/serverless guidance intact.\n\nVerified: node -e "const fs=require('fs');const vs=fs.readFileSync('skills/vercel-storage/SKILL.md','utf8');const checks=[['compat package removed',!/@neondatabase\/vercel-postgres-compat/.test(vs)],['serverless install present',/npm install @neondatabase\/serverless/.test(vs)],['serverless imports remain',/from '@neondatabase\/serverless'/.test(vs)]];const bad=checks.filter(([,ok])=>!ok);if(bad.length){process.exit(1);}"\nVerified: git diff --check -- skills/vercel-storage/SKILL.md\n\nSwarm-Agent: codex-npm-and-workflow
2026-03-03 15:28:35 -07:00
John Lindquist ed1b1951f5 fix(workflow): use world-postgres package and ai-sdk.dev URL
The workflow skill referenced @workflow/postgres, which is not a real npm package.\nIt now uses @workflow/world-postgres and includes an explicit install command.\nThe AI SDK docs link was also updated from sdk.vercel.ai to ai-sdk.dev.\n\nVerified: node -e "const fs=require('fs');const wf=fs.readFileSync('skills/workflow/SKILL.md','utf8');const checks=[['world-postgres install present',/npm install @workflow\/world-postgres/.test(wf)],['world-postgres import present',/from '@workflow\/world-postgres'/.test(wf)],['old package removed',!/@workflow\/postgres/.test(wf)],['sdk.vercel.ai removed',!/sdk\.vercel\.ai/.test(wf)],['ai-sdk.dev present',/https:\\/\\/ai-sdk\.dev\//.test(wf)]];const bad=checks.filter(([,ok])=>!ok);if(bad.length){process.exit(1);}"\nVerified: git diff --check -- skills/workflow/SKILL.md\n\nSwarm-Agent: codex-npm-and-workflow
2026-03-03 15:28:28 -07:00
John Lindquist 2a56636bbe Initial commit: vercel-plugin project setup 2026-03-03 15:13:06 -07:00