Agent skill

Nextjs Mastery

by rohitg00 in rohitg00/awesome-claude-code-toolkit

Next.js 14+ App Router patterns including RSC, ISR, middleware, parallel routes, and data fetching

Apache-2.0Auto-check passed

Install Nextjs Mastery

skills CLI
$ npx skills add rohitg00/awesome-claude-code-toolkit --skill nextjs-mastery -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install rohitg00/awesome-claude-code-toolkit nextjs-mastery --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/rohitg00/awesome-claude-code-toolkit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/nextjs-mastery .claude/skills/nextjs-mastery && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
nextjs-mastery
GitHub stars
2.7k
Token cost
~1.2k tokens
SKILL.md length
188 words
Files
1
Skills in repo
38
Repo updated
First seen
Licence
Apache-2.0

At a glance

Next.js 14+ App Router patterns including RSC, ISR, middleware, parallel routes, and data fetching

  • SKILL.md covers App Router Structure, Server Components and Data…, ISR and Caching and Middleware, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Nextjs Mastery is an agent skill from rohitg00/awesome-claude-code-toolkit. Next.js 14+ App Router patterns including RSC, ISR, middleware, parallel routes, and data fetching

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with Next.js. The repository describes itself as: The most comprehensive toolkit for Claude Code -- 135 agents, 35 curated skills, 42 commands, 176+ plugins, 20 hooks, 15 rules, 7 templates, 14 MCP configs, 26 companion apps, 52… The licence is Apache-2.0.

Example prompts

  • “/nextjs-mastery”

What it can do on your machine

Read from SKILL.md and the folder at commit ebdf1d5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Nextjs Mastery loads about 1.2k tokens when it runs. Until then it costs about 28 tokens; SKILL.md has 188 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~28
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from rohitg00/awesome-claude-code-toolkit at commit ebdf1d5, republished under its Apache-2.0 licence (© rohitg00). 188 words, ~1,154 tokens.

Download SKILL.mdSave it as .claude/skills/nextjs-mastery/SKILL.md (or your agent's skills folder).
name
nextjs-mastery
description
Next.js 14+ App Router patterns including RSC, ISR, middleware, parallel routes, and data fetching

Next.js Mastery

App Router Structure

app/
  layout.tsx              # Root layout (wraps all pages)
  page.tsx                # Home route /
  loading.tsx             # Route-level Suspense fallback
  error.tsx               # Route-level error boundary
  not-found.tsx           # Custom 404
  (marketing)/
    about/page.tsx        # /about (grouped without URL segment)
  dashboard/
    layout.tsx            # Nested layout for /dashboard/*
    page.tsx              # /dashboard
    @analytics/page.tsx   # Parallel route slot
    @activity/page.tsx    # Parallel route slot
    settings/
      page.tsx            # /dashboard/settings
  api/
    webhooks/route.ts     # Route handler (POST /api/webhooks)

Route groups (name) organize code without affecting URLs. Parallel routes @slot render multiple pages simultaneously.

Server Components and Data Fetching

tsx
async function ProductPage({ params }: { params: Promise<{ id: string }> }) {
  const { id } = await params;
  const product = await db.product.findUnique({ where: { id } });

  if (!product) notFound();

  return (
    <div>
      <h1>{product.name}</h1>
      <p>{product.description}</p>
      <Suspense fallback={<ReviewsSkeleton />}>
        <Reviews productId={id} />
      </Suspense>
    </div>
  );
}

async function Reviews({ productId }: { productId: string }) {
  const reviews = await db.review.findMany({ where: { productId } });
  return (
    <ul>
      {reviews.map(r => <li key={r.id}>{r.text} - {r.rating}/5</li>)}
    </ul>
  );
}

Server Components are the default. They run on the server, can access databases directly, and send zero JavaScript to the client.

ISR and Caching

tsx
export const revalidate = 3600;

async function BlogPage() {
  const posts = await fetch("https://api.example.com/posts", {
    next: { revalidate: 3600, tags: ["posts"] },
  }).then(r => r.json());

  return <PostList posts={posts} />;
}
tsx
import { revalidateTag, revalidatePath } from "next/cache";

export async function createPost(formData: FormData) {
  "use server";
  await db.post.create({ data: { title: formData.get("title") as string } });
  revalidateTag("posts");
  revalidatePath("/blog");
}

Middleware

typescript
import { NextResponse } from "next/server";
import type { NextRequest } from "next/server";

export function middleware(request: NextRequest) {
  const token = request.cookies.get("session")?.value;

  if (request.nextUrl.pathname.startsWith("/dashboard") && !token) {
    return NextResponse.redirect(new URL("/login", request.url));
  }

  const response = NextResponse.next();
  response.headers.set("x-request-id", crypto.randomUUID());
  return response;
}

export const config = {
  matcher: ["/dashboard/:path*", "/api/:path*"],
};

Middleware runs at the edge before every matched request. Keep it lightweight.

Server Actions

tsx
"use server";

import { z } from "zod";
import { revalidatePath } from "next/cache";

const schema = z.object({
  email: z.string().email(),
  name: z.string().min(2).max(100),
});

export async function updateProfile(prevState: any, formData: FormData) {
  const parsed = schema.safeParse(Object.fromEntries(formData));
  if (!parsed.success) {
    return { errors: parsed.error.flatten().fieldErrors };
  }

  await db.user.update({
    where: { email: parsed.data.email },
    data: { name: parsed.data.name },
  });

  revalidatePath("/profile");
  return { success: true };
}

Anti-Patterns

  • Adding 'use client' to top-level layout or page components
  • Fetching data on the client when it can be done in a Server Component
  • Using useEffect for data fetching instead of Server Components or use()
  • Not wrapping slow async components with <Suspense>
  • Putting heavy logic in middleware (it runs on every matched request)
  • Ignoring loading.tsx and error.tsx conventions

Checklist

  • Server Components used by default; 'use client' only on interactive leaves
  • Data fetching happens in Server Components with proper caching
  • <Suspense> boundaries wrap independent async sections
  • loading.tsx and error.tsx exist for key routes
  • Middleware is lightweight and only handles auth/redirects/headers
  • Server Actions validate input with Zod before database writes
  • revalidateTag or revalidatePath called after mutations
  • Route groups and parallel routes used to organize complex layouts

© rohitg00, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/nextjs-mastery of rohitg00/awesome-claude-code-toolkit.

Open the folder on GitHubat commit ebdf1d5

Compare with similar skills

Nextjs Mastery next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Nextjs Mastery compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Nextjs Mastery this skillrohitg00/awesome-claude-code-toolkit2.7k—~1.2kAutomated safety check: PassApache-2.0
Sandbox Benchvercel/next.js143k—~4.1kAutomated safety check: PassMIT
Next Dev Loopvercel/next.js143k9 repos~2.3kAutomated safety check: PassMIT
Vercel Optimize Auditvercel-labs/agent-skills32k8 repos~4.3kAutomated safety check: PassNone
Supabase Development and Debuggingsupabase/agent-skills2.7k3 repos~3.6kAutomated safety check: PassMIT
AI SDKvercel-labs/ai-facts16820 repos~1.2kAutomated safety check: PassNone

Similar skills

  • Sandbox Bench

    vercel/next.js

    Official

    Benchmark React or Next.js changes on Vercel Sandbox VMs with paired A/B statistics: react PR/commit vs base, or Next.js PR/commit vs base, measured end-to-end through the bench/render-pipeline app…

    143k GitHub stars~4.1k tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Next Dev Loop

    vercel/next.js

    Official

    Verify Next.js runtime behavior after editing app code. An agent skill from vercel/next.js.

    143k GitHub starsUsed in 9 repos~2.3k tokens
    Productivity & AutomationAuto-check passed
  • Vercel Optimize Audit

    vercel-labs/agent-skills

    Official

    Runs a metrics-first audit of a deployed Vercel project, gating investigations on real signals to produce ranked, citation-backed cost and performance recommendations.

    32k GitHub starsUsed in 8 repos~4.3k tokens
    DevOps & CloudAuto-check passed
  • Official

    General Supabase skill for database, auth, Edge Functions, Realtime and storage work, plus client libraries, migrations, security audits, debugging and reading logs.

    2.7k GitHub starsUsed in 3 repos~3.6k tokens
    Backend & APIsAuto-check passed
  • AI SDK

    vercel-labs/ai-facts

    Official

    Answer questions about the AI SDK and help build AI-powered features.

    168 GitHub starsUsed in 20 repos~1.2k tokens
    AI & LLM EngineeringAuto-check passed
  • Chakra UI v3 Builder

    chakra-ui/chakra-ui

    Builds responsive, accessible Chakra UI v3 components and layouts, sets up Chakra in new or existing projects, and designs themes with tokens, semantic tokens and recipes.

    41k GitHub stars~3.1k tokensUpdated 2 days ago
    Frontend & DesignAuto-check passed

More from rohitg00/awesome-claude-code-toolkit

All 38 skills in this repo
  • Accessibility Wcag

    rohitg00/awesome-claude-code-toolkit

    Web accessibility patterns for WCAG 2.2 compliance including ARIA, keyboard navigation, screen readers, and testing

    2.7k GitHub stars~1.4k tokensUpdated 5 mo ago
    Auto-check passed
  • Agentkit SEO

    rohitg00/awesome-claude-code-toolkit

    Route broad or ambiguous AgentKit SEO work to the right module while keeping context scoped.

    2.7k GitHub stars~879 tokensUpdated 5 mo ago
    Auto-check passed
  • API Design Patterns

    rohitg00/awesome-claude-code-toolkit

    REST API design with resource naming, pagination, versioning, and OpenAPI spec generation

    2.7k GitHub stars~1.2k tokensUpdated 5 mo ago
    Auto-check passed
  • Authentication Patterns

    rohitg00/awesome-claude-code-toolkit

    Authentication and authorization patterns including OAuth2, JWT, RBAC, session management, and PKCE flows

    2.7k GitHub stars~1.4k tokensUpdated 5 mo ago
    Auto-check passed
  • AWS Cloud Patterns

    rohitg00/awesome-claude-code-toolkit

    AWS cloud patterns for Lambda, ECS, S3, DynamoDB, and Infrastructure as Code with CDK/Terraform

    2.7k GitHub stars~1.1k tokensUpdated 5 mo ago
    Auto-check passed
  • CI CD Pipelines

    rohitg00/awesome-claude-code-toolkit

    CI/CD pipeline patterns for GitHub Actions, GitLab CI, testing strategies, and deployment automation

    2.7k GitHub stars~1.1k tokensUpdated 5 mo ago
    Auto-check passed

Works with

Questions about Nextjs Mastery

What does Nextjs Mastery do?

Next.js 14+ App Router patterns including RSC, ISR, middleware, parallel routes, and data fetching. Nextjs Mastery is an agent skill from rohitg00/awesome-claude-code-toolkit.

How do I install Nextjs Mastery in Claude Code?

Run `npx skills add rohitg00/awesome-claude-code-toolkit --skill nextjs-mastery -a claude-code`. Or copy the skill folder (skills/nextjs-mastery in rohitg00/awesome-claude-code-toolkit) into .claude/skills/nextjs-mastery in your project. Claude Code loads it when a task matches its description.

How do I install Nextjs Mastery in Codex?

Run `npx skills add rohitg00/awesome-claude-code-toolkit --skill nextjs-mastery -a codex`. Or copy the skill folder (skills/nextjs-mastery in rohitg00/awesome-claude-code-toolkit) into .agents/skills/nextjs-mastery in your project. Codex loads it when a task matches its description.

Can I use Nextjs Mastery in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rohitg00/awesome-claude-code-toolkit --skill nextjs-mastery -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/nextjs-mastery, .gemini/skills/nextjs-mastery, .github/skills/nextjs-mastery and .opencode/skills/nextjs-mastery in your project.

What does Nextjs Mastery need to run?

SKILL.md names no scripts, command-line tools or credentials: Nextjs Mastery is instructions for the agent only.

Does Nextjs Mastery access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Nextjs Mastery safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Nextjs Mastery use?

Nextjs Mastery is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Nextjs Mastery use?

About 1.2k tokens (SKILL.md is roughly 4.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Nextjs Mastery?

Skills that share tags, products or a category with Nextjs Mastery: Sandbox Bench (vercel/next.js, 143k stars), Next Dev Loop (vercel/next.js, 143k stars), Vercel Optimize Audit (vercel-labs/agent-skills, 32k stars) and Supabase Development and Debugging (supabase/agent-skills, 2.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Nextjs Mastery?

rohitg00 (a GitHub user) maintains it in rohitg00/awesome-claude-code-toolkit, which has 2,685 GitHub stars. The repository holds 38 skills in this directory. The repository was last updated on May 12, 2026.

Source: rohitg00/awesome-claude-code-toolkit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.