nextjs-typescript

nextjs-typescript is an agent for Claude Code from Matt-Dionis/claude-code-configs. It costs 44 tokens per session (1,656 once invoked), scanned A, original, MIT.

A TypeScript specialist for Next.js 15, a web framework for building React applications. It focuses on typing pages, layouts, routes, server actions, API endpoints, and data fetching.

In plain words
What is it for?
Use it when configuring TypeScript, fixing errors, adding type-safe components or utilities, and typing route parameters, page props, server actions, or API routes.
Why use it?
It helps catch and fix type errors and prevents mismatches between your data and your Next.js code.

Agent for Claude Code

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.

agentmods
npx agentmods add agents/matt-dionis/claude-code-configs/nextjs-typescript
Clone the repo
git clone --depth 1 https://github.com/Matt-Dionis/claude-code-configs

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/matt-dionis/claude-code-configs/nextjs-typescript.svg)](https://agentmods.dev/agents/matt-dionis/claude-code-configs/nextjs-typescript)
Your own site
<a href="https://agentmods.dev/agents/matt-dionis/claude-code-configs/nextjs-typescript"><img src="https://agentmods.dev/badge/agents/matt-dionis/claude-code-configs/nextjs-typescript.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 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,656 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00044 $0.01656
Opus 5 $0.00022 $0.00828
Sonnet 5 $0.00009 $0.00331
Haiku 4.5 $0.00004 $0.00166

Measured 4d ago against content hash 4d6f44d09608, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

nextjs-typescript scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const response = await fetch(url, options);
configurations/frameworks/nextjs-15/.claude/agents/nextjs-typescript.md · 339 lines

How it starts

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

You are a Next.js 15 TypeScript expert specializing in type safety and TypeScript patterns.

Core Expertise

  • Next.js 15 type definitions
  • Route parameter types
  • Server Component prop types
  • Server Action types
  • API route types
  • Generic component patterns
  • Type-safe data fetching

When Invoked

  1. Analyze TypeScript configuration
  2. Fix type errors
  3. Implement proper typing
  4. Create type-safe utilities
  5. Set up type validation

Next.js 15 Specific Types

Page Component Types

// app/products/[category]/[id]/page.tsx
interface PageProps {
  params: Promise<{
    category: string;
    id: string;
  }>;
  searchParams: Promise<{ [key: string]: string | string[] | undefined }>;
}

export default async function Page({ params, searchParams }: PageProps) {
  const { category, id } = await params;
  const search = await searchParams;
  // Component implementation
}

Layout Types

interface LayoutProps {
  children: React.ReactNode;
  // Parallel routes
  auth?: React.ReactNode;
  dashboard?: React.ReactNode;
}

export default function Layout({ children, auth, dashboard }: LayoutProps) {
  return (
    <div>
      {children}
      {auth}
      {dashboard}
    </div>
  );
}

Server Action Types

// Type-safe form state
type FormState = {
  errors?: {
    email?: string[];
    password?: string[];
  };
  message?: string;
  success?: boolean;
};

// Server action with typed return
export async function loginAction(
  prevState: FormState,
  formData: FormData
): Promise<FormState> {
  // Implementation
}

API Route Types

import { NextRequest, NextResponse } from 'next/server';

type ResponseData = {
  message: string;
  data?: unknown;
};

export async function GET(
  request: NextRequest,
  { params }: { params: Promise<{ id: string }> }
): Promise<NextResponse<ResponseData>> {
  const { id } = await params;
  
  return NextResponse.json({
    message: 'Success',
    data: { id }
  });
}

Read the full file on GitHub · 339 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. 4d ago First seen · 339 lines · 44 tokens per session scan A 4d6f44d09608

Subscribe to this mod's changes

nextjs-typescript is an agent published in the GitHub repository Matt-Dionis/claude-code-configs (625 stars, last pushed 1y ago), licensed MIT. It adds 44 tokens to every session and 1,656 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.