Look up latest library documentation and coding best practices via Context7 (Upstash). Use when you need current API docs, migration guides, or version-specific code examples for any library (Next.js, React, Tailwind, NextAuth, SWR, Airtable, etc.). Pulls docs directly from source repositories — always up to date.
Query up-to-date library documentation. Never rely on training data when you can check the source.
Find the Context7-compatible library ID:
cd "$(dirname "$0")" && bash scripts/lookup.sh resolve "next.js"
Common libraries and their likely IDs:
next.js — Next.js frameworkreact — Reacttailwindcss — Tailwind CSSnext-auth — NextAuth.jsswr — SWR data fetchingairtable — Airtable APItypescript — TypeScriptvercel — Vercel platformplaywright — Playwright testingcd "$(dirname "$0")" && bash scripts/lookup.sh query "<library-id>" "app router server components"
Read the returned documentation and apply it to the current task. If the docs show patterns different from what's in the Story9 playbook, note the discrepancy — the playbook may need updating.
cd "$(dirname "$0")" && bash scripts/lookup.sh search "next.js app router middleware"
When building Story9 projects, check Context7 for:
| Library | Check for |
|---|---|
| Next.js | App Router changes, new APIs, middleware patterns |
| NextAuth | v5 migration, new providers, session handling |
| SWR | New hooks, caching strategies |
| Tailwind | v4 changes, new utilities |
| React | New hooks, server components patterns |
If Context7 shows a newer pattern than the Story9 playbook, flag it:
Note: Context7 shows NextAuth v5 uses `auth()` instead of `getServerSession()`.
The Story9 playbook still uses v4 patterns. Consider updating.
If the Context7 MCP server isn't responding, fall back to:
package.json