nextjs-server-components

nextjs-server-components is a skill for Claude Code from punkadillo/figma-code-composer. It costs 24 tokens per session (4,709 once invoked), scanned A, original, MIT.

Guidance for using Next.js Server Components, which run on the server and can fetch data before sending the page to the browser.

In plain words
What is it for?
Use it when building Next.js applications that fetch data or render pages with the App Router.
Why use it?
It helps keep data-heavy work on the server and avoid sending unnecessary code to users' browsers.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it when building Next.js applications that fetch data or render pages with the App Router.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/punkadillo/figma-code-composer/nextjs-server-components
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add punkadillo/figma-code-composer --skill nextjs-server-components
Clone the repo
git clone --depth 1 https://github.com/punkadillo/figma-code-composer

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nextjs-server-components

README.md
[![agentmods](https://agentmods.dev/badge/skills/punkadillo/figma-code-composer/nextjs-server-components.svg)](https://agentmods.dev/skills/punkadillo/figma-code-composer/nextjs-server-components)
Your own site
<a href="https://agentmods.dev/skills/punkadillo/figma-code-composer/nextjs-server-components"><img src="https://agentmods.dev/badge/skills/punkadillo/figma-code-composer/nextjs-server-components.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,709 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00024 $0.04709
Opus 5 $0.00012 $0.02354
Sonnet 5 $0.00005 $0.00942
Haiku 4.5 $0.00002 $0.00471

Measured 4d ago against content hash 7806ed26b2bb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

nextjs-server-components scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const buffer = await fetch(src).then(r => r.arrayBuffer());
.figma-pipeline/skills/nextjs-server-components/SKILL.md · 824 lines

How it starts

The opening of the file, as written. The whole thing — 824 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Next.js Server Components

Master Server Components in Next.js to build high-performance applications with server-side rendering and data fetching.

Server Components Basics

In Next.js App Router, all components are Server Components by default:

// app/posts/page.tsx (Server Component by default)
async function getPosts() {
  const res = await fetch('https://api.example.com/posts', {
    next: { revalidate: 3600 } // Cache for 1 hour
  });
  if (!res.ok) throw new Error('Failed to fetch posts');
  return res.json();
}

export default async function Posts() {
  const posts = await getPosts();

  return (
    <div>
      <h1>Blog Posts</h1>
      {posts.map((post: Post) => (
        <article key={post.id}>
          <h2>{post.title}</h2>
          <p>{post.content}</p>
          <span>{new Date(post.date).toLocaleDateString()}</span>
        </article>
      ))}
    </div>
  );
}

// Direct database access (server-only)
import { db } from '@/lib/db';

export default async function Users() {
  const users = await db.user.findMany({
    select: {
      id: true,
      name: true,
      email: true
    }
  });

  return (
    <div>
      {users.map(user => (
        <div key={user.id}>
          {user.name} - {user.email}
        </div>
      ))}
    </div>
  );
}

Server vs Client Components Decision Tree

// Use Server Components when:
// - Fetching data
// - Accessing backend resources directly
// - Keeping sensitive information on server
// - Keeping large dependencies on server

// Server Component (default)
export default async function ServerComp() {
  const data = await fetchData();
  return <div>{data}</div>;
}

// Use Client Components when:
// - Using interactivity (onClick, onChange, etc.)
// - Using state or lifecycle hooks (useState, useEffect)
// - Using browser-only APIs (localStorage, window, etc.)
// - Using custom hooks that depend on state/effects
// - Using React Context

// Client Component
'use client';
import { useState } from 'react';

export default function ClientComp() {
  const [count, setCount] = useState(0);

  return (
    <button onClick={() => setCount(count + 1)}>
      Count: {count}
    </button>
  );
}

// Composition: Server Component with Client Component
export default async function Page() {
  const data = await fetchData(); // Server-side

  return (
    <div>
      <ServerContent data={data} />
      <InteractiveButton /> {/* Client Component */}
    </div>
  );
}

Read the full file on GitHub · 824 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 824 lines · 24 tokens per session scan A 7806ed26b2bb

Subscribe to this mod's changes

nextjs-server-components is a skill published in the GitHub repository punkadillo/figma-code-composer (3 stars, last pushed 19d ago), licensed MIT. It adds 24 tokens to every session and 4,709 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

dev-engineer

Adds logic, state management, TypeScript types, and CRUD operations to UI. Works AFTER ui-first-builder creates the interface. Implements Zustand stores, form handling with React Hook Form + Zod, and prepares for backend connection. Triggers: add logic, add functionality, make it work, state management, form…

wasintoh/toh-framework · 75 tokens

kirby-forms-and-frontend-actions

Implements frontend forms and actions in Kirby (contact forms, file uploads, email with attachments, creating pages from frontend). Use when handling user input or building submission flows.

bnomei/kirby-mcp · 43 tokens

webapp-building

Build or modify production-oriented web applications by following the repository architecture and validating real user flows.

KunAgent/Kun · 22 tokens

ui-be-binding-skill

Use when binding backend/API data into an already-approved frontend UI without changing approved layout, copy, visual design, component hierarchy, or interaction states.

tamnguyendinh/Anvien · 35 tokens

monorepo-bootstrap

Scaffold a turborepo monorepo on pnpm workspaces, with shared packages (types, design tokens or shared UI, backend client). Three topologies, asked in Step 1: web+mobile (Next.js app AND an Expo + RN app — the classic case), web+agent (Next.js app + an eve agent in apps/agent, no mobile), or web-only (just the…

lukedj78/dev-flow · 234 tokens

ui-driven-spec

UI-first software development workflow for AI agents. Use when building apps UI-first, extracting specifications from existing prototypes, preparing backend implementation handoff from completed frontend components, or when asked to do "UI-driven development", "prototype-before-spec", "FE before BE", "extract…

tamnguyendinh/Anvien · 76 tokens