AI agent có thể đọc repository, gọi công cụ và viết mã, nhưng vẫn thiếu những quy ước làm cho kết quả dùng được trong một nhóm: thay đổi này cần kiểm tra gì, đầu ra đặt ở đâu, đến bước nào phải dừng? Agent Skills đóng gói phần tri thức quy trình đó để tái sử dụng, thay vì giải thích lại trong từng cuộc hội thoại.
Bài viết đi từ kiến trúc đến chi phí và giới hạn bảo vệ. Câu hỏi cần trả lời là: hướng dẫn được chọn có giúp hoàn thành một công việc cụ thể, trong quyền hạn và điều kiện thực tế của môi trường hay không?
An AI agent can inspect a repository, call tools and produce code, yet still miss the conventions that make the result useful to a team. Which checks matter for this change? Where should the output go? When should the agent stop and ask? Agent Skills package that procedural knowledge so it can be reused instead of reconstructed in every conversation.
This article examines the architecture behind skills, their relationship to tools and MCP, and the tradeoffs in context, cost and safety. The useful question is not how many skills an agent has installed, but whether the selected guidance improves a specific task under the permissions and constraints of its environment.
Trong bài nàyOn this page
- 1. Kiến trúc agent và tri thức quy trình1. Agent architecture and procedural knowledge
- 2. Prompt, skill, tool và MCP2. Prompt, skill, tool and MCP
- 3. SKILL.md và progressive disclosure3. SKILL.md and progressive disclosure
- 4. Chi phí context, caching và cách đo4. Context costs, caching and measurement
- 5. Permissions, sandbox và hooks5. Permissions, sandbox and hooks
- 6. Áp dụng trong VAS và checklist6. VAS workflows and a deployment checklist
1. Kiến trúc agent và tri thức quy trình1. Agent architecture and procedural knowledge
Skill là một gói có thể đọc và kiểm tra, không phải một mô hình được huấn luyện riêng. Anthropic mô tả cách đóng gói hướng dẫn, scripts và tài nguyên để agent khám phá và nạp khi cần trong bài giới thiệu kiến trúc ban đầu.
Đặc tả Agent Skills yêu cầu SKILL.md gồm YAML frontmatter với name, description và phần hướng dẫn Markdown. Scripts, references, assets là tùy chọn. Category và tags của VAS là quy ước catalog bổ sung.
Mô tả là điểm định tuyến: nó cần nói rõ công việc và điều kiện áp dụng. Thân bài trình bày quyết định, bước thực hiện và tiêu chí hoàn tất. Tệp hỗ trợ chứa những chi tiết chỉ cần đọc trong một số trường hợp. Đóng gói tốt giúp nhìn thấy giả định, đầu vào, đầu ra và điều kiện dừng.
Ví dụ, một skill debug nên giúp phân biệt bằng chứng với giả thuyết hợp lý. Chỉ liệt kê một chuỗi lệnh dài chưa giải quyết được điều đó. Hướng dẫn mơ hồ có thể dẫn đến hành động mơ hồ; vì vậy chất lượng quy trình cần được đánh giá cùng chất lượng kết quả.
A skill is an inspectable package, not a separate trained model. Anthropic introduced the approach as folders of instructions, scripts and resources that an agent can discover and load dynamically. Its engineering article describes the package as a way to share procedural expertise. Read the original architecture explanation.
The Agent Skills specification requires a SKILL.md file with YAML frontmatter and Markdown instructions. The required metadata fields are name and description; scripts, references and assets are optional. Additional catalog conventions, such as VAS categories and tags, should be distinguished from the portable format.
The description is a routing interface: it should explain the task and the conditions under which the guidance applies. The body supplies decisions, steps and completion criteria. Supporting files carry details that would otherwise obscure the main workflow.
A useful package therefore makes assumptions visible. It names prerequisites, identifies inputs and outputs, and explains what counts as success. A debugging skill, for example, should help an agent distinguish evidence from a plausible explanation, rather than simply prescribe a long sequence of commands. This is knowledge organization with operational consequences: ambiguous instructions can become ambiguous actions.
- Mục tiêu và tiêu chí nghiệm thuIntent and acceptance criteria
- Điều phối tác vụ và mô hìnhTask orchestration and model
- Tri thức quy trình: skill và tài liệuProcedural knowledge: skills and references
- Công cụ local hoặc kết nối MCPLocal tools or MCP connections
- Danh tính, quyền và môi trường thực thiIdentity, permissions and execution environment
- Đầu ra, bằng chứng và quan sátOutputs, evidence and observability
2. Prompt, skill, tool và MCP2. Prompt, skill, tool and MCP
Tool cung cấp thao tác; skill hướng dẫn lựa chọn và phối hợp thao tác. MCP chuẩn hóa giao tiếp giữa host, client và server cung cấp tools, resources hoặc prompts; không quy định toàn bộ cách điều phối mô hình. Xem kiến trúc MCP, bản 2026-07-28.
Một skill lập báo cáo có thể giải thích định nghĩa doanh thu đã được thống nhất, trong khi MCP cung cấp kết nối dữ liệu. Skill review có thể hướng dẫn ưu tiên phát hiện, còn công cụ local đọc diff và chạy test. Cài skill không tự cấu hình dịch vụ, đăng nhập hay cấp quyền sử dụng các kết nối đó.
Hướng dẫn repository xác định quy ước dự án; skill đóng gói một quy trình hẹp hơn; ứng dụng và hạ tầng thực thi quyền. Phân định trách nhiệm giúp cập nhật đúng chỗ. Sao chép mọi quy tắc dự án vào mọi skill dễ tạo ra những phiên bản hướng dẫn mâu thuẫn.
Tools, MCP and skills address different parts of an agent workflow. A tool exposes an operation. A skill explains a procedure for choosing and combining operations. MCP defines communication between a host application, its clients and servers that expose capabilities such as tools, resources and prompts. See the MCP architecture.
They can work together. A reporting skill might explain the approved definition of revenue while an MCP server supplies database access. A review skill might describe how to prioritize findings while local tools read the diff and run selected checks. Neither arrangement means that installing the skill automatically configures a service or grants access to it.
This distinction also helps with deployment. Repository instructions establish local working conventions; a reusable skill packages a narrower workflow; permissions determine what the host allows. Keep these responsibilities explicit. Repeating every project rule in every skill makes updates harder and can create conflicting instructions. Prefer a clear division of ownership, with references to the authoritative project guidance where appropriate.
| Thành phầnComponent | Ví dụ đóng gópExample contribution |
|---|---|
| Prompt | Yêu cầu hiện tại, phạm vi và đầu ra mong muốn.The current request, scope and expected result. |
| Skill | Quy trình tái sử dụng, điều kiện áp dụng và tiêu chí dừng.A reusable procedure, use conditions and stopping criteria. |
| Tool | Thao tác cụ thể như đọc diff hoặc chạy test.An operation such as reading a diff or running tests. |
| MCP | Giao tiếp với server cung cấp khả năng đã cấu hình.Communication with a server exposing configured capabilities. |
3. SKILL.md và progressive disclosure3. SKILL.md and progressive disclosure
Hướng dẫn tích hợp client mô tả nạp skill theo nhu cầu. Đường dẫn discovery, cách kích hoạt và quản lý context phụ thuộc ứng dụng.
Không nên giả định nội dung đã đọc tự mất khi xong bước; vòng đời context do ứng dụng quản lý. Kiểm tra riêng việc nhận diện gói và thực thi đúng. Mẫu dưới đây chỉ minh họa, không thêm skill vào VAS.
The client integration guide describes loading skills on demand. Discovery paths, activation and context management depend on the host.
Do not assume read content disappears after a stage; the host manages its lifecycle. Test discovery separately from execution. The example below illustrates a package; it does not add a VAS skill.
- Khám phá: tên và mô tả giúp chọn gói.Discovery: names and descriptions support selection.
- Kích hoạt: đọc hướng dẫn SKILL.md.Activation: read the SKILL.md instructions.
- Tra cứu: mở tài nguyên được tham chiếu khi cần.Lookup: open referenced resources when needed.
---
name: change-review
description: Review a proposed repository change against its requirements and retain evidence for actionable findings.
---
# Review a proposed change
1. Read the project instructions and agreed scope.
2. Inspect the diff and identify the behavior being changed.
3. Choose checks that exercise that behavior.
4. Report findings with evidence and distinguish checks not run.
5. Stop before publishing or changing access unless authorized.
Mẫu minh họa không chạy mã. Chỉ thêm scripts hoặc references khi workflow cần chúng và mô tả rõ cách dùng.This illustrative package executes no code. Add scripts or references only when the workflow needs them, with clear instructions for their use.
4. Chi phí context, caching và cách đo4. Context costs, caching and measurement
Chi phí đến từ hướng dẫn bắt buộc, tài liệu hỗ trợ, đầu ra công cụ và những hành động mà quy trình yêu cầu. Skill ngắn vẫn có thể tốn kém nếu khiến agent khám phá quá rộng, build lặp lại hoặc kiểm tra những phần không liên quan.
Ghi chép refactor của Postman ước tính theo khoảng 4 ký tự/token: giảm tối đa khoảng 2.800 token mỗi lần kích hoạt postman-context và 840 cho generate-spec nhờ chuyển nội dung sang references tùy chọn. Đây là ước tính kích thước hướng dẫn, không phải benchmark latency hay cache. Xem case Postman.
Caching là cơ chế khác. Anthropic mô tả so khớp chính xác tiền tố prompt và thời hạn cache; hiệu quả phụ thuộc request, cấu hình và giá của mô hình. Mô tả skill ổn định không bảo đảm cache hit hoặc một tỷ lệ tiết kiệm cố định. Xem tài liệu prompt caching.
Preprint Agent Skills Can Be Harmful ghi nhận kiểm tra quá mức ở 67/182 trường hợp suy giảm hiệu suất đã được chọn để phân tích. Thiết lập dùng OpenCode 1.15.1, Claude Opus 4.6 và các so sánh trên SkillsBench, SWE-Skills-Bench. Mẫu regression này không đo tỷ lệ lỗi của toàn bộ skill. Xem nghiên cứu và giới hạn.
Để đánh giá quy trình của mình, dùng những tác vụ tương đương có và không có hướng dẫn. Giữ ổn định đầu vào, phiên bản mô hình, quyền và môi trường; chạy lặp để thấy biến thiên. Ghi cả độ đúng, thời gian, token và thao tác ngoài dự kiến. Ít token hơn chỉ có ý nghĩa khi vẫn đạt yêu cầu.
Sổ đo dưới đây là gợi ý thiết kế thí nghiệm, chưa phải số liệu VAS. Tách token đầu vào, cache read/write và đầu ra theo báo cáo của nhà cung cấp; không cộng số liệu có đơn vị khác nhau thành một “điểm hiệu quả”.
Cost has several causes: mandatory instructions, supporting material, tool output and the actions those instructions induce. A short skill can still be expensive if it sends the agent through unnecessary exploration, repeated rebuilds or broad verification.
Postman's plugin refactoring notes estimate savings using roughly four characters per token: up to about 2,800 tokens per activation for postman-context and 840 for generate-spec, after moving material into optional references. These are estimates for those workflows, not measured latency or cache improvements. Read the Postman case study.
Prompt caching is a separate mechanism. Anthropic documents exact prompt-prefix matching and cache lifetimes; savings depend on requests, configuration and model pricing. A stable skill description does not guarantee a cache hit or a fixed reduction in the total bill. See prompt caching requirements.
There is also evidence that procedure can dominate overhead. The preprint Agent Skills Can Be Harmful identifies excessive verification in 67 of 182 selected efficiency regressions. Its setup uses OpenCode 1.15.1 and Claude Opus 4.6 with SkillsBench and SWE-Skills-Bench comparisons. That selected regression dataset does not measure how often all skills cause harm. Read the study and its limitations.
For your own workflow, compare equivalent tasks with and without the guidance. Keep inputs, model version, permissions and environment fixed, and repeat trials to observe variation. Record correctness, time, token usage and unexpected actions. Judge the outcome alongside the cost; fewer tokens are not an improvement if the required result is missing.
The ledger below illustrates an experiment design, not VAS measurements. Report input, cache-read, cache-write and output usage separately, following the provider’s units. Do not collapse different units into a single efficiency score.
Illustrative measurement ledger (not benchmark results)
Compare: equivalent task without skill / with skill
Record separately:
- task correctness and completeness
- catalog metadata and activated instructions
- supporting files and tool output loaded
- input, cache-read, cache-write and output tokens
- elapsed time, tool calls and repeated verification
- unexpected actions and checks not completed
Estimated charge = sum(usage category * applicable unit price)
Use the provider's billing units; do not count cached tokens twice.
5. Permissions, sandbox và hooks5. Permissions, sandbox and hooks
Hướng dẫn truyền đạt chính sách; việc chặn thao tác cần cơ chế thực thi bên ngoài văn bản. Trước khi chạy scripts tải về, đọc mã và phụ thuộc, giới hạn truy cập thông tin xác thực và chọn quyền phù hợp với công việc. Giấy phép giải quyết quyền phân phối, không chứng nhận script an toàn.
Đặc tả đánh dấu allowed-tools là thử nghiệm; cách xử lý phụ thuộc host. Trường này không phải sandbox di động và không vượt quyền ứng dụng. Xem định nghĩa trường.
Hooks của Claude Code gắn với vòng đời riêng của ứng dụng, như UserPromptSubmit, PreToolUse, PostToolUse. Cần cấu hình và kiểm tra handler; command hook chạy với quyền của người dùng. Skill không tự tạo cổng chữ ký số hay bảo vệ tuyệt đối. Xem tài liệu hooks.
Một kiến trúc kiểm soát cần phân biệt ba việc: hướng dẫn đề nghị kiểm tra; ứng dụng quyết định cho phép, hỏi hay từ chối; môi trường thực thi giới hạn tệp, mạng và thông tin xác thực theo cấu hình. Sandbox không tự xuất hiện khi có SKILL.md.
Với thao tác có hậu quả như xuất bản, xóa dữ liệu hoặc thay quyền, xác định rõ điểm cần phê duyệt và cơ chế chặn thực tế. Nhật ký cần ghi nhận hành động đã xảy ra, đồng thời tránh lưu bí mật. Một workflow cơ sở dữ liệu không tự chứng minh dữ liệu đã được cô lập.
Instructions can communicate a policy, but enforcement needs controls outside the prose. Review downloaded scripts and their dependencies before execution, restrict access to credentials, and choose permissions appropriate to the task. A license answers a distribution question; it does not establish that a script is safe to run.
The specification labels allowed-tools experimental. Its interpretation depends on host support; it is not a portable sandbox or a way to override host permissions. Check the field definition.
Claude Code hooks offer host-specific lifecycle controls, including decisions around tool use. Events include UserPromptSubmit, PreToolUse and PostToolUse. Handlers require configuration and validation; command hooks run with the user’s permissions. A skill does not provide a universal digital-signature gate or an absolute guarantee against destructive actions. Consult the hook reference.
Separate the suggested check, the application’s permission decision and the environment’s configured file, network and credential boundaries. A SKILL.md file does not create a sandbox.
Use explicit approval boundaries for consequential operations, and separate a suggested check from the mechanism that blocks execution. Likewise, giving an agent a database workflow does not establish data isolation. Access policies, service configuration and the destination of outputs still need independent review.
6. Áp dụng trong VAS và checklist6. VAS workflows and a deployment checklist
Bắt đầu bằng một công việc lặp lại có đầu ra nhận biết được. Chọn gói nhỏ, đọc runbook và prerequisites, rồi thử trong workspace dùng một lần trước khi áp dụng vào dự án thật.
- Với pull request, xem code-review. Xác định hành vi thay đổi và ưu tiên phát hiện có thể hành động. Mở PR chỉ kích hoạt tự động hóa nếu tích hợp đó đã được cấu hình.
- Với giao diện, đối chiếu ui-ux-pro-max với design contract hiện có. Kiểm tra màn hình thật, responsive và bàn phím; đầu ra sinh tự động vẫn cần review.
- Với lỗi chưa rõ nguyên nhân, dùng systematic-debugging. Giữ bản tái hiện và kiểm tra các giả thuyết trước khi sửa mã.
Ghi lại điều agent thực sự làm, kể cả lần không chọn skill hoặc làm thừa. Dùng bằng chứng đó để sửa mô tả kích hoạt, giả định và điều kiện dừng. Một skill dễ bảo trì là quy trình có phiên bản và kết quả quan sát được, không phải lời hứa mọi tác vụ tương lai đều thành công.
Start with a repeated task whose expected result you can recognize. Choose a small package, inspect its runbook and confirm its prerequisites. Then test it in a disposable workspace before relying on it in a real project.
- For pull requests, explore code-review. Define the changed behavior and focus review on actionable findings. Opening a pull request only triggers automation if that integration has been configured.
- For interface work, inspect ui-ux-pro-max against the existing design contract. Validate real screens, responsive behavior and keyboard access; generated output still needs review.
- For an uncertain failure, try systematic-debugging. Preserve the reproduction and test competing explanations before changing the implementation.
Record what the agent actually did, including cases where it ignored the skill or performed unnecessary work. Refine the trigger description, assumptions and stopping conditions using that evidence. A maintainable skill is a versioned procedure with observable results, not a promise that every future task will succeed.
- Chọn đúng nhu cầu; đọc mô tả, runbook, nguồn và giấy phép.Choose a real task; inspect the description, runbook, source and license.
- Xác nhận ứng dụng nhận diện gói và môi trường có prerequisites.Confirm discovery in the host and availability of prerequisites.
- Giới hạn quyền; xác định điểm phê duyệt và phạm vi dữ liệu.Limit permissions; define approval boundaries and data scope.
- Thử trong workspace tạm với đầu vào và tiêu chí hoàn tất rõ ràng.Use a disposable workspace with explicit inputs and acceptance criteria.
- Đối chiếu đầu ra, chi phí và hành vi với một baseline tương đương.Compare outputs, costs and actions against an equivalent baseline.
- Ghi phiên bản, bằng chứng, giới hạn và cách hoàn tác trước khi mở rộng.Record versions, evidence, limitations and rollback steps before expanding use.
Phạm vi bài viết: đối chiếu tài liệu và phân tích kiến trúc. Chưa benchmark VAS, triển khai hệ thống production hay chứng nhận an toàn cho các ví dụ. Kiểm tra HTML và liên kết không thay thế kiểm chứng runtime.Scope: documentation review and architecture analysis. This article does not benchmark VAS, report a production deployment or certify the examples as safe. HTML and link checks do not establish runtime behavior.
Nguồn đối chiếuReferences
- Agent Skills specification
- Agent Skills: adding skills support to a client
- Anthropic: Equipping agents for the real world with Agent Skills
- MCP architecture (2026-07-28)
- Postman: token optimization findings
- Anthropic: prompt caching
- Agent Skills Can Be Harmful: An Empirical Study of Skill-Induced Failures in LLM Agents (preprint, v1)
- Claude Code: hooks reference