跳转到主要内容
kitlocal.dev

Build a Next.js feature with a coding agent

A guard-railed way to build a Next.js feature with a coding agent: set the rules, give it live framework context, check boundaries, and verify in a real browser.

此资源仅提供英文版本。

开始之前

  • A Next.js App Router project you can run locally.
  • A coding agent that can read project instruction files and use MCP servers.

步骤

  1. Write the agent guide

    Add an AGENTS.md (or equivalent project instructions) with commands, server/client rules and what the agent must not do.

    继续之前请检查

    • The commands in the file actually run on your machine.
  2. Give the agent framework context

    Connect a Next.js-aware MCP server so the agent can consult current framework docs and your running app instead of relying on memory.

    继续之前请检查

    • The agent can answer a question about your Next.js version correctly.
  3. Implement in small steps

    Ask for one component or route at a time and review each diff before the next.

    继续之前请检查

    • Each diff is focused on the request.
  4. Review the server/client boundary

    Run the boundary review prompt on every new or moved component.

    继续之前请检查

    • No server-only import reaches a client component.
  5. Verify in a browser

    Exercise the feature in a real browser session and check the console for errors.

    继续之前请检查

    • The main flow works and the console is clean.

预期结果

A working feature with reviewed boundaries and browser-level verification.

相关资源

  • A starting AGENTS.md that tells coding agents how to build, test and change a Next.js App Router codebase safely: commands, boundaries and what never to do without asking.

    精选KitLocal更新于 前天

    agents-mdnextjsreactinstructions
关于此目录

内置快照 · 发布于 2026年11月15日 06:05 · 目录修订版 5bc079fe355af2214bc0

正在显示应用内置的快照(未配置内容来源)。来源处可能已有更新的内容。