nextjs-core

$npx mdskill add bobmatnyc/claude-mpm-skills/nextjs-core

Guides Next.js App Router development with server-first patterns.

  • Solves data fetching and mutation without client-side effects.
  • Depends on Server Actions, route handlers, and caching APIs.
  • Recommends based on server components, revalidation, and authz.
  • Delivers via SKILL.md rules and reference documentation.

SKILL.md

.github/skills/nextjs-coreView on GitHub ↗
---
name: nextjs-core
description: Core Next.js patterns for App Router development including Server Components, Server Actions, route handlers, data fetching, and caching strategies
user-invocable: false
disable-model-invocation: true
version: 1.1.0
category: toolchain
progressive_disclosure:
  entry_point:
    summary: "Server-first patterns with safe mutations (Server Actions) and explicit caching/revalidation"
tags: [nextjs, app-router]
---

# Next.js Core (App Router)

- Server Components by default; minimal `"use client"`.
- Mutations in Server Actions (validate/authz; revalidate tags/paths).
- Route handlers for APIs/webhooks; add loading/error boundaries.

Anti-patterns:
- ❌ Fetch initial data in `useEffect`.
- ❌ Cache or revalidate too broadly.
- ❌ Client-only authz.

References: see `references/` (server actions, fetching, caching, routing, auth, testing).

More from bobmatnyc/claude-mpm-skills

SkillDescription
anthropicOfficial Anthropic SDK for Claude AI with chat, streaming, function calling, and vision capabilities
api-design-patternsComprehensive API design patterns covering REST, GraphQL, gRPC, versioning, authentication, and modern API best practices
api-documentationBest practices for documenting APIs and code interfaces, eliminating redundant documentation guidance per agent.
api-reviewAPI security checklist for reviewing endpoints before deployment. Use when creating or modifying API routes to ensure proper authentication, authorization, and input validation.
asyncioPython asyncio - Modern concurrent programming with async/await, event loops, tasks, coroutines, primitives, aiohttp, and FastAPI async patterns
axumAxum (Rust) web framework patterns for production APIs: routers/extractors, state, middleware, error handling, tracing, graceful shutdown, and testing
bad-example-skillANTI-PATTERN - Example showing violations of self-containment (DO NOT COPY)
better-auth-authenticationBetter Auth authentication flows for TypeScript apps. Use when enabling email/password auth, configuring social providers, or implementing sign-up, sign-in, and verification flows.
better-auth-coreBetter Auth core setup for TypeScript apps. Use when configuring the Better Auth instance, wiring server handlers and client instances, working with sessions, or calling server-side auth APIs.
better-auth-integrationsBetter Auth framework integrations for TypeScript. Use when wiring route handlers in Next.js, SvelteKit, Remix, Express, Hono, or other web frameworks.