SKILL: Đóng gói Kinh nghiệm Vận hành thành Code

SKILL không chỉ là tham khảo command. Nó là hướng dẫn vận hành cho AI Agents: khi nào dùng command, cái nào trước, field nào không nên đoán.

Oliver Kingsley

Oliver Kingsley

9 tháng 7 2026

SKILL: Đóng gói Kinh nghiệm Vận hành thành Code

Apidog cho doanh nghiệp

Triển khai tại chỗ

SSO & RBAC

Tuân thủ SOC 2

Khám phá Apidog Enterprise

Đây là chuỗi 10 phần chia sẻ cách Apidog phát triển Apidog CLI, công cụ command-line để test API và quản lý lifecycle API. Đọc theo thứ tự hoặc nhảy đến bài bạn quan tâm:

Tiêu đề Trọng tâm
1 Chúng tôi Xây 126 MCP Tools. Nhưng Không là Giải pháp Tốt nhất cho Agent Phát hiện vấn đề
2 Tại sao Chúng tôi Phát triển Apidog CLI Mới hoàn toàn Phát triển architecture
3 Quy tắc Vàng: CLI Tạo Facts, Model Hành động trên Facts Triết lý cốt lõi
4 agentHints: Dạy CLI Giao tiếp với Agents Structured output
5 SKILL: Đóng gói Kinh nghiệm Vận hành thành Code Kinh nghiệm vận hành
6 Con số Không Nói dối: 30% Ít Tool Calls, 25% Ít Tokens Kết quả định lượng
7 Từ PRD đến Testing Loop: Workflow Agent Hoàn chỉnh với Apidog CLI Tutorial thực tế
8 Tại sao CI/CD Compatibility Không thể Thiếu cho Agent Tools Góc nhìn DevOps
9 AI Branch: Thay đổi Project An toàn hơn với AI Agents Lớp bảo mật
10 Spec-First là Quá khứ. Chào Skill-First Tầm nhìn & tương lai

SKILL không chỉ là tham khảo command. Nó là hướng dẫn vận hành cho AI Agents: khi nào dùng command, cái nào trước, field nào không nên đoán, khi nào validate, khi nào read back.

CLI Độc Không Đủ

CLI commands cho Agent quyền thực thi.

Nhưng quyền không có judgment dẫn đến vấn đề:

Quyền CLI Rủi ro Không Judgment
Tạo test case Tạo trong project sai
Update test scenario Update không read back
Import steps Import không check structure hiện tại
Run tests Run không validate changes

Agents cần hơn commands. Cần judgment vận hành.


SKILL là gì?

SKILL là hướng dẫn vận hành viết cho AI Agents.

Không là:

Đó là:

Nội dung SKILL Mục đích
Khi nào dùng command Mapping loại task → command
Command nào trước Hướng dẫn sequence
Field nào không đoán Giới hạn an toàn
Khi nào validate Đặt quality gate
Khi nào read back Timing verification
Khi nào run tests Workflow confirmation

SKILL cho Agents judgment vận hành.


Cài đặt

SKILL là companion cho Apidog CLI:

# Install SKILL cho AI Agent
apidog skill install

Cài 8 companion Skills giúp Agents hiểu:


Tại sao SKILL Quan trọng: Hidden Workflows

Agent vẫn cần biết cách tasks nên được decompose thành execution flows cross-business.

Kinh nghiệm này không thể:

Hidden workflows và "business pitfalls" cần hướng dẫn explicit.


Ví dụ: Bảo trì Test Scenario

Xem bảo trì test scenario phức tạp.

Cách sai (Agent tự viết từ đầu):

Agent: "Tôi sẽ tạo structure test scenario thủ công"
Agent: Viết steps array hoàn chỉnh với assertions, extractors, processors
Result: Field errors, comparators sai, missing required fields
CLI: Reject write hoặc tạo scenario incomplete

Cách đúng (mã hóa trong SKILL):

Step Tại sao
1. Import existing steps từ endpoints hoặc test cases Không tự viết structure phức tạp
2. Read back structure hoàn chỉnh Thấy format imported thực
3. Make local modifications Work với base accurate
4. Validate before update Catch errors locally
5. Run scenario Verify behavior

