Install
$ agentstack add skill-andrewsrigom-agent-skills-nextjs-performance-and-render-cost ✓ 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 Performance And Render Cost
Use this skill when the main problem is route performance, render cost, or startup weight in a Next.js app.
Scope
- route render cost
- client bundle and hydration weight
- excessive client boundaries
- dynamic rendering where static or cached work would be cheaper
- third-party script cost in Next.js routes
Routing cues
- slow App Router route, high TTFB, hydration cost, heavy client bundle, too many client components, route render cost, slow initial load -> use this skill
- if the main question is cache invalidation or fetch policy -> use
nextjs-data-fetching-and-cache - if the main question is runtime or request interception -> use
nextjs-rendering-runtime-and-middleware - if the main question is pure React rerender scope inside a client subtree -> use
react-render-performance-and-state-boundaries
Default path
- Keep the route server-first by default.
- Push
'use client'as low as possible in the tree. - Make expensive data reads static or cached when the product model allows it.
- Avoid broad client providers near the root unless they truly need to wrap the route.
- Audit third-party scripts and SDKs before micro-optimizing component code.
- Optimize the heaviest route segment or client boundary first.
When to deviate
- Accept a larger client surface only when the route is genuinely interaction-heavy.
- Keep a route dynamic only when personalization or rapidly changing data truly requires it.
- Stream partial UI only when it improves perceived latency instead of complicating the route for little gain.
Guardrails
- Server Components are cheaper than unnecessary Client Components.
- Large client boundaries near the root usually multiply hydration and rerender cost.
- Do not mark a route dynamic by habit.
- Third-party script and SDK cost is part of route performance, not somebody else’s problem.
Avoid
- adding
'use client'to large route segments for convenience - wrapping the whole app in client providers for one local feature
- keeping routes dynamic when the product model allows static or cached output
- optimizing tiny component details while shipping a heavy client graph
Verification checklist
- server vs client boundaries are justified
- route dynamic behavior is intentional
- bundle and hydration cost were considered
- largest route or boundary cost was targeted first
- the route got simpler or cheaper, not just more clever
Official references
- https://nextjs.org/docs/app/building-your-application/rendering
- https://nextjs.org/docs/app/building-your-application/data-fetching
- https://nextjs.org/docs/app/getting-started/server-and-client-components
References
- [Render cost defaults](./references/render-cost-defaults.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.