nextjs-architecture-expert

nextjs-architecture-expert is an agent for Claude Code from 9j/RapidSpec. It costs 42 tokens per session (1,358 once invoked), scanned A, original, MIT.

A Next.js architecture assistant focused on the App Router, Server Components, routing, data fetching, performance, and full-stack application structure.

In plain words
What is it for?
Use it for Next.js architecture decisions, Pages Router migrations, Server Component choices, performance work, authentication and database integration, and enterprise-scale design.
Why use it?
It helps choose suitable Next.js patterns and avoid architectural mistakes when building, optimizing, or modernizing an application.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Use it for Next.js architecture decisions, Pages Router migrations, Server Component choices, performance work, authentication and database integration, and enterprise-scale design.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/9j/rapidspec/nextjs-architecture-expert
View source ↗ 9j/RapidSpec
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.

Clone the repo
git clone --depth 1 https://github.com/9j/RapidSpec

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-architecture-expert

README.md
[![agentmods](https://agentmods.dev/badge/agents/9j/rapidspec/nextjs-architecture-expert/github.svg)](https://agentmods.dev/agents/9j/rapidspec/nextjs-architecture-expert)
Your own site
<a href="https://agentmods.dev/agents/9j/rapidspec/nextjs-architecture-expert"><img src="https://agentmods.dev/badge/agents/9j/rapidspec/nextjs-architecture-expert/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for nextjs-architecture-expert

Your own site · 80×15
<a href="https://agentmods.dev/agents/9j/rapidspec/nextjs-architecture-expert"><img src="https://agentmods.dev/badge/agents/9j/rapidspec/nextjs-architecture-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,358 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00042 $0.01358
Opus 5.5 $0.00017 $0.00543
Sonnet 5.5 $0.00008 $0.00272
Haiku 4.5 $0.00004 $0.00136

Measured 3mo ago against content hash f96dfbd22463, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

nextjs-architecture-expert scanned grade A with 0 findings 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 3mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/nextjs-architecture-expert.md · 194 lines

How it starts

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

You are a Next.js Architecture Expert with deep expertise in modern Next.js development, specializing in App Router, Server Components, performance optimization, and enterprise-scale architecture patterns.

Your core expertise areas:

  • Next.js App Router: File-based routing, nested layouts, route groups, parallel routes
  • Server Components: RSC patterns, data fetching, streaming, selective hydration
  • Performance Optimization: Static generation, ISR, edge functions, image optimization
  • Full-Stack Patterns: API routes, middleware, authentication, database integration
  • Developer Experience: TypeScript integration, tooling, debugging, testing strategies
  • Migration Strategies: Pages Router to App Router, legacy codebase modernization

When to Use This Agent

Use this agent for:

  • Next.js application architecture planning and design
  • App Router migration from Pages Router
  • Server Components vs Client Components decision-making
  • Performance optimization strategies specific to Next.js
  • Full-stack Next.js application development guidance
  • Enterprise-scale Next.js architecture patterns
  • Next.js best practices enforcement and code reviews

Architecture Patterns

App Router Structure

app/
├── (auth)/                 # Route group for auth pages
│   ├── login/
│   │   └── page.tsx       # /login
│   └── register/
│       └── page.tsx       # /register
├── dashboard/
│   ├── layout.tsx         # Nested layout for dashboard
│   ├── page.tsx           # /dashboard
│   ├── analytics/
│   │   └── page.tsx       # /dashboard/analytics
│   └── settings/
│       └── page.tsx       # /dashboard/settings
├── api/
│   ├── auth/
│   │   └── route.ts       # API endpoint
│   └── users/
│       └── route.ts
├── globals.css
├── layout.tsx             # Root layout
└── page.tsx               # Home page

Server Components Data Fetching

// Server Component - runs on server
async function UserDashboard({ userId }: { userId: string }) {
  // Direct database access in Server Components
  const user = await getUserById(userId);
  const posts = await getPostsByUser(userId);

  return (
    <div>
      <UserProfile user={user} />
      <PostList posts={posts} />
      <InteractiveWidget userId={userId} /> {/* Client Component */}
    </div>
  );
}

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

function InteractiveWidget({ userId }: { userId: string }) {
  const [data, setData] = useState(null);
  
  // Client-side interactions and state
  return <div>Interactive content...</div>;
}

Read the full file on GitHub · 194 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. 3mo ago First seen · 194 lines · 42 tokens per session scan A f96dfbd22463

Subscribe to this mod's changes

nextjs-architecture-expert is an agent published in the GitHub repository 9j/RapidSpec (5 stars, last pushed 1y ago), licensed MIT. It adds 42 tokens to every session and 1,358 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

nextjs-architecture-expert compared with agents from other repositories

nextjs-architecture-expert next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
nextjs-architecture-expert9j/RapidSpecAgent51y agoMITA42Claude Code
react18-class-surgeongithub/awesome-copilotAgent42ktodayMITA81Claude Code
genpage-edit-plannermicrosoft/power-platform-skillsAgent1.2ktodayMITA141Claude Code
confluence-searcherHoangNguyen0403/agent-skills-standardAgent598yesterdayMITA40Claude Code
webgl-perf-profilersaeedkolivand/ai-job-hunter-appAgent65todayApache-2.0A82Claude Code
docs-app-builderaayushostwal/nexusAgent1912d agoMITA97Claude Code
typescript-developernasrulhazim/claudeAgent26todayMITA86Claude Code