Install
$ agentstack add skill-andrewsrigom-agent-skills-nextjs-rendering-runtime-and-middleware ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Next.js Rendering Runtime and Middleware
Use this skill when the task is primarily about rendering model, runtime placement, or request interception before the route completes.
Scope
- Server Components vs Client Components as rendering boundaries
- static, dynamic, and streamed rendering choices
- route segment config and runtime selection
- Node.js vs Edge runtime tradeoffs
proxy.tsand matcher-based request interception- migration framing from legacy
middleware.tsnaming
Routing cues
- rendering mode, streaming, component runtime split, route segment config, Node vs Edge, or middleware / proxy questions -> use this skill
- data reads and cache invalidation as the primary concern -> use
nextjs-data-fetching-and-cache - mutation flow or Route Handlers as the primary concern -> use
nextjs-server-actions-and-route-handlers - metadata and sitemap surfaces as the primary concern -> use
nextjs-metadata-seo-and-file-conventions
Default path
- Read [references/rendering-runtime-and-proxy.md](./references/rendering-runtime-and-proxy.md) first.
- Decide the rendering boundary before adding
'use client'or Edge runtime flags. - Keep
proxy.tsnarrow and matcher-driven. Route endpoint logic elsewhere. - Choose runtime based on platform constraints, package support, and latency goals, not fashion.
When to deviate
- Add
'use client'only when state, effects, refs, or browser APIs force a client boundary. - Use Edge runtime only when latency, geography, or platform constraints justify the narrower compatibility surface.
- Reach for
proxy.tsonly when the request truly needs interception before the route completes. - Move to the data or server-boundary skills when rendering is no longer the main decision surface.
Quick example
export const runtime = 'edge'
Guardrails
- Server Components are the default. Client Components are an opt-in boundary.
- Do not use
proxy.tsas a general replacement for Route Handlers or app business logic. - The
middlewarefile convention is deprecated; useproxy.ts/proxy.jsterminology and file naming. - Edge runtime compatibility is narrower than Node.js. Verify package support before moving code there.
- Prefer explicit matcher rules and keep interception logic easy to reason about.
Avoid
- adding
'use client'high in the tree without a concrete runtime need - moving code to Edge because it sounds faster without checking compatibility
- using
proxy.tsas a dumping ground for business logic - mixing rendering guidance with mutation or cache policy advice unless that surface is truly dominant
Verification checklist
- server vs client boundaries are explicit and justified
- runtime choice is tied to real constraints, not habit
proxy.tsremains narrow and matcher-based- deprecated
middlewarenaming is not suggested for new work - the response routes out if cache or mutation concerns now dominate
Canonical surfaces
'use client'runtimepreferredRegionmaxDurationproxy.tsNextRequestNextResponse
Maintenance
- Snapshot date: 2026-04-03
- Package snapshot:
next@16.2.2 - Docs status snapshot: official docs now document
proxy.tsas the request-interception file convention and mark legacymiddlewarenaming as deprecated
References
- [Rendering runtime and proxy](./references/rendering-runtime-and-proxy.md)
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: andrewsrigom
- Source: andrewsrigom/agent-skills
- License: MIT
- Homepage: https://andrewsrigom.github.io/agent-skills/
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.