本文へ移動
cccskills
無料GitHub で公開

nextjs-app-router

Ensure correct Next.js App Router architecture, rendering strategy, and data fetching. Use whenever working under /app — routing, layouts, server/client component boundaries, data fetching, Suspense, and Server Actions. Defaults to Server Components and adds 'use client' only for interactivity. Not for the Pages Router (/pages).

インストール方法を見る

含まれるファイル(1)

  • SKILL.md3.1 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Next.js App Router — Skill

Name: nextjs-app-router Purpose: Ensure correct App Router architecture, rendering strategy, and data fetching in Next.js. Use this skill whenever working under /app.

Applies when: Routing, layouts, server/client boundaries, data fetching, Suspense, Server Actions. Do not use when: Working in the Pages Router (/pages) or non-Next.js projects.

Rules

  • Server-first: Default to Server Components; add 'use client' only for interactivity or browser APIs.
  • Routing/layouts: Use layout.tsx for shared UI; keep layouts stable; use route groups (group) for organization.
  • Data fetching: Fetch in Server Components by default and colocate with usage.
  • Rendering strategy: Choose static, cached, or dynamic intentionally; avoid accidental dynamic rendering.
  • Client components: Keep them small, prop-driven, and avoid server data fetching inside them.
  • Suspense/streaming: Use <Suspense> for slow or user-specific UI.
  • Mutations: Prefer Server Actions and invalidate caches as needed.
  • Errors: Use error.tsx and not-found.tsx for route-level handling.

Workflow

  1. Decide server vs client boundaries first.
  2. Choose the rendering strategy (static/cached/dynamic).
  3. Fetch data in the closest Server Component.
  4. Isolate interactivity into small Client Components.
  5. Add Suspense boundaries for dynamic or slow UI.
  6. Use Server Actions for mutations and add error boundaries.

Checklists

Implementation checklist

  • Server Components used by default
  • Client Components are small and justified
  • Data fetching is colocated and not duplicated
  • Rendering strategy is explicit
  • Suspense isolates dynamic UI
  • Server Actions used for mutations

Review checklist

  • No accidental 'use client' on large trees
  • No server data fetching inside client-only components
  • Errors handled via error.tsx / not-found.tsx

Minimal examples

Server Component (default)

export default async function Page() {
  const data = await getData();
  return <View data={data} />;
}

Client Component (isolated)

"use client";

export function Button({ onClick }: { onClick: () => void }) {
  return <button onClick={onClick}>Click</button>;
}

Layout usage

export default function Layout({ children }: { children: React.ReactNode }) {
  return (
    <>
      <Header />
      {children}
    </>
  );
}

Common mistakes / pitfalls

  • Marking entire pages as 'use client'
  • Fetching server data in Client Components
  • Reading request data in shared/cached logic
  • Overusing route segment config instead of code-local controls
  • Mixing routing concerns with component UI logic

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Audit and fix accessibility in Core UI. Use when changing or reviewing buttons, links, forms, validation, dialogs, menus, tabs, tables, keyboard interactions, focus management, accessible names, announcements, contrast, touch targets, reduced motion, or WCAG/a11y behavior.

日本語の概要は準備中です。原文の説明を表示しています。

Asymmetric-al/core3812026年10月12日 更新

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.

日本語の概要は準備中です。原文の説明を表示しています。

Asymmetric-al/core3812026年10月12日 更新

Use when building any system where email content triggers actions — AI agent inboxes, automated support handlers, email-to-task pipelines, or any workflow processing untrusted inbound email. Always use this skill when the user wants to receive emails and act on them programmatically, even if they don't mention "agent" — the skill contains critical security patterns (sender allowlists, content filtering, sandboxed processing) that prevent untrusted email from controlling your system.

日本語の概要は準備中です。原文の説明を表示しています。

Asymmetric-al/core3812026年10月12日 更新

anim

無料

Tasteful, subtle web UI animation following Emil Kowalski / animations.dev principles. Use when adding or reviewing interface motion — hover and press feedback, entrances and exits, modals, toasts, menus, loading and skeleton states, staggered reveals, page or view transitions — so motion stays refined and purposeful, not decorative. Covers CSS, Web Animations, and React timing/easing. Pair with the motion skill for motion/react API specifics.

日本語の概要は準備中です。原文の説明を表示しています。

Asymmetric-al/core3812026年10月12日 更新

animate

無料

Build an animation from scratch, making the decisions in the order that determines whether it feels right — should it animate at all, what purpose, which tool, which properties, which curve and duration, how it interrupts, how it exits. Writes the implementation. Use when asked to animate something, add motion, make a component feel alive, or build a transition. For critiquing existing motion use review-animations; for auditing a whole codebase use improve-animations. Only runs when explicitly invoked; it does not trigger on its own.

日本語の概要は準備中です。原文の説明を表示しています。

Asymmetric-al/core3812026年10月12日 更新

Build animations for Expo and React Native only, using Reanimated, Gesture Handler, Expo Router, and expo-haptics. Use when the target runtime is an Expo or React Native app. Do not use it for Core Next.js web motion; use `animate` for web. Only runs when explicitly invoked; it does not trigger on its own.

日本語の概要は準備中です。原文の説明を表示しています。

Asymmetric-al/core3812026年10月12日 更新

Asymmetric-al のスキルをすべて見る

このスキルの問題を報告する