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
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.
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.
Dùng: Next.js DevTools MCPKiểm tra trước khi sang bước sau
- The agent can answer a question about your Next.js version correctly.
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.
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.
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.