mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
2e753e236c
Two related skills for the `next dev` agentic workflow. They're paired: one establishes a shared session and view of the running app, and the other builds on it for a specific kind of work. **`next-dev-loop`** is the edit-then-verify rhythm during `next dev`. After making a change, the agent needs to know whether it actually works at runtime — not just whether it type-checks or compiles. The skill teaches the agent to use the two views Next.js exposes about itself: `/_next/mcp` (framework-side — routes, segments, RSC, server logs, errors) and `agent-browser` (browser-side — DOM, console, network, React fiber, vitals). The two views cross-check each other. The preflight is the load-bearing part. It opens a headed `agent-browser` session at the user's target URL with React DevTools enabled, then pauses — because the page might be behind a login wall or need specific state the user has to set up. Once the user confirms, the agent probes `/_next/mcp`, confirms Turbopack, and pulls the route map. Sibling skills can assume this setup is done. **`next-ppr-optimizer`** is the first sibling. It's the agentic loop for optimizing the static shell of a `cacheComponents` page: diagnose the shell, pick the highest-ROI refactor, apply it, confirm the shell grew. Two levers — push down (extract an I/O into a Suspense-wrapped child so the parent stays static; autonomous for trivial cases) or cache (wrap in `'use cache'` with a `cacheLife` profile chosen *with* the user — the skill never invents one). Diagnosis uses the suspense tree + `/__nextjs_original-stack-frames` for source resolution, with the H4 anti-pattern guardrail (one dominant boundary covering the viewport is not a push-down candidate; recurse inside it instead). <!-- NEXT_JS_LLM_PR -->
91 lines
1.1 KiB
Plaintext
91 lines
1.1 KiB
Plaintext
# build output
|
|
dist
|
|
!.github/actions/*/dist
|
|
.next
|
|
.next-profiles
|
|
target
|
|
packages/next/wasm/@next
|
|
tarballs/
|
|
packages/**/*.tgz
|
|
.errors/
|
|
|
|
# rust compiler crashes
|
|
rustc-ice-*.txt
|
|
|
|
# dependencies
|
|
node_modules
|
|
package-lock.json
|
|
yarn.lock
|
|
!/yarn.lock
|
|
test/node_modules
|
|
.pnpm-store/
|
|
.github/**/node_modules
|
|
|
|
# logs & pids
|
|
*.log
|
|
pids
|
|
*.cpuprofile
|
|
*.heapsnapshot
|
|
.next-profiles
|
|
|
|
# coverage
|
|
.nyc_output
|
|
coverage
|
|
|
|
# test output
|
|
test/**/out/*
|
|
test/**/next-env.d.ts
|
|
test/**/.next*
|
|
.DS_Store
|
|
/e2e-tests
|
|
test/tmp/**
|
|
test/.trace
|
|
test/traces
|
|
|
|
# Editors
|
|
**/.idea
|
|
**/.#*
|
|
.nvmrc
|
|
|
|
# examples
|
|
examples/**/out/*
|
|
|
|
# env
|
|
.env*.local
|
|
evals/.env
|
|
|
|
pr-stats.md
|
|
test-timings.json
|
|
|
|
# Vercel
|
|
.vercel
|
|
.now
|
|
|
|
# Cache
|
|
*.tsbuildinfo
|
|
.swc/
|
|
.turbo
|
|
|
|
# Storybook
|
|
*storybook.log
|
|
|
|
# Claude Code (local settings and session files)
|
|
.claude/settings.local.json
|
|
.claude/plans/
|
|
.claude/todos.json
|
|
.claude/worktrees
|
|
.claude/scheduled_tasks.lock
|
|
CLAUDE.local.md
|
|
|
|
# Conductor (worktrees created by Conductor app, but keep scripts/)
|
|
.conductor/*/
|
|
!.conductor/scripts/
|
|
|
|
index.scip
|
|
|
|
# Evals
|
|
evals/.tarballs/
|
|
evals/experiments/
|
|
evals/results/
|
|
evals/agent-results.json
|