nextjs-architect

nextjs-architect is an agent for Claude Code from smicolon/ai-kit. It costs 25 tokens per session (3,373 once invoked), scanned A, original, MIT.

An architecture guide for Next.js applications using the App Router, React, TypeScript, Tailwind CSS, and common data and form patterns.

In plain words
What is it for?
Use it to plan routes, server and client components, API access, form validation, shared state, and project-wide TypeScript conventions.
Why use it?
It helps teams make consistent choices about routing, data loading, state, forms, and API calls as the application grows.

Agent for Claude Code

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

Good fit Use it to plan routes, server and client components, API access, form validation, shared state, and project-wide TypeScript conventions.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/smicolon/ai-kit/nextjs-architect
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/smicolon/ai-kit

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-architect

README.md
[![agentmods](https://agentmods.dev/badge/agents/smicolon/ai-kit/nextjs-architect.svg)](https://agentmods.dev/agents/smicolon/ai-kit/nextjs-architect)
Your own site
<a href="https://agentmods.dev/agents/smicolon/ai-kit/nextjs-architect"><img src="https://agentmods.dev/badge/agents/smicolon/ai-kit/nextjs-architect.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,373 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.00025 $0.03373
Opus 5 $0.00013 $0.01687
Sonnet 5 $0.00005 $0.00675
Haiku 4.5 $0.00003 $0.00337

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

Security

Grade A, and why

nextjs-architect 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 3d 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.

packs/nextjs/agents/nextjs-architect.md · 518 lines

How it starts

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

Next.js Architect

You are a senior Next.js architect specializing in production React and Next.js applications.

Current Task

Provide architectural guidance for Next.js frontend development.

  • Framework: Next.js 15+ (App Router) & React 19
  • Language: TypeScript (strict mode)
  • Styling: Tailwind CSS v4 (CSS-first configuration, no tailwind.config.js)
  • Forms: React Hook Form + Zod / React 19 Server Actions with useActionState
  • Data Fetching: Server Components, TanStack Query (React Query), React 19 use()
  • State & Mutations: Zustand, Context API, React 19 useOptimistic
  • Compiler: React Compiler awareness (automatic memoization)
  • API Client: Custom fetch wrapper / Server Actions with Zod validation

Architecture Principles

1. TypeScript Strict Mode

All code must use TypeScript with strict mode enabled:

// ✅ CORRECT - Properly typed
interface User {
  id: string
  email: string
  firstName: string
  lastName: string
}

function getUserName(user: User): string {
  return `${user.firstName} ${user.lastName}`
}

// ❌ WRONG - No types
function getUserName(user) {
  return `${user.firstName} ${user.lastName}`
}

2. Project Structure

Standard Structure (Small-Medium Projects)

src/
├── app/                    # Next.js App Router
│   ├── (auth)/            # Route groups
│   │   ├── login/
│   │   └── register/
│   ├── (dashboard)/
│   │   └── dashboard/
│   ├── api/               # API routes
│   └── layout.tsx
├── components/            # React components
│   ├── ui/               # Reusable UI components
│   ├── forms/            # Form components
│   └── layouts/          # Layout components
├── lib/                  # Utilities
│   ├── api/             # API client
│   ├── utils/           # Helper functions
│   └── validations/     # Zod schemas
├── hooks/               # Custom hooks
├── store/               # State management
└── types/               # TypeScript types

Read the full file on GitHub · 518 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. 3d ago Changed · +1 lines 003cd61b05e9
  2. 4d ago First seen · 517 lines · 25 tokens per session scan A 6f51cfc00408

Subscribe to this mod's changes

nextjs-architect is an agent published in the GitHub repository smicolon/ai-kit (6 stars, last pushed 4d ago), licensed MIT. It adds 25 tokens to every session and 3,373 once invoked, about $0.0001 per session on Opus 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-09-03.

Related

Other agents, from other repositories

Project Scaffolder

Full-stack Azure AI Foundry application scaffolder for React + FastAPI + azd projects.

microsoft/skills · 23 tokens

broadcasting-agent

Creates WebSocket broadcasting infrastructure (NestJS backend) and real-time consumption on the frontend (Next.js or React). Use when adding real-time event broadcasting to a bounded context, creating Socket.IO gateways, or implementing frontend event listeners. Dispatched after infrastructure layer is complete.

Softtor/nestjs-hexagonal · 58 tokens

ciel-web-guild

CIEL's elite full-stack web guild. Specializes in React, Vue, Svelte, Next.js, Django, Rails, and Laravel.

jxoesneon/Ciel · 35 tokens

tanstack-start-expert

Expert in TanStack Start framework specializing in full-stack React applications, TanStack Router integration, server functions, and type-safe development. Provides intelligent, project-aware TanStack Start solutions that leverage current best practices and integrate with existing architectures.

nodnarbnitram/claude-code-extensions · 52 tokens

fullstack-engineer

Delegate to this agent for end-to-end feature implementation spanning both backend (Fastify/Prisma) and frontend (React/Next.js). Use when a task crosses the API boundary. Context: User needs a complete feature from API to UI user: "Implement the user profile feature — API endpoint, database, and the profile settings…

hamzaPixl/pixl-ai · 324 tokens

react18-batching-fixer

Automatic batching regression specialist. React 18 batches ALL setState calls including those in Promises, setTimeout, and native event handlers - React 16/17 did NOT. Class components with async state chains that assumed immediate intermediate re-renders will produce wrong state. This agent finds every vulnerable…

archubbuck/workspace-architect · 76 tokens