SKILL không chỉ nói "có test-scenario update command."

Nó nói:

"Scenarios phức tạp không phù hợp để tự viết structure hoàn chỉnh từ đầu. Path ổn định hơn là import existing endpoint hoặc case steps, read back structure hoàn chỉnh, và make local modifications."

Commands Phía sau Hướng dẫn SKILL

Đây là commands SKILL hướng Agents dùng:

# Step 1: Import steps từ endpoints
apidog test-scenario import-steps <scenarioId> --project <projectId>   --source endpoint --ids <endpointIds> --sync manual

# Step 2: Read back với full detail
apidog test-scenario get <scenarioId> --project <projectId>   --with-case-detail

# Step 3: Update parts cụ thể (Agent generates update JSON)

# Step 4: Validate before update
apidog cli-schema validate test-scenario-update --file ./scenario-update.json

# Step 5: Execute update
apidog test-scenario update <scenarioId> --project <projectId>   --file ./scenario-update.json

# Step 6: Run verification
apidog run --project <projectId> --test-scenario <scenarioId>

SKILL nói Agent khi nào dùng mỗi commandtại sao.


Insight Chính: get--with-case-detail

SKILL nhấn mạnh:

"Dùng get--with-case-detail để lấy structure thực, không tưởng tượng case trong steps."

Tại sao quan trọng:

Không get--with-case-detail get--with-case-detail
Steps show IDs only Steps show full case structures
Agent không biết format internal Agent thấy assertion/extractor format thực
Agent đoán field names Agent work từ examples thực

Lấy structure thực ngăn updates dựa trên tưởng tượng.


Evolvability: SKILL Có thể Thay đổi

Apidog SKILL là kinh nghiệm vận hành evolvable và versionable.

Tại sao Quan trọng

Thách thức Giải pháp SKILL
CLI commands thay đổi SKILL có thể update để match
Users có personalized workflows SKILL có thể customize
Product features mới SKILL có thể extend
Workflow improvements SKILL có thể refine

Cách Hoạt động

Agents được cấp write permissions cho SKILL.

Nếu SKILL落后 hoặc khó dùng:

SKILL không là documentation frozen. Nó là operational code sống.


Lớp Compatibility

Chúng tôi học từ bugs thực:

Vấn đề phát hiện:

Một scenario steps, trong updates secondary, có outer steps update thành công, nhưng internal HTTP cases không được update đúng.

Root cause:

Giải pháp:

Constraint meaning được layer vào SKILL:

SKILL nói Agent dùng đúng commands. CLI handles product semantics phía sau commands. Agent không cần hiểu internal markers.


On-Demand Loading

SKILL follow principle giống cli-schema:

Complexity nên được absorb bởi execution và documentation, không expose đầy đủ cho model.

Alternative Vấn đề
Load tất cả SKILL vào context Token burden
Put tất cả rules trong --help Competes for attention
Viết vào prompt Không thể update

Cách SKILL:


SKILL vs. Documentation

Documentation SKILL
Cho humans đọc Cho Agents execute
Giải thích commands làm gì Giải thích khi nào dùng
Static reference Dynamic workflow
Comprehensive Task-focused
External to Agent Integrated với Agent

8 Companion Skills

Apidog cung cấp 8 companion Skills:

SKILL Coverage
Project management Projects, metadata, resources
API design Endpoints, schemas, definitions
Environment management Environments, variables
Test case creation Single-endpoint tests, assertions
Test scenario management Multi-step tests, import, update
Test suite organization Grouping, execution
Import/export workflows Data migration, backup
CI/CD integration Pipeline commands, reports

Each SKILL chứa:


Tiếp theo

Bây giờ chúng tôi established tất cả ba components cốt lõi:

Câu hỏi tiếp:

Có thực sự work? Con số là gì?

Trong Part 6, Con số Không Nói dối: 30% Ít Tool Calls, 25% Ít Tokens, chúng tôi sẽ share kết quả định lượng từ comparisons internal—và giải thích savings từ đâu.


Key Takeaways


Download Apidog để design, mock, test, và document APIs trong một workspace. Learn more về Apidog CLI cho command-line API testing, CI automation, và AI Agent workflows.

button

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