Coding Agent
Cập nhật: 02/2026
1. Tổng quan: Antigravity, Cursor, Claude Code
1.1 Điểm nổi bật chung
- Nổi bật với khả năng hoạt động độc lập (Agent), tự động đọc hiểu toàn bộ dự án, lên kế hoạch và thực thi chuỗi lệnh phức tạp.
- Hỗ trợ kết nối các MCP Server giúp Agent kết nối các external services/resources.
- Hỗ trợ Agent Skills - (reusable packages of knowledge) (new Open Standard): giúp Agent tiếp cận và giải quyết một loại tác vụ cụ thể, các tiêu chuẩn (convention) cần tuân thủ, hoặc cách dùng một công cụ cụ thể.
- Antigravity, Cursor đều tích hợp trình duyệt giúp chụp ảnh màn hình, kiểm thử ứng dụng, xác minh các thay đổi về giao diện, điều hướng trang, tương tác với các thành phần và lưu lại trạng thái trang hiện tại để phân tích. Claude hỗ trợ thông qua tiện ích mở rộng trình duyệt (Beta).
- Hỗ trợ Rules: thiết lập quy tắc giúp Agent hiểu rõ tiêu chuẩn dự án.
- Tự động tạo commit message.
1.2 Điểm nổi bật riêng
-
Antigravity - "AI trong IDE":
- Quản lý nhiều Agent chạy song song (Agent Manager/Mission Control).
- Tự động sinh artifacts: rich markdown files, diff views, architecture diagrams, images, browser recordings, code diffs, etc.
- Khả năng tự học/tích lũy ngữ cảnh dự án (Knowledge Retention).
- Fast/Plan Mode: lên kế hoạch cho tính năng, chờ duyệt và cho phép chỉnh sửa trước khi bắt đầu code.
- Workflows (series of steps) & Nested Workflows & Agent-Generated Workflows: giúp Agent tự động hoá các tác vụ lặp đi lặp lại.
-
Cursor - "AI trong IDE" + Cursor CLI:
-
Agent/Ask/Plan/Debug Mode:
Mode For Capabilities Tools Agent Complex features, refactoring Autonomous exploration, multi-file edits All tools enabled Ask Learning, planning, questions Read-only exploration, no automatic changes Search tools only Plan Complex features requiring planning Creates detailed plans before execution, asks clarifying questions All tools enabled Debug Tricky bugs, regressions Hypothesis generation, log instrumentation, runtime analysis All tools + debug server -
Commands (Workflows of Antigravity): giúp Agent tự động hoá các tác vụ lặp đi lặp lại.
-
BugBot: tự động rà soát pull request.
-
-
Claude Code - "AI làm thay bạn":
- Tính năng agentic search giúp hiểu rõ codebase mà không cần chỉ định thủ công.
- Auto-memory: Claude’s automatic notes and learnings.
- Default/Auto-accept/Plan Mode: lên kế hoạch cho tính năng, chờ duyệt và cho phép chỉnh sửa trước khi bắt đầu code.
- Tự động hóa onboarding: khởi tạo cấu hình dự án (CLAUDE.md) bằng lệnh /init, hoạt động như bộ nhớ trung tâm (chứa coding standards, architecture, libraries) và tự động load ở mọi session.
- Adaptive thinking: tự động phân bổ "suy nghĩ sâu" cho các logic khó.
1.3 Một số điểm so sánh khác
| Tính năng | Antigravity | Cursor | Claude Code | Khuyến nghị |
|---|---|---|---|---|
| Triết lý thiết kế | Dựa trên VS Code, hoạt động như "người đồng hành lập trình" => Tab & Navigation: tiên đoán mã và thao tác tiếp theo. | Dựa trên VS Code, hoạt động như "người đồng hành lập trình". => Tab & Navigation: tiên đoán mã và thao tác tiếp theo với tốc độ siêu nhanh. | Hoạt động như một "người cộng sự cấp cao", hỗ trợ lập trình toàn diện trên đa nền tảng: từ dòng lệnh (CLI/Terminal), ứng dụng Desktop, các IDE extensions, nền tảng web (claude.ai/code), Remote Control (IOS, Android), tích hợp Slack, và cả các hệ thống CI/CD (pipelines). | All |
| Kiểm soát an toàn (Undo / Reject & Accept) | ✅ Hỗ trợ Diff Preview để xem xét. | ✅ Hỗ trợ Diff Preview để xem xét. | ✅ Checkpointing tự lưu trước mọi thay đổi, hoàn tác bất kỳ lúc nào. | All |
| CLI | ⚠️ Chủ yếu hoạt động trong IDE, không có CLI riêng biệt. | ✅ Hỗ trợ CLI mạnh mẽ | ✅ Hỗ trợ CLI mạnh mẽ | Claude Code, Cursor |
| Plugin | ❌ | ✅ plugins package rules, skills, agents, commands, MCP servers, and hooks into distributable bundles. | ✅ plugins package rules, skills, agents, commands, MCP servers, and hooks into distributable bundles. | Claude Code, Cursor |
| Hooks | ❌ | ✅ Hoạt động khi các events do cursor cung cấp được kích hoạt, theo 3 hướng: Bảo mật (chặn, scan agent actions), Tự động hóa (format, retry, telemetry), Policy enforcement (đảm bảo agent tuân theo quy tắc của team/doanh nghiệp). | ✅ Hoạt động khi các events do claude cung cấp được kích hoạt, theo 3 hướng: Bảo mật (chặn, scan, agent actions), Tự động hóa (format, retry, telemetry), Policy enforcement (đảm bảo agent tuân theo quy tắc của team/doanh nghiệp). | Claude Code, Cursor |
| Subagents | ❌ | ✅ Giao phó tác vụ cho trợ lý chuyên biệt: dùng không gian ngữ cảnh độc lập, chạy song song để tiết kiệm thời gian, tùy chỉnh prompt/tools/model riêng, và dễ dàng tái sử dụng. | ✅ Giao phó tác vụ cho trợ lý chuyên biệt: dùng không gian ngữ cảnh độc lập, chạy song song để tiết kiệm thời gian, tùy chỉnh prompt/tools/model riêng, và dễ dàng tái sử dụng. | Claude Code, Cursor |
| Queued messages | ❌ | ✅ Tự động lưu lại các yêu cầu của người dùng và cho phép agent xử lý chúng theo thứ tự. | ✅ Tự động lưu lại các yêu cầu của người dùng và cho phép agent xử lý chúng theo thứ tự. | Claude Code, Cursor |
| Context summarization / compaction | ❌ | ✅ Tự động nén ngữ cảnh nhưng vẫn giữ nguyên được yêu cầu của người dùng giúp agent focus vào mục tiêu. | ✅ Tự động nén ngữ cảnh nhưng vẫn giữ nguyên được yêu cầu của người dùng giúp agent focus vào mục tiêu. | Claude Code, Cursor |
3. Đánh giá và đề xuất
| Công cụ | Phù hợp cho | Khi nào dùng |
|---|---|---|
| Cursor | Nhóm R&D, startup, kỹ sư cá nhân hoặc team nhỏ | Dự án nhỏ, không cần bảo mật quá cao, VSCode-based IDE, người dùng muốn học hỏi từ AI |
| Claude Code | Tổ chức lớn, DevOps, power users, người dùng cao cấp | Tác vụ lớn đa tệp, automation toàn bộ pipeline, CI/CD phức tạp, chấp nhận chi phí cao để đổi lấy khả năng agentic vượt trội, có kinh nghiệm và thích làm việc qua CLI. |
| GitHub Copilot | ❌ | ❌ |
| Tabnine | Doanh nghiệp lớn, yêu cầu bảo mật cao | Dự án nhạy cảm, IDE đa dạng, muốn kiểm soát mô hình AI |
- Nhiều lập trình viên dùng Cursor để coding hàng ngày, và Claude Code để xử lý tác vụ lớn, nặng. Đây là cách tận dụng “best of both worlds”.
4. Demo
4.1. Cursor
Tự động hoàn thành mã (Auto-complete Example)
// a + b
const sum = (a: number, b: number): number => {
return a + b;
};
// a - b
const subtract = (a: number, b: number): number => {
return a - b;
};
// a * b
const multiply = (a: number, b: number): number => {
return a * b;
};
// a / b
const divide = (a: number, b: number): number => {
return a / b;
};
// a % b
const modulo = (a: number, b: number): number => {
return a % b;
};
// a ^ b
const power = (a: number, b: number): number => {
return a ** b;
};
Auto Import
4.2. Claude Code
Issue to Pull Request
4.3. Both Cursor and Claude Code
Terminal Commands
Delete a installation file
Figma to Code using MCP
- Cursor
{
"mcpServers": {
"Framelink Figma MCP": {
"command": "cmd",
"args": [
"/c",
"npx",
"-y",
"figma-developer-mcp",
"--figma-api-key=YourFigmaKey",
"--stdio"
]
}
}
}
- Claude Code
claude mcp add "Framelink_Figma_MCP" --scope user -- cmd /c npx -y figma-developer-mcp --figma-api-key=YourFigmaKey --stdio
- Prompt
Create a pixel-perfect, responsive React application from this Figma design: https://www.figma.com/design-link
**Core Requirements:**
- Match colors, typography, spacing, and visual effects exactly
- Implement responsive design with mobile-first approach
- Build reusable TypeScript components with proper props
- Add basic hover states and interactions
**Technical Stack:**
- React with TypeScript and CSS (Grid, Flexbox)
- CSS modules or styled-components for styling
- Basic state management for interactive components
- Form validation
**Features:**
- Clean component architecture
- Responsive layout
Create a functional application that matches the original design.
Nhận biết ngữ cảnh, rà soát, tối ưu hóa, giải thích và viết tài liệu mã (đa tệp)
Please review all components in the source code. Analyze each component for potential improvements, performance optimizations, and best practices. Provide clear explanations of how each component works and add comprehensive documentation including comments, JSDoc annotations, and usage examples where appropriate. Focus on component architecture, reusability, and maintainability across the entire codebase.
Implement multiple languages (including Vietnamese and English) for all components in this project.
Writing Backend APIs
Create a backend API project for a hotel management system. Build a Node.js/Express application with TypeScript. Implement the following features:
**Core Entities:**
- Hotels (name, address, rating, amenities)
- Rooms (room number, type, price, capacity, availability, hotel_id)
- Bookings (guest info, check-in/out dates, total cost, room_id, hotel_id)
- Users (customers and staff with roles)
**API Features:**
- JWT authentication
- Role-based authorization (admin, staff, customer)
- Basic search and filtering (by location, price range, availability)
- Pagination for list endpoints
- Input validation
- API documentation with Swagger
**Database Design:**
- Use SQLite with Prisma ORM
- Implement foreign key relationships
- Basic database indexes
- Database file created automatically on first run
**Project Structure:**
- Separate concerns (controllers, services, models)
- Clean folder organization
Create a functional application that demonstrates good backend development practices.