import { Alert } from '@/components/mdx/alert';
Agent Skill — Cách "Dạy" AI Làm Việc Theo Chuẩn Công Ty
TL;DR: Agent Skill là "chức năng đặc biệt" của AI agent — tập hợp actions + logic để làm task cụ thể theo chuẩn công ty. Skill ≠ Tool (tool là action đơn lẻ, skill là chuỗi actions). Càng nhiều skill, agent càng thông minh và phù hợp với workflow của team.
Skill vs Tool vs Agent
Đây là 3 level khác nhau:
| Level | Là gì? | Ví dụ |
|---|---|---|
| Tool | Action đơn lẻ AI gọi | query_db, send_email, read_file |
| Skill | Tập hợp tools + logic + best practices | "Tạo blog post chuẩn format Diginno" |
| Agent | AI tự quyết định dùng skill/tool nào | "Viết bài + publish + share social" |
ℹ️ Info: Tương tự:
- Tool = nguyên liệu (bột, trứng, đường)
- Skill = công thức (cách làm bánh)
- Agent = đầu bếp (quyết định làm bánh gì, khi nào làm)
Agent Skill Là Gì?
Agent Skill = tập hợp instructions + tools + workflows mà AI agent có thể trigger khi gặp tình huống phù hợp.
Skill dạy AI:
- Khi nào dùng skill này
- Làm gì theo từng bước
- Dùng tools nào
- Output format ra sao
- Best practices gì cần follow
Cấu Trúc 1 Skill (OpenCode Format)
Mỗi skill trong OpenCode có:
skills/
└── ten-skill/
├── SKILL.md # Mô tả skill, khi nào trigger, workflow
├── references/ # Tài liệu tham khảo
│ └── guide.md
└── scripts/ # Scripts cần thiết
└── helper.sh
SKILL.md — File Quan Trọng Nhất
---
name: ten-skill
description: Mô tả ngắn — AI dùng text này để quyết định khi nào trigger skill
---
# Tên Skill
## Khi Nào Sử Dụng
- Trigger 1
- Trigger 2
## Quy Trình
1. Step 1
2. Step 2
3. Step 3
## Best Practices
- Rule 1
- Rule 2
## Templates
Template code/markdown nếu cần
✅ Success: Key point:
descriptiontrong frontmatter là phần QUAN TRỌNG NHẤT — AI đọc description này để quyết định có trigger skill hay không. Description phải rõ ràng, cụ thể, có ví dụ trigger.
Ví dụ Skill Thực Tế Tại Diginno
Skill 1: writing-blog-posts
---
name: writing-blog-posts
description: Guide for writing blog posts following Diginno standards.
Use when creating new blog posts, editing existing posts, or when user
asks about blog writing conventions, frontmatter format, or content structure.
---
# Writing Blog Posts
## QUY TRÌNH BẮT BUỘC
### Bước 1: Soạn Outline
- Tạo outline với: tiêu đề, slug, category, tags, target audience
- Trình bày cho user duyệt
### Bước 2: Chờ Duyệt
- CHỈ viết bài khi user đã confirm
### Bước 3: Viết Bài
- Frontmatter chuẩn (title, slug, date, category, tags, series)
- TL;DR đầu bài
- Sections với H2, H3
- Code blocks có syntax highlighting
- Alert components cho info/warning
- CTA cuối bài
## Frontmatter Format
```yaml
title: "..."
slug: kebab-case
date: "2026-04-22"
category: ai-automation
tags: ["tag1", "tag2"]
series: "ai-training-series"
seriesOrder: 1
draft: false
Categories
- digital-transformation
- larksuite
- ai-automation
- technology
- productivity
- business
CTA Chuẩn
- Hotline: 0816226086
- Email: contact@diginno.net
- Website: diginno.net
### Skill 2: larkbase-cli
```markdown
---
name: larkbase-cli
description: Truy cập Lark Bitable qua CLI — 19 commands cho CRUD,
field management, và sync PostgreSQL. Dùng khi user muốn lấy dữ liệu
Lark, fetch records, export JSON, hoặc sync dữ liệu.
---
# LarkBase CLI
## Available Commands
- `list-apps` — List tất cả LarkBase apps
- `list-tables` — List tables trong app
- `get-records` — Get records từ table
- `create-record` — Create record mới
- `update-record` — Update record
- ...
## Common Use Cases
### Fetch data từ LarkBase
```bash
larkbase get-records --app-token xxx --table-id yyy
Sync PostgreSQL → LarkBase
larkbase sync --from postgres --to lark --table users
### Skill 3: n8n-workflow-assistant
```markdown
---
name: n8n-workflow-assistant
description: Build, optimize, và troubleshoot n8n workflows.
Use khi user muốn tạo workflow mới, debug issues, hoặc học
n8n best practices.
---
# n8n Workflow Assistant
## Khi Build Workflow Mới
1. Understand use case
2. Design workflow structure
3. Choose appropriate nodes
4. Configure connections
5. Test end-to-end
6. Add error handling
## Best Practices
- Dùng Error Trigger cho mọi workflow
- Limit data trong execution log
- Test với sample data trước
- Document workflow với notes
Khi Nào Cần Tạo Skill Mới?
✅ Nên tạo skill khi:
-
Task lặp lại nhiều lần
- Team thường xuyên phải làm cùng 1 task
- Mỗi lần làm format/process giống nhau
-
Cần nhiều bước + nhiều tool
- Task không thể làm bằng 1 tool đơn lẻ
- Cần chain nhiều actions theo thứ tự
-
Có format/standard riêng
- Công ty có convention riêng (như blog post format)
- Cần đảm bảo consistency
-
Cần knowledge transfer
- Senior làm được, junior chưa biết cách
- Skill = documentation + automation
❌ Không cần skill khi:
- Task đơn giản, 1 tool là xong
- Chỉ làm 1-2 lần rồi thôi
- Chưa có pattern rõ ràng
Cách Tạo Skill Mới — Step by Step
Step 1: Identify Pattern
Nhận ra task lặp lại:
"Team đã viết 5 blog posts, mỗi lần đều phải:
- Tạo frontmatter đúng format
- Viết TL;DR
- Dùng Alert component
- Thêm CTA cuối bài
→ Đây là pattern → nên tạo skill"
Step 2: Document Workflow
Viết ra từng bước:
1. Confirm topic + category
2. Create outline → user approve
3. Create file với frontmatter chuẩn
4. Write content theo sections
5. Add code blocks + alerts
6. Add CTA + internal links
7. Test với npm run dev
Step 3: Create SKILL.md
mkdir -p .opencode/skills/ten-skill
touch .opencode/skills/ten-skill/SKILL.md
Step 4: Add References (nếu cần)
mkdir -p .opencode/skills/ten-skill/references
touch .opencode/skills/ten-skill/references/frontmatter-guide.md
Step 5: Test Skill
- User request task phù hợp
- Check xem AI có auto-trigger skill không
- Nếu không → improve description
Skill trong Công Việc Tại Diginno
Diginno hiện có 50+ skills, bao gồm:
| Skill | Mục đích | Trigger khi |
|---|---|---|
writing-blog-posts |
Viết blog chuẩn format | Tạo/sửa blog post |
larkbase-cli |
CRUD Lark Base | Lấy/sửa data Lark |
n8n-workflow-assistant |
Build n8n workflow | Tạo/debug automation |
business-content |
Tạo content kinh doanh | Viết proposal, email B2B |
contract-generator |
Tạo hợp đồng DOCX | Cần tạo contract |
deploy-vps |
Deploy app lên VPS | Deploy mới/update |
pos-orders |
Quản lý đơn POS | CRUD đơn hàng |
meta-ads-management |
Quản lý Facebook Ads | Tạo/sửa campaign |
Bài Tập Thực Hành
Task 1: Identify Skill Opportunities
List 3 task lặp lại trong công việc hàng ngày của bạn → propose 3 skills mới.
Task 2: Create a Simple Skill
Tạo 1 skill đơn giản cho task: "Tạo file MDX blog post mới với frontmatter chuẩn"
- SKILL.md với description rõ ràng
- References: frontmatter guide
- Workflow: từng bước tạo file
Task 3: Improve an Existing Skill
Chọn 1 skill hiện có → improve description để AI trigger chính xác hơn.
Tóm Tắt
| Khái niệm | Nội dung |
|---|---|
| Skill | Tập hợp tools + logic + best practices cho task cụ thể |
| vs Tool | Tool = action đơn, Skill = chuỗi actions |
| vs Agent | Agent = AI tự quyết định, Skill = "kiến thức" agent dùng |
| SKILL.md | File chính — description quyết định khi nào AI trigger |
| Khi nào tạo | Task lặp lại, nhiều bước, có standard riêng |
| Cấu trúc | SKILL.md + references/ + scripts/ |
| Diginno có | 50+ skills cho mọi workflow |
| Key takeaway | Skill là cách "dạy" AI làm việc theo chuẩn công ty |
Tổng Kết Series AI Training
🎉 Bạn đã hoàn thành 8 bài AI Training!
Recap toàn bộ series:
| Bài | Topic | Key Takeaway |
|---|---|---|
| 1 | LLM | AI là công cụ, không phải phép màu |
| 2 | Token | Token = tiền + tốc độ + giới hạn |
| 3 | Context | Bộ nhớ ngắn hạn — biết quản lý = AI nhớ đúng |
| 4 | Prompt | Role + Task + Context + Constraint + Format |
| 5 | Tool | Tool biến AI từ "não nói suông" thành "người làm việc" |
| 6 | MCP | USB-C của AI — 1 cổng kết nối mọi hệ thống |
| 7 | Agent | AI tự làm việc — engineer design goal |
| 8 | Agent Skill | "Dạy" AI làm việc theo chuẩn công ty |
###下一步 (Next Steps):
- Thực hành: Áp dụng vào project thật tại Diginno
- Học sâu: Nghiên cứu thêm về RAG, fine-tuning, multi-agent
- Build: Tạo skill mới cho workflow của bạn
- Share: Dạy lại cho team member khác
✅ Success: Remember: AI Engineer giỏi không phải là người biết code nhất — mà là người biết điều khiển AI làm việc hiệu quả nhất. Tư duy AI-first > Kỹ năng code.
← Bài 7: Agent — Khi AI Tự Làm Việc
Liên hệ tư vấn
Bạn muốn áp dụng AI vào doanh nghiệp? Diginno có thể help.
- Hotline: 0816226086
- Email: contact@diginno.net
- Website: diginno.net
Bài viết hữu ích?
Chia sẻ để nhiều người biết đến!
>_ LLM-Friendly Copy
Copy as Markdown to use with ChatGPT, Claude, or other AI tools