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.
npx agentmods add agents/9j/rapidspec/nextjs-architecture-expertgit clone --depth 1 https://github.com/9j/RapidSpecWrote 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.
[](https://agentmods.dev/agents/9j/rapidspec/nextjs-architecture-expert)<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="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00042 | $0.01358 |
| Opus 5 | $0.00021 | $0.00679 |
| Sonnet 5 | $0.00008 | $0.00272 |
| Haiku 4.5 | $0.00004 | $0.00136 |
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 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.
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.
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>;
}
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.
- 4d ago First seen · 194 lines · 42 tokens per session scan A f96dfbd22463
nextjs-architecture-expert is an agent published in the GitHub repository 9j/RapidSpec (5 stars, last pushed 9mo ago), licensed MIT. It adds 42 tokens to every session and 1,358 once invoked, about $0.0002 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-31.
Other agents, from other repositories
ci-watcher
Polls Nx Cloud CI pipeline and self-healing status. Returns structured state when actionable. Spawned by /nx-cloud-ci-monitor command to monitor CI Attempt status.
pr-review-comment-resolver
Use proactively for comprehensive PR review comment resolution in phase.rs. Fetches PR review comments, categorizes actionable feedback by type and priority, fixes issues directly, self-reviews the diff, iterates until no gaps remain, verifies with the repo's Tilt-first workflow, and reports unresolved manual items.
trellis-check
Code quality check expert. Reviews code changes against specs and self-fixes issues.
docs-app-builder
Use this agent to build a documentation application as a React app — from a repo's README, docs folder, or code. Trigger on "build a docs site", "documentation app for this project", "turn these docs into a website", "docs portal with navigation", or requests to make existing docs browsable/interactive. Returns a…
fintech-frontend-engineer
Fintech frontend specialist. Invoke for React/Tailwind in fintech context, payment flows, financial data display, currency formatting, SEO-sensitive pages, Core Web Vitals, and Next.js App Router. Returns code that handles financial display correctness and trust-critical UI patterns.
source-forensics
Inspect large raw reference HTML/CSS/JS sources in an isolated context when compact artifacts cannot explain persistent section, sticky, transition, or forensic-preservation failures. Writes source-forensics.json for the main clone loop.