Skip to main content
skill CX Codex

nextjs-core — Claude Code skill: what it does, how to install

Guides AI coding agents through Next.js App Router conventions: server-first components, safe Server Actions, and explicit cache revalidation.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add bobmatnyc/claude-mpm-skills --skill nextjs-core -a claude-code
Open on GitHub

What nextjs-core does

This skill enforces core App Router patterns for Next.js projects. It keeps components on the server by default and restricts "use client" directives to cases where interactivity is genuinely required. Route handlers manage incoming API requests and webhooks, paired with loading and error boundaries.

Mutations stay inside Server Actions alongside server-side validation and authorization. The rules explicitly flag client-only authorization checks as an anti-pattern. Initial data fetching inside useEffect and overly broad cache invalidation are also blocked.

What it helps with

  • shift mutations to Server Actions with server validation
  • eliminate initial data fetching inside useEffect
  • set up targeted cache revalidation by tags and paths
  • structure route handlers with loading and error boundaries

Example prompts for the agent

  • Create a Server Action for user profile updates with authorization checks
  • Refactor this page to Server Components and remove unnecessary use client directives
  • Build a webhook route handler with error boundaries and tag revalidation

How to install nextjs-core

1Skills CLI (Vercel)

npx skills add bobmatnyc/claude-mpm-skills --skill nextjs-core -a claude-code

2Manually: put the files in place

~/.claude/skills/nextjs-core/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/nextjs-core/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about nextjs-core

How do I install nextjs-core in Claude Code?

Run npx skills add bobmatnyc/claude-mpm-skills --skill nextjs-core -a claude-code in your terminal. This creates ~/.claude/skills/nextjs-core/SKILL.md.

What does nextjs-core do?

It provides Next.js App Router conventions focusing on Server Components by default, Server Actions for mutations, and explicit caching strategies.

Which anti-patterns does nextjs-core flag?

It stops agents from relying on client-only authorization and blocks fetching initial data inside useEffect.

Source text

SKILL.md · MIT
---
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).

© bobmatnyc · MIT · bobmatnyc/claude-mpm-skills

Similar skills

All skills for Frontend and UI →

From the same set125

reporting-pipelines A skill that fixes one pattern for report exports: collect data, normalize it, write CSV/JSON/Markdown with timestamped names into reports/. CX Codex +1 354installs better-auth-integrations Configures Better Auth route handlers in TypeScript web frameworks like Next.js, Remix, Hono, and Express. Solves cookie and header forwarding for SSR and server actions. CX Codex +1 354installs better-auth-plugins Guides coding agents when configuring Better Auth plugins in TypeScript projects. Covers two-factor auth, passkeys, JWT, and schema migrations. CX Codex +1 352installs git-worktrees Teaches the agent to manage parallel Git branches using worktrees. Useful for stacked pull requests, urgent bugfixes, and isolated code reviews. CX Codex +1 351installs fastapi-local-dev A runbook skill for FastAPI: Uvicorn with reload during development, Gunicorn with UvicornWorker in production. CX Codex +1 347installs vb-winforms VB.NET Windows Forms development patterns for UI threading and data binding. Keeps desktop interfaces responsive. CX Codex +1 345installs headlessui A skill covering Headless UI: unstyled React and Vue components with keyboard navigation and ARIA built in. Useful when you want your own design without losing accessibility. CX Codex +1 345installs vercel-networking-domains A skill that walks the agent through Vercel domains, redirects, rewrites, headers and edge cache. Useful when you change traffic behavior rather than app code. CX Codex +1 344installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor