SKILL.md คืออะไร?
เป็น Open Standard Format ที่ Agent Skills (พัฒนาโดย Anthropic) ทำ แล้วก็กำหนด Specification ไว้ด้วย จุดประสงค์คือเพื่อให้ Agents ที่เราทำขึ้นมามี Capabilities และ Expertise เพิ่มมากขึ้นในงานที่เราทำ แล้วก็มีบริบทที่เจาะจงกับงานที่เราทำมากขึ้นด้วย
ในโฟลเดอร์ไหนที่มีไฟล์ SKILL.md ไฟล์นี้จะมี Metadata อย่าง name กับ description อยู่ แล้วก็จะมี Instructions บอก Agents สำหรับการทำงานนั้น ๆ ที่เรากำหนดไว้
ตัวอย่างของไฟล์ SKILL.md เป็นประมาณนี้
---
name: pdf-processing
description: Extract PDF text, fill forms, merge files. Use when handling PDFs.
---
# PDF Processing
## When to use this skill
Use this skill when the user needs to work with PDF files...
## How to extract text
1. Use pdfplumber for text extraction...
## How to fill forms
...
ซึ่งเราก็สามารถมีของอย่างอื่นเพิ่มเติมเข้าไปได้ตามนี้
my-skill/
├── SKILL.md # Required: instructions + metadata
├── scripts/ # Optional: executable code
├── references/ # Optional: documentation
└── assets/ # Optional: templates, resources
การทำงานของ Skills จะมีขั้นตอนหลัก ๆ 3 ขั้นตอน
- Discovery: คือช่วง Startup ที่ Agents จะโหลดของ
nameกับdescriptionเข้าไป (Progressive Disclosure) เพื่อให้มี Context ที่พอเพียงที่บอกได้ว่าอะไรที่เกี่ยวข้องบ้างตอนที่เราสั่งงาน – The idea is to only load context when it's actually needed. - Activation: ตอนที่งานไป Match กับ Skill's Description แล้ว Agents จะอ่าน
SKILL.mdทั้งหมดเข้าไปใน Context - Execution: ตัว Agent ก็จะทำตามคำสั่ง Instructions ที่เขียนไว้ แล้วก็อาจจะโหลไฟล์ที่เกี่ยวข้องเข้าไปเพิ่มเติมด้วย
ตอนนี้มี AI Development Tools หลาย ๆ ตัวที่รองรับแล้ว ดังนั้นเราก็จะมีเครื่องมือที่จะช่วยโหลด Skills เข้าไปที่ Agent ของเราให้แล้วด้วย ไม่ต้องมานั่งเขียนโหลดเอง
มีตัวอย่างของ Skills อีกเพียบเลย เข้าดูได้ที่ Public repository for Agent Skills ของ Anthropic เอง หรืออีกตัวอย่างหนึ่งที่น่าจะทำให้เห็นภาพชัดขึ้น ก็ลองดูของ Airflow ได้ครับ มี Skill เรื่อง Translations ด้วย 😉
ส่วนถ้าใครอยากเอา Skills ที่คนอื่นทำไว้เอาไปใช้เลย ผมแนะนำที่นี่ The Agent Skills Directory ดีงามมาก เป็น Open Agent Skills Ecosystem