nextjs-performance
Next.js Performance
Overview
Audit and optimize Next.js applications for performance. Covers the SSR/SSG/ISR decision tree, image and font optimization, route segment caching, and bundle analysis. Stack-specific Tier 3 reference skill.
Workflow
-
Read project setup — Check
.chalk/docs/engineering/for architecture docs. Determine the Next.js version (App Router vs. Pages Router changes the entire optimization approach), deployment target (Vercel, self-hosted, edge), and data fetching patterns in use. -
Identify the scope — Parse
$ARGUMENTSfor specific pages or routes. If none specified, scanapp/orpages/for routes and identify the highest-traffic or most complex ones. -
Audit rendering strategy — For each route, apply the decision tree:
- Static (SSG): Content does not change between deploys? Use
generateStaticParams/getStaticProps. Best performance. - Incremental Static (ISR): Content changes periodically but not per-request? Use
revalidatewith an appropriate interval. Good balance. - Server (SSR): Content is personalized or changes every request? Use dynamic rendering. Ensure streaming with
loading.tsxor Suspense. - Client: Content depends on client-only APIs (localStorage, geolocation)? Use
"use client"components, but keep the boundary as low in the tree as possible.
- Static (SSG): Content does not change between deploys? Use
-
Audit caching configuration — Check for:
More from generaljerel/chalk-skills
python-clean-architecture
Clean architecture patterns for Python services — service layer, repository pattern, domain models, dependency injection, error hierarchy, and testing strategy
23create-handoff
Generate a handoff document after implementation work is complete — summarizes changes, risks, and review focus areas for the review pipeline. Use when done coding and ready to hand off for review.
16create-review
Bootstrap a local AI review pipeline and generate a paste-ready review prompt for any reviewer agent. Use after creating a handoff or when ready to get an AI code review.
15fix-findings
Fix findings from the active review session — reads reviewer findings files, applies fixes by priority, and updates the resolution log. Use after pasting reviewer output into findings files.
15fix-review
When the user asks to fix, address, or work on PR review comments — fetch review comments from a GitHub pull request and apply fixes to the local codebase. Requires gh CLI.
15review-changes
End-to-end review pipeline — creates a handoff, generates a review (self-review or paste-ready for another provider), then offers to fix findings. Use when you want to review your changes before pushing.
13