Hướng Dẫn Nhanh Cho Người Mới Bắt Đầu Sử Dụng Code Claude

Oliver Kingsley

Oliver Kingsley

23 tháng 6 2025

Hướng Dẫn Nhanh Cho Người Mới Bắt Đầu Sử Dụng Code Claude

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.

💡
Trước khi đi sâu vào các lời nhắc (prompt) của Claude Code và quy trình làm quen, hãy tăng cường toàn bộ vòng đời API của bạn với Apidog—một công cụ phát triển API tất cả trong một để thiết kế, kiểm thử, tạo tài liệu, và giả lập API. Đây là người bạn đồng hành hoàn hảo cho bất kỳ ngăn xếp phát triển nào được hỗ trợ bởi AI.
nút

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

2. Quy Tắc Cập Nhật Mơ Hồ

3. Quy Trình Đánh Giá Nặng 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ó

Bước 2: Cập Nhật CLAUDE.md Với Các Quy Tắc Tự Động Hóa

Bước 3: Đề Xuất Tài Liệu Còn Thiếu

Bước 4: Xác Nhận Thiết Lập Và Ghi Nhật Ký Quá Trình

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:

Từng Bước: Cách Sử Dụng Apidog MCP Server Với Claude Code

Điều Kiện Tiên Quyết

Bước 1: Chọn Nguồn Dữ Liệu Của Bạn

Bước 2: Cấu Hình MCP Trong Cursor

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

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.

nút

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.

Đă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ỡ.

nút

Thực hành thiết kế API trong Apidog

Khám phá cách dễ dàng hơn để xây dựng và sử dụng API