Expert at finding and using official documentation via Context7 MCP for Next.js 16, React 19, FastAPI, Better Auth, and SQLModel...
You are an expert at leveraging Context7 MCP to access current, official documentation for modern web frameworks. This skill teaches you when to query Context7 and how to query it effectively.
Context7 is for CURRENT, SPECIFIC framework knowledge - not basic concepts.
Need to implement something?
ā
Do I know the current API/pattern confidently?
ā Yes ā Implement directly
ā No
ā
Is this framework-specific? (Next.js 16, Better Auth, etc.)
ā Yes ā QUERY CONTEXT7
ā No
ā
Is this a basic concept? (for loops, HTTP methods, etc.)
ā Yes ā Use existing knowledge
ā No ā Consider querying if it's specialized
ā Bad: "authentication setup"
ā
Good: "Better Auth JWT configuration for Next.js 16 App Router"
ā Bad: "database queries"
ā
Good: "SQLModel async session management with Neon PostgreSQL"
ā Bad: "API endpoints"
ā
Good: "FastAPI async dependency injection patterns"
ā Bad: "middleware in Next.js"
ā
Good: "Next.js 16 middleware for JWT authentication with Better Auth"
ā Bad: "error handling"
ā
Good: "FastAPI exception handling with custom error responses"
Don't repeatedly query for the same information. Example workflow:
Phase 1: Setup
- Query: "Better Auth installation and initial setup Next.js 16"
- Implement auth configuration
Phase 2: Backend Integration
- Query: "FastAPI JWT verification for Better Auth tokens"
- Implement verification endpoint
Phase 3: Frontend Flow
- Query: "Better Auth React hooks for authentication state"
- Implement login/logout UI
Start specific, get more specific if needed:
Round 1: "FastAPI async SQLModel CRUD operations"
ā Implement basic CRUD
Round 2: "FastAPI SQLModel relationship loading with selectinload"
ā Optimize queries with relationships
Round 3: "FastAPI SQLModel pagination patterns"
ā Add pagination
Topics to query:
- "Next.js 16 Server Components vs Client Components when to use"
- "Next.js 16 App Router data fetching with fetch cache"
- "Next.js 16 route handlers for API endpoints"
- "Next.js 16 middleware authentication patterns"
- "Next.js 16 server actions vs API routes"
NOT needed:
- Basic React hooks (useState, useEffect) - you know these
- CSS/Tailwind classes - standard knowledge
- Basic routing concepts - App Router structure is intuitive
Topics to query:
- "FastAPI async endpoint patterns with SQLModel"
- "SQLModel async session management best practices"
- "FastAPI dependency injection with database sessions"
- "FastAPI Pydantic v2 response models"
- "SQLModel relationship patterns with back_populates"
NOT needed:
- Basic Python async/await - standard knowledge
- HTTP status codes - well-known
- JSON serialization basics - standard
Topics to query:
- "Better Auth installation and configuration Next.js 16"
- "Better Auth JWT token generation and verification"
- "Better Auth React hooks usage patterns"
- "Better Auth session management"
- "Better Auth environment variables configuration"
NOT needed:
- General JWT concepts - you understand JWTs
- Cookie vs token storage - basic auth concepts
Topics to query:
- "Neon PostgreSQL connection string format for SQLModel"
- "SQLModel migrations with Alembic for Neon"
- "Neon serverless-specific connection pooling"
NOT needed:
- SQL basics (SELECT, INSERT, UPDATE) - standard knowledge
- Database normalization - fundamental concept
Step 1: Setup Better Auth (Frontend)
Query: "Better Auth setup for Next.js 16 App Router with JWT"
Read: Installation, configuration file structure, environment variables
Implement: auth.ts config, auth route handler
Step 2: Backend JWT Verification
Query: "FastAPI JWT verification using python-jose Better Auth tokens"
Read: JWT decode, signature verification, dependency injection
Implement: JWT dependency, get_current_user function
Step 3: Protected Endpoints
Query: "FastAPI route dependencies with JWT authentication"
Read: Dependency injection patterns, error handling
Implement: Protected CRUD endpoints with user_id filtering
Step 4: Frontend Integration
Query: "Better Auth React hooks for auth state management"
Read: useSession, signIn, signOut hooks
Implement: Login form, auth context, protected routes
This skill is referenced by all other skills as a fallback:
# In nextjs-16-app-router/SKILL.md
When you need current Next.js 16 specifics beyond this skill's scope,
use the `using-context7` skill to query official documentation.
# In fastapi-async-patterns/SKILL.md
For FastAPI patterns not covered here or when uncertain about current APIs,
consult the `using-context7` skill for official documentation.
š© Querying for the same topic multiple times in one session ā Cache knowledge from first query, reference it
š© Querying before attempting implementation ā Try first, query if you hit uncertainty
š© Querying for basic syntax or concepts ā Trust your training data for fundamentals
š© Querying without specific framework + version ā Refine query to be more specific
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā QUERY CONTEXT7 IF: ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā ā Framework-specific (Next.js 16, Better Auth, etc.) ā
ā ā Recent version (after Jan 2025 training cutoff) ā
ā ā Configuration/setup details ā
ā ā Breaking changes or new APIs ā
ā ā Official best practices ā
ā ā Edge cases in specialized domains ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā DON'T QUERY CONTEXT7 FOR: ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā ā Basic language syntax ā
ā ā General programming concepts ā
ā ā Well-known patterns ā
ā ā Information already in conversation ā
ā ā Obvious implementations ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā QUERY FORMAT: ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā [Framework + Version] + [Specific Feature] + [Context] ā
ā ā
ā Example: ā
ā "Next.js 16 App Router middleware for JWT auth with ā
ā Better Auth token verification" ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
reference.md - Context7 query syntax and patternsexamples.md - Real-world query examples for Phase 2when-not-to-query.md - Anti-patterns and over-querying examplesRemember: Context7 is your connection to current, official documentation. Use it strategically for framework-specific knowledge, not as a replacement for your existing expertise in fundamental programming concepts.