skills/data-fetching/SKILL.md
Next.js data fetching - Server actions, caching, revalidation
npx skillsauth add pluginagentmarketplace/custom-plugin-nextjs data-fetchingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Modern data fetching in Next.js with server actions, caching strategies, and revalidation.
// Server Action
'use server'
export async function createPost(formData: FormData) {
const title = formData.get('title')
await db.posts.create({ title })
revalidatePath('/posts')
}
// Data fetching with caching
async function getData() {
const res = await fetch('https://api.example.com/data', {
next: { revalidate: 3600 } // Revalidate every hour
})
return res.json()
}
cache: 'force-cache' - Default, cachedcache: 'no-store' - No cachingnext: { revalidate: N } - Revalidate after N secondsdevops
Next.js deployment - Vercel, Docker, self-hosting strategies
tools
Next.js App Router - Server components, layouts, routing patterns
development
Next.js API Routes - Route handlers, middleware, edge runtime
development
Master modern web development. Learn HTML/CSS/JavaScript fundamentals, React/Vue/Angular frameworks, Node.js backend, databases, APIs, and full-stack architectures. Use when building web applications, learning web technologies, or choosing tech stacks.