Overview
Các nền tảng này đều mô tả Agent Skills như một chuẩn chung để mở rộng khả năng của AI agents.
Tài liệu hướng dẫn Agent Skills
Tài liệu tham khảo chính
Các tài liệu chính thức về Agent Skills:
OpenAI Codex Skills https://developers.openai.com/codex/skills/
OpenCode Skills Documentation https://opencode.ai/docs/skills/
Claude Agent Skills Documentation https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview
Các chuyên gia AI sẵn sàng chuyển đổi quy trình làm việc của bạn https://github.com/msitarzewski/agency-agents
1. Agent Skills là gì
Agent Skills là các module mở rộng cho AI agent, giúp agent có thể thực hiện những nhiệm vụ chuyên biệt.
Skill thường bao gồm:
Instructions (hướng dẫn)
Scripts (code thực thi)
Resources (tài liệu tham khảo)
Mục tiêu:
Một skill giúp agent thực hiện một workflow cụ thể thay vì phải dùng prompt dài lặp lại nhiều lần.
2. Vì sao cần Agent Skills
Agent Skills giúp:
1. Chuyên môn hóa AI
Ví dụ:
AI chung chung
AI chuyên code React
AI chung chung
AI chuyên deploy Docker
AI chung chung
AI chuyên phân tích log
2. Tái sử dụng workflow
Thay vì prompt dài:
Chỉ cần:
3. Tự động load khi cần
Agent có thể:
tự chọn skill
hoặc gọi skill trực tiếp
Ví dụ:
Agent sẽ load nội dung SKILL.md vào context.
3. Cấu trúc của một Skill
Một skill là một thư mục.
Ví dụ:
Thành phần chính:
SKILL.md
bắt buộc
scripts
code thực thi
references
tài liệu
assets
template
4. File SKILL.md
File quan trọng nhất.
Bắt buộc có YAML frontmatter.
Ví dụ:
Quy tắc:
name: 1–64 ký tự
chỉ chữ thường + số + dấu "-"
description: 1–1024 ký tự
5. Nội dung SKILL.md
Ví dụ:
6. Cách agent tìm và load skill
Agent sẽ scan các thư mục:
OpenCode
Agent sẽ tìm:
7. Cách cài skill
Ví dụ với Codex:
Hoặc:
Sau khi cài:
Agent sẽ tự động phát hiện skill mới.
8. Cách agent sử dụng skill
Có 2 cách.
1. Auto detect
User prompt:
Agent sẽ chọn skill:
2. Manual call
9. Permission của skill
Trong file config:
Ví dụ:
Các trạng thái:
allow
load ngay
deny
không cho agent thấy
ask
hỏi user
10. Disable skills
Có thể tắt hoàn toàn skill tool:
Agent sẽ không sử dụng skill.
11. Progressive Loading (quan trọng)
Skill được load theo từng bước:
Level 1
Metadata
Level 2
Instructions
Level 3
Resources / scripts
Cách này giúp:
12. Agent Skills là open standard
Hiện nay nhiều agent hỗ trợ cùng một chuẩn skill:
Claude Code
OpenAI Codex
Cursor
VSCode AI agents
OpenCode
Các skill có thể chạy cross-platform giữa nhiều agent.
13. Ví dụ skill thực tế
React Expert Skill
Chức năng:
generate component
optimize hooks
create project structure
DevOps Skill
Chức năng:
build Dockerfile
create compose
deploy container
14. Lưu ý bảo mật
Skill có thể:
chạy code
đọc file
gọi API
Nếu skill độc hại có thể:
đánh cắp dữ liệu
chạy lệnh nguy hiểm
Vì vậy chỉ nên dùng skill từ nguồn đáng tin cậy.
Tóm tắt
Agent Skills là plugin cho AI agent.
Skill gồm:
Cấu trúc:
Skill giúp:
Template chuẩn tạo Agent Skill
1. Cấu trúc thư mục
Ý nghĩa:
SKILL.md
file chính để agent hiểu skill
README.md
tài liệu cho developer
examples
ví dụ cách dùng
scripts
code thực thi
resources
tài liệu tham khảo
templates
template output
2. File bắt buộc: SKILL.md
Đây là file quan trọng nhất.
Template
3. README.md (cho developer)
Template:
4. Template script (scripts/run.py)
Agent chỉ nhận output của script, không cần load code vào context.
5. Template resource file
resources/reference.md
6. Template example
examples/example.md
7. Quy tắc đặt tên Skill
lowercase only
good
use hyphen
docker-deploy
max 64 characters
recommended
Không dùng:
8. Ví dụ Skill hoàn chỉnh
Skill này có thể:
build docker image
generate docker-compose
deploy container
9. Best Practices
Viết description rõ ràng
Tốt:
Kém:
Hạn chế prompt dài
Skill nên:
Dùng script cho logic phức tạp
Không nên:
Nên:
10. Template nhanh nhất (minimal skill)
Nếu cần skill đơn giản, chỉ cần:
Ví dụ:
Last updated