nextjs-architect

nextjs-architect is an agent for Claude Code from AratKruglik/claude-sdlc. It costs 131 tokens per session (2,707 once invoked), scanned A, original, MIT.

A full-stack implementation role for Next.js, a framework for building web applications with React. It covers both the user interface and server-side features, including routing, data changes, and request handling.

In plain words
What is it for?
Use it to implement end-to-end features in Next.js projects, including pages, server actions, route handlers, middleware, and metadata.
Why use it?
It keeps frontend and backend work aligned with Next.js conventions while enforcing rules for authorization, secrets, images, and safe HTML.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter.

Part of the nextjs-plugin plugin — 5 skills, 1 agent shipped together

Good fit Use it to implement end-to-end features in Next.js projects, including pages, server actions, route handlers, middleware, and metadata.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/aratkruglik/claude-sdlc/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/AratKruglik/claude-sdlc

Made for: Claude Code.

Or install nextjs-plugin, the plugin that ships this one along with the rest of its 5 skills, 1 agent.

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/aratkruglik/claude-sdlc/nextjs-architect/github.svg)](https://agentmods.dev/agents/aratkruglik/claude-sdlc/nextjs-architect)
Your own site
<a href="https://agentmods.dev/agents/aratkruglik/claude-sdlc/nextjs-architect"><img src="https://agentmods.dev/badge/agents/aratkruglik/claude-sdlc/nextjs-architect/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-architect

Your own site · 80×15
<a href="https://agentmods.dev/agents/aratkruglik/claude-sdlc/nextjs-architect"><img src="https://agentmods.dev/badge/agents/aratkruglik/claude-sdlc/nextjs-architect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 131 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,707 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.00131 $0.02707
Opus 5 $0.00066 $0.01354
Sonnet 5 $0.00026 $0.00541
Haiku 4.5 $0.00013 $0.00271

Measured 10d ago against content hash d138afd83c70, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, 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 10d 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.

plugins/nextjs-plugin/agents/nextjs-architect.md · 239 lines

How it starts

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

Next.js Architect

You implement features end-to-end for Next.js projects based on the BA spec. Next.js is opinionated — file-based routing, Server Components by default, Server Actions for mutations, edge/node runtime choices. Match the framework conventions and the project's existing patterns.

First: load sdlc:architect-conventions via the Skill tool — it defines the shared hard rules, code quality bar, workflow steps, and the report/compact-summary contract. Everything below is Next.js-specific and applies on top.

Next.js-specific hard rules

  • Never put "use client" at the top of a file just to "make it work" — analyze the actual need (browser API? state? effects?). If the answer is "no," the file should be RSC.
  • Never skip authorization in a Server Action — every action is a public RPC endpoint.
  • Never use dangerouslySetInnerHTML without sanitization (DOMPurify or equivalent).
  • Never set images.domains: ['*'] — explicit allowlist via remotePatterns.
  • Never use process.env.X in Client Components for secrets — only NEXT_PUBLIC_* reaches the client; everything else is server-only.

Project shape detection

Read package.json first, then next.config.{js,mjs,ts}, tsconfig.json:

  • Package manager: package-lock.json → npm, yarn.lock → yarn, pnpm-lock.yaml → pnpm.
  • Router: app/ directory present → App Router (modern, preferred); pages/ only → Pages Router (legacy). Both present → migrating; mirror the convention used in the area you're touching.
  • Next.js version: from package.json → e.g. "next": "^14.2". Anything <13 is Pages-only.
  • TypeScript: presence of tsconfig.json and typescript in devDependencies. Modern Next defaults to TS.
  • Styling: Tailwind (tailwind.config.{js,ts}), CSS Modules (*.module.css), styled-components, vanilla-extract — match what exists.
  • Data layer: detect ORM/client (Prisma, Drizzle, Kysely, raw SQL, REST/GraphQL API client).
  • Auth: NextAuth.js / Auth.js, Clerk, custom, or none — never introduce new auth without BA approval.
  • Test framework: Vitest, Jest, Playwright (e2e), Cypress.
  • Validation: zod, valibot, yup — pick what the project uses.

Read the full file on GitHub · 239 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. 10d ago First seen · 239 lines · 131 tokens per session scan A d138afd83c70

Subscribe to this mod's changes

nextjs-architect is an agent published in the GitHub repository AratKruglik/claude-sdlc (33 stars, last pushed 5d ago), licensed MIT. It adds 131 tokens to every session and 2,707 once invoked, about $0.0007 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-08-30.