Chuyển tới nội dung chính
kitlocal.dev

Xây tính năng Next.js cùng coding agent

Cách làm có rào chắn: đặt quy tắc, cấp ngữ cảnh framework theo thời gian thực, kiểm tra ranh giới và xác minh trên trình duyệt thật.

Trước khi bắt đầu

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

Các bước

  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.

    Kiểm tra trước khi sang bước sau

    • 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.

    Kiểm tra trước khi sang bước sau

    • 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.

    Kiểm tra trước khi sang bước sau

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

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

    Kiểm tra trước khi sang bước sau

    • 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.

    Kiểm tra trước khi sang bước sau

    • The main flow works and the console is clean.

Kết quả mong đợi

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

Tài nguyên liên quan

  • AGENTS.md khởi đầu hướng dẫn coding agent build, test và thay đổi dự án Next.js App Router an toàn: lệnh chạy, ranh giới và điều không được làm khi chưa hỏi.

    Biên tậpKitLocalCập nhật Hôm kia

    agents-mdnextjsreactinstructions
Về danh mục này

Bản chụp đi kèm ứng dụng · xuất bản lúc 06:05 15 thg 11, 2026 · Phiên bản danh mục 5bc079fe355af2214bc0

Đang hiển thị bản chụp đi kèm ứng dụng (chưa cấu hình nguồn nội dung). Nguồn có thể đã có nội dung mới hơn.