nextjs
Skill2 starsChanged 4 months agoMITView on GitHub
Use to build production React applications with the App Router, Server Components, Route Handlers, caching, metadata, and deployment.
- Reads credentials
19 other projects use a version of this.
Adopted by
Most recently taken up by
- davidvornholt/mailboxtheir own version, first seen Oct 4, 2026
- fjerbi/claude-code-arsenaltheir own version, first seen Sep 28, 2026
- AvilaCarlosDev/openclaw-skillstheir own version, first seen Sep 19, 2026
- SnowBeatRain/skillstheir own version, first seen Sep 15, 2026
- conjure-3301/skillstheir own version, first seen Aug 17, 2026
- alexander-danilenko/cortex-ai-skillstheir own version, first seen Aug 3, 2026
Used with
Projects with it also use tailwind, shadcn-ui and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
nth5693Skilltailwind
Also in 3 projects that use this
akornmeierSkillshadcn-ui
Use when building React UIs with component libraries, implementing forms, dialogs, navigation, or data display. Use when user mentions shadcn, Radix UI, Base UI, or asks about accessible React components. Proactively suggest when building UI that would benefit from pre-built accessible components with Tailwind CSS styling.
Also in 3 projects that use this
VercelSkillreact
React renderer for json-render that turns JSON specs into React components. Use when working with @json-render/react, building React UIs from JSON, creating component catalogs, or rendering AI-generated specs.
Also in 3 projects that use this
Other versions19 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 19
- openai/plugins★ 7.3ksame name
- nth5693/gemini-kit★ 373same name
- faqndo97/ai-skills★ 33same name
- nimadorostkar/Claude-Skills-collection★ 28same name
- alexander-danilenko/cortex-ai-skills★ 16same name
- wpank/ai★ 11same name
- YepAPI/skills★ 8same name
- DongDuong2001/pudo-code-system★ 5same name
- leonvanzyl/claude-code-pro-workflow-demo★ 4same name
- Aver005/agent-skills★ 2same name
9 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository20 other files it gives its agents.
- anthropicSkill
- clerkSkill
- cloudflare-workersSkill
- dockerSkill
- fly-ioSkill
- github-actionsSkill
- neonSkill
- netlifySkill
- openaiSkill
- prismaSkill
- railwaySkill
- renderSkill
- resendSkill
- sentrySkill
- stripeSkill
- supabaseSkill
- tailwindcssSkill
- terraformSkill
- upstash-redisSkill
- vercelSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 17 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Use when: building a React app that needs SSR, static generation, APIs, or strong SEO.
- Distinctive: line 22
Use when: you want server-side data access with small client bundles.
- Distinctive: line 23
Don't use for: a static page that plain HTML or a small Vite app can handle more simply.
- Very specific: line 139
Only NEXT_PUBLIC_* environment variables are bundled for the browser.
- Very specific: line 140
Import server-only in modules that access credentials or privileged databases so client imports fail at build time.
“Common” is measured: kept by at least 6 in 10 of the 17 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Next.js - Skillship
Build full-stack React apps with file-based routing, Server Components by default, API endpoints, streaming, caching, and production deployment built in.
🧭 When to use this skill
- Use when: building a React app that needs SSR, static generation, APIs, or strong SEO.
- Use when: you want server-side data access with small client bundles.
- Don't use for: a static page that plain HTML or a small Vite app can handle more simply.
⚡ Quickstart
1. Create an app
npx create-next-app@latest my-app
cd my-app
npm run dev2. Know the App Router files
app/
layout.tsx # shared UI; root layout includes <html> and <body>
page.tsx # /
loading.tsx # Suspense fallback for this segment
error.tsx # client-side error boundary
blog/[slug]/page.tsx
api/posts/route.ts # /api/posts endpoint
public/ # static assets
proxy.ts # request proxy in Next.js 16+3. Fetch on the server by default
// app/posts/page.tsx - Server Component (no directive needed)
import "server-only";
export default async function PostsPage() {
const response = await fetch("https://api.example.com/posts");
if (!response.ok) throw new Error("Failed to load posts");
const posts = await response.json();
return <ul>{posts.map((post: { id: string; title: string }) => <li key={post.id}>{post.title}</li>)}</ul>;
}🧩 Common recipes
Recipe: Add client interactivity at the smallest boundary
// app/ui/counter.tsx
"use client";
import { useState } from "react";
export function Counter() {
const [count, setCount] = useState(0);
return <button onClick={() => setCount(count + 1)}>Count: {count}</button>;
}Adding
"use client"makes that file and its imported module graph part of the client bundle.
Recipe: Dynamic route (Next.js 16 async params)
// app/posts/[slug]/page.tsx
export default async function PostPage({
params,
}: {
params: Promise<{ slug: string }>;
}) {
const { slug } = await params;
return <h1>{slug}</h1>;
}Recipe: Route Handler
// app/api/posts/route.ts
export async function GET() {
const posts = await getPosts();
return Response.json(posts);
}
export async function POST(request: Request) {
const body = await request.json();
const post = await createPost(body);
return Response.json(post, { status: 201 });
}Route Handlers support GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS. They are not
cached by default. A route.ts and page.tsx cannot occupy the same route segment.
Recipe: Static metadata
// app/layout.tsx
import type { Metadata } from "next";
export const metadata: Metadata = {
title: { default: "Acme", template: "%s | Acme" },
description: "Acme application",
};Recipe: Keep secrets server-only
// lib/data.ts
import "server-only";
export async function getPrivateData() {
return fetch("https://api.example.com/private", {
headers: { authorization: `Bearer ${process.env.API_KEY}` },
});
}🚀 Ship to production
npm run buildpasses locally and production env vars are configured on the host.- Secrets stay server-side; only intentionally public values use
NEXT_PUBLIC_. "use client"appears only around interactive/browser-dependent UI, not whole layouts.loading.tsx,error.tsx, andnot-found.tsxcover expected states.- Metadata,
sitemap.ts,robots.ts, icons, and Open Graph images are configured. - Dynamic routes, Route Handler caching, and revalidation behavior are intentional.
🔐 Security & secrets
- Only
NEXT_PUBLIC_*environment variables are bundled for the browser. Never use that prefix for secrets. - Import
server-onlyin modules that access credentials or privileged databases so client imports fail at build time. - Authenticate and authorize inside Route Handlers and Server Actions close to the protected data.
🐛 Common errors & fixes
| Symptom | Likely cause | Fix |
useState or event-handler error | Component is still a Server Component | Add "use client" to the smallest interactive component |
| Secret is empty in client code | Non-public env vars are server-only | Move the operation to a Server Component/Handler |
| Dynamic param is a Promise | Next.js 16 async request API | Type params as a Promise and await params |
page.tsx and route.ts conflict | Same route segment owns both | Move the handler under app/api/... |
| Stale or unexpectedly dynamic data | Caching assumption is wrong | Set explicit caching/revalidation behavior and verify it |
📚 Sources
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

