Skip to content
Back to skills

Senior Nextjs

ASecurity

Use when designing, implementing, debugging, reviewing, or optimizing Next.js applications, App Router or Pages Router, React Server Components, Server Actions, route handlers, caching, rendering, SEO, authentication, or deployment.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 26, 2026
ai-agentsreactnextjsdebuggingapiperformance

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 26, 2026

npx -y skills add a365ngay/CogniRouter --skill senior-nextjs --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Senior Nextjs?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Senior Nextjs
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/a365ngay-senior-nextjs/badge)](https://www.skillsdirectory.com/skills/a365ngay-senior-nextjs)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: senior-nextjs
description: Use when designing, implementing, debugging, reviewing, or optimizing Next.js applications, App Router or Pages Router, React Server Components, Server Actions, route handlers, caching, rendering, SEO, authentication, or deployment.
---

# Senior Next.js

## Role

Build Next.js changes that choose server and client boundaries deliberately, protect data and secrets, preserve predictable caching and rendering behavior, and deliver accessible, performant experiences.

## Before Editing

1. Inspect the Next.js and React versions, router type, project configuration, deployment target, authentication model, API layer, data fetching, caching, middleware, styles, tests, and existing route conventions.
2. Identify the route's rendering mode, data ownership, cache/revalidation behavior, server-client boundary, authorization boundary, metadata/SEO impact, and error/loading states.
3. State a short plan. Do not mix App Router and Pages Router patterns or promote components to client components without a demonstrated browser-only need.

## Implementation Rules

- Default to Server Components and server-side data access. Add `'use client'` only at the smallest interactive leaf; pass serializable data across the boundary.
- Authenticate and authorize on the server for data access and mutations. Treat middleware as a routing optimization, not the sole enforcement point. Keep secrets, privileged queries, and internal errors server-side.
- Choose caching intentionally. Specify `fetch` cache behavior, route segment revalidation, tag invalidation, or dynamic rendering based on freshness and personalization requirements. Do not rely on defaults for sensitive or mutable data.
- Validate all mutation input on the server. Make Server Actions and route handlers handle authorization, idempotency where relevant, expected errors, and safe redirects.
- Use `loading`, `error`, `not-found`, suspense boundaries, and meaningful empty states to maintain a stable user experience. Avoid hydration mismatches and client-side waterfalls.
- Keep metadata, canonical URLs, structured data, robots rules, image optimization, and accessibility aligned with the route's product purpose.

## Performance and Verification

Avoid serial data fetching when parallelism is possible, oversized client bundles, unnecessary client state, and uncached duplicate queries. Run existing lint, type, test, and production build commands; inspect route behavior, permissions, cache invalidation, metadata, and loading/error paths affected by the change.

## Review Checklist

- Is server/client placement minimal and justified?
- Are cache, revalidation, personalization, and mutation semantics explicit?
- Are authorization and validation enforced where data or side effects occur?
- Does the route handle loading, error, not found, empty, and responsive accessibly?
- Did the change preserve the repository's router, deployment, and observability conventions?

Files in this skill

  • SKILL.md2.9 KB
  • agents/openai.yaml188 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.