Nếu bạn từng thử giới thiệu một công cụ AI mới vào quy trình làm việc của nhóm, bạn sẽ hiểu được nỗi đau: ma sát khi làm quen, các quy tắc tài liệu không rõ ràng, và một quy trình đánh giá dường như được thiết kế để thử thách sự kiên nhẫn của bạn. Sau thời gian sử dụng Cursor, tôi nhận thấy mình ngày càng dùng Claude Code nhiều hơn—kết quả của nó đơn giản là quá tốt để bỏ qua. Nhưng làm thế nào để đưa nó vào hoạt động trong một dự án thực tế? Đó là nơi thử thách thực sự bắt đầu.
Bài viết này chia sẻ một lời nhắc (prompt) và quy trình làm việc thực tế giúp giảm đáng kể rào cản khi áp dụng Claude Code, biến việc cập nhật tài liệu và chia sẻ kiến thức trở nên dễ dàng cho toàn bộ nhóm của bạn.
Những Ma Sát Thực Tế Khi Áp Dụng Công Cụ AI
Khi lần đầu nghe rằng Claude Code có thể “hiểu mã nguồn của bạn một cách trực quan và tăng tốc phát triển,” tôi đã rất hào hứng. Nhưng thực tế thì sao? Những trở ngại lớn nhất không phải là việc học công cụ—mà là tích hợp nó vào quy trình làm việc thực tế của chúng tôi. Đây là những gì đã khiến chúng tôi gặp khó khăn:
1. Cấu Trúc Tệp Không Rõ Ràng
- Các thành viên mới trong nhóm thường hỏi, “Trong thư mục
docs/
có gì vậy?”
2. Quy Tắc Cập Nhật Mơ Hồ
- Kết quả CI nên nằm trong README, hay trong
rules/troubleshooting.md
? Sự mệt mỏi khi đưa ra quyết định là có thật.
3. Quy Trình Đánh Giá Nặng Nề
- Pull request, người đánh giá, nhóm tài liệu… đôi khi mất nhiều thời gian để đánh giá một tài liệu hơn là viết nó.
Là kỹ sư, nhiệm vụ của chúng tôi là biến những điểm khó khăn này thành các hệ thống cụ thể, có thể lặp lại.
Giải Pháp: Lời Nhắc (Prompt) Claude Code Để Tự Động Hóa Tài Liệu
Để giải quyết những vấn đề này, tôi đã tạo một “lời nhắc thiết lập ban đầu” duy nhất cho Claude Code. Kết quả? Nó đã giảm đáng kể rào cản khi làm quen và khuyến khích nhiều nhà phát triển thực sự thử công cụ này. Đây là cốt lõi của lời nhắc và quy trình làm việc:
Quy Trình Làm Việc Với Lời Nhắc (Prompt) Claude Code Từng Bước
Bước 1: Khám Phá Tài Liệu Hiện Có
- Quét tất cả các tệp
.md
trong.cursor/rules/
,docs/
, và thư mục gốc của dự án. - Liệt kê từng tài liệu và mô tả mục đích của nó.
Bước 2: Cập Nhật CLAUDE.md
Với Các Quy Tắc Tự Động Hóa
- Thêm một phần mô tả hệ thống cập nhật tài liệu tự động.
- Liệt kê các tài liệu tham khảo chính cho những người đóng góp mới.
- Xác định các quy tắc cập nhật rõ ràng (khi nào đề xuất cập nhật, cách định dạng đề xuất, quy trình phê duyệt).
- Nhấn mạnh các ràng buộc (không bao giờ cập nhật nếu không có sự chấp thuận, chỉ thêm, không có bí mật, tuân thủ hướng dẫn về phong cách).
Bước 3: Đề Xuất Tài Liệu Còn Thiếu
- Phân tích cấu trúc và đề xuất các tài liệu mới (ví dụ:
patterns.md
,troubleshooting.md
). - Hỏi người dùng muốn tạo tệp nào, và tạo các mẫu ban đầu.
Bước 4: Xác Nhận Thiết Lập Và Ghi Nhật Ký Quá Trình
- Hiển thị tóm tắt về những gì đã được cấu hình và những tài liệu nào đã được tạo hoặc cập nhật.
- Tùy chọn, chạy một thử nghiệm để mô phỏng quy trình đề xuất cập nhật.
- Ghi lại thiết lập vào một tệp
setup-log.md
.
Các lời nhắc (prompt) hoàn chỉnh như sau:
Claude Code Initial Setup Prompt
Please follow the steps below to set up an interactive document update system for this project.
1. Explore Existing Documentation
Start by exploring the existing documentation in the project:
- All .md files in the .cursor/rules/ directory
- The docs/ directory (if it exists)
- Any *.md files in the root directory (e.g., README.md, CONTRIBUTING.md)
- Any other project-specific documentation directories
- List the documents you find and provide a brief description of their purpose.
2. Add to CLAUDE.md
Add the following content to the CLAUDE.md file. If the file already exists, keep the existing content and append the following section.
📚 Document Auto-Update System
This project uses a system that systematically manages knowledge gained during development and reflects it in existing documentation.
### Documents to Review
Before starting work, be sure to review the following documents:
[Generate the list based on the results of the document exploration]
Example:
- `.cursor/rules/coding-standards.md` - Coding Standards
- `.cursor/rules/architecture.md` - Architecture Design
- `docs/troubleshooting.md` - Troubleshooting Guide
### Update Rules
#### When to Propose Updates
Please propose document updates in the following situations:
1. **When resolving errors or problems**
2. **When discovering efficient implementation patterns**
3. **When establishing usage patterns for new APIs/libraries**
4. **When existing documentation is outdated or incorrect**
5. **When identifying frequently referenced information**
6. **When completing fixes from code reviews**
#### Proposal Format
💡 Document Update Proposal: [Describe the situation]
【Update Details】[Specify additions/changes]
【Update Candidates】
[File Path 1] - [Reason]
[File Path 2] - [Reason]
New File Creation - [Reason]
Where should this be added? (Select a number or skip)
#### Approval Process
1. User selects the target file for the update
2. Preview of the actual update is shown
3. User provides final approval (`yes` / `edit` / `no`)
4. Upon approval, the file is updated
### Coordination with Existing Documents
- Follow existing formatting and style conventions
- If related content exists, clearly reference it
- Include the date in YYYY-MM-DD format in the update history
### Important Constraints
1. **Do not update files without user approval**
2. **Do not delete or modify existing content—additions only**
3. **Do not record sensitive information (API keys, passwords, etc.)**
4. **Follow project-specific conventions and style guides**
### Document Splitting Strategy
To prevent `CLAUDE.md` from becoming too large, split files using the following guidelines:
- **If it exceeds 100 lines**: Suggest splitting related content into separate files
- **Recommended Splits**:
- `.cursor/rules/update-system.md` - Rules for the update system
- `.cursor/rules/project-specific.md` - Project-specific configurations
- `.cursor/rules/references.md` - List of documents to reference
- **Leave only a summary and links in `CLAUDE.md`**; place details in individual files
---
#### 3. Propose Recommended Document Structure
Based on analysis of the current document structure, suggest potentially missing documents:
📁 **Proposed Document Structure**
We recommend adding the following documents to this project:
[Suggest missing documentation based on the exploration results]
Example:
1. `.cursor/rules/patterns.md` - Implementation Patterns & Best Practices
→ Collect efficient code patterns
2. `.cursor/rules/troubleshooting.md` - Troubleshooting Guide
→ Systematize errors and solutions
3. `.cursor/rules/dependencies.md` - Dependencies & API Usage
→ Document usage of external libraries
4. `.cursor/rules/remote-integration.md` - Remote Repository Integration
→ Record best practices for Git workflows, branching strategy, PR/MR templates, CI/CD settings, etc.
Do you want to create these files? (Select numbers: "1,2" or "all" or "skip")
For the selected files, please create an initial template.
---
#### 4. Operation Confirmation
After completing setup, display the following message:
✅ Document auto-update system setup is complete!
**【Setup Details】**
- Added operational rules to `CLAUDE.md`
- [List of created documents]
**【Future Operation】
1. When new insights arise during work, update proposals will be made
2. Updates will be made only after your approval
3. Existing documentation formats will be followed, and knowledge will be accumulated systematically
Would you like to run a test? (Trigger a test error to verify the proposal flow)
---
#### 5. Log the Initial Setup
Finally, create a `setup-log.md` file under `.cursor/rules/` (or another appropriate location) to log the initial setup:
# Document Auto-Update System Setup Log
## Setup Date
[YYYY-MM-DD HH:MM]
## Actions Taken
1. Explored existing documentation
- [List of discovered files]
2. Added to `CLAUDE.md`
- Document reference list
- Update rules
- Approval process
3. Newly created documents
- [List of created files]
## Notes
[Include any special notes if necessary]
Please follow the steps above and confirm with the user at each stage.
Kết Nối Claude Code Với Apidog MCP Server: Quy Trình Làm Việc API Tối Ưu
Giờ đây, khi nhóm của bạn đã quen thuộc với các lời nhắc (prompt) của Claude Code, đã đến lúc đưa quy trình làm việc API của bạn lên một tầm cao mới với Apidog MCP Server. Đây là lý do tại sao sự kết hợp này là một yếu tố thay đổi cuộc chơi:
- Apidog MCP Server kết nối các thông số kỹ thuật API của bạn với các IDE được hỗ trợ bởi AI như Cursor và VS Code.
- Cho phép AI tạo, tìm kiếm và sửa đổi mã dựa trên thông số kỹ thuật API của bạn.
- Lưu trữ dữ liệu API cục bộ để truy cập cực nhanh.
Từng Bước: Cách Sử Dụng Apidog MCP Server Với Claude Code
Điều Kiện Tiên Quyết
- Đã cài đặt Node.js v18+
- Cursor, VS Code, hoặc bất kỳ IDE nào hỗ trợ MCP
Bước 1: Chọn Nguồn Dữ Liệu Của Bạn
- Dự án Apidog: Sử dụng trực tiếp các thông số kỹ thuật API của nhóm bạn
- Tài liệu API Trực tuyến: Kết nối với các tài liệu công khai được xuất bản qua Apidog
- Tệp OpenAPI/Swagger: Sử dụng các tệp cục bộ hoặc từ xa làm nguồn dữ liệu của bạn
Bước 2: Cấu Hình MCP Trong Cursor
- Mở Cursor, nhấp vào biểu tượng cài đặt, chọn "MCP", và thêm một máy chủ MCP toàn cầu mới.
- Dán cấu hình liên quan vào tệp
mcp.json
của bạn
Ví dụ để kết nối AI với Dự án Apidog trong Cursor:
{
"mcpServers": {
"API specification": {
"command": "npx",
"args": [
"-y",
"apidog-mcp-server@latest",
"--project=<project-id>"
],
"env": {
"APIDOG_ACCESS_TOKEN": "<access-token>"
}
}
}
}
Ví dụ để kết nối AI với tệp OpenAPI trong Cursor:
{
"mcpServers": {
"API specification": {
"command": "npx",
"args": [
"-y",
"apidog-mcp-server@latest",
"--oas=<oas-url-or-path>"
]
}
}
}
Bước 3: Xác Minh Kết Nối
Trong Cursor, chuyển sang Claude Code và hỏi:
Please fetch API documentation via MCP and tell me how many endpoints exist in the project.
Nếu AI trả về thông tin API của bạn, bạn đã sẵn sàng!
Tại Sao Các Nhà Phát Triển Đang Chuyển Sang Claude Code & Apidog MCP Server
- Đi sâu vào quy trình làm việc API liền mạch: Không còn sao chép-dán, không còn chuyển đổi ngữ cảnh.
- Tận hưởng việc tạo và cập nhật mã theo thời gian thực: Hãy để AI làm công việc nặng nhọc.
- Luôn kiểm soát: Tất cả dữ liệu là cục bộ, an toàn và riêng tư.
- Cộng tác với sự tự tin: Chia sẻ thông số kỹ thuật API, tài liệu và điểm cuối với nhóm của bạn.
- Quy trình làm việc chống lại tương lai: Cập nhật thường xuyên, khả năng tương thích rộng và hỗ trợ mạnh mẽ.
Trong thế giới phát triển API thay đổi nhanh chóng, Claude Code và Apidog MCP Server là những công cụ giúp bạn tập trung vào điều quan trọng—xây dựng phần mềm tuyệt vời.
Kết Luận: Làm Quen Thông Minh Hơn, Xây Dựng Nhanh Hơn
Thử thách làm quen là có thật, nhưng với lời nhắc (prompt) Claude Code phù hợp và sức mạnh của Apidog MCP Server, bạn có thể biến tài liệu từ một nút thắt cổ chai thành một lợi thế cạnh tranh. Các nhóm tự động hóa việc làm quen và kết nối quy trình làm việc API của họ với AI là những nhóm di chuyển nhanh nhất, chia sẻ kiến thức và xây dựng sản phẩm tốt hơn.
- Khắc phục các điểm khó khăn khi làm quen và giúp nhóm của bạn đóng góp nhanh hơn
- Đi sâu vào phát triển API liền mạch với Apidog MCP Server
- Tận hưởng một quy trình làm việc hiệu quả, cộng tác và chống lại tương lai
Đăng ký Apidog ngay hôm nay và trải nghiệm cấp độ tiếp theo của phát triển API. Tương lai đã đến—đừng bỏ lỡ.