@anionzo/skill 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +302 -0
- package/LICENSE +21 -0
- package/README.md +209 -0
- package/adapters/README.md +13 -0
- package/adapters/claude-code/README.md +32 -0
- package/adapters/copilot/README.md +32 -0
- package/adapters/gemini/README.md +32 -0
- package/adapters/generic/README.md +32 -0
- package/adapters/opencode/README.md +32 -0
- package/docs/adapter-guide.md +62 -0
- package/docs/authoring-guide.md +69 -0
- package/docs/design-brief.md +97 -0
- package/docs/knowledge-spec.md +78 -0
- package/docs/research-notes.md +99 -0
- package/docs/skill-spec.md +107 -0
- package/i18n/CONTRIBUTING.vi.md +302 -0
- package/i18n/README.vi.md +209 -0
- package/i18n/adapter-guide.vi.md +62 -0
- package/i18n/authoring-guide.vi.md +69 -0
- package/i18n/design-brief.vi.md +97 -0
- package/i18n/knowledge-spec.vi.md +78 -0
- package/i18n/research-notes.vi.md +99 -0
- package/i18n/skill-spec.vi.md +107 -0
- package/knowledge/README.md +7 -0
- package/knowledge/global/debugging-patterns.md +20 -0
- package/knowledge/global/engineering-principles.md +23 -0
- package/knowledge/global/evidence-before-claims.md +20 -0
- package/knowledge/global/review-heuristics.md +23 -0
- package/knowledge/global/skill-triggering-rules.md +24 -0
- package/knowledge/project/README.md +10 -0
- package/knowledge/working/README.md +10 -0
- package/package.json +43 -0
- package/scripts/sync-platform-files +73 -0
- package/scripts/validate-skills +103 -0
- package/skills/brainstorming/SKILL.md +45 -0
- package/skills/brainstorming/examples.md +61 -0
- package/skills/brainstorming/meta.yaml +23 -0
- package/skills/brainstorming/references/output-template.md +26 -0
- package/skills/bug-triage/SKILL.md +47 -0
- package/skills/bug-triage/examples.md +68 -0
- package/skills/bug-triage/meta.yaml +25 -0
- package/skills/bug-triage/references/output-template.md +26 -0
- package/skills/code-review/SKILL.md +41 -0
- package/skills/code-review/examples.md +77 -0
- package/skills/code-review/meta.yaml +24 -0
- package/skills/code-review/references/checklist.md +34 -0
- package/skills/code-review/references/output-template.md +12 -0
- package/skills/docs-writer/SKILL.md +42 -0
- package/skills/docs-writer/examples.md +108 -0
- package/skills/docs-writer/meta.yaml +22 -0
- package/skills/docs-writer/references/output-template.md +17 -0
- package/skills/feature-delivery/SKILL.md +39 -0
- package/skills/feature-delivery/examples.md +83 -0
- package/skills/feature-delivery/meta.yaml +26 -0
- package/skills/feature-delivery/references/output-template.md +26 -0
- package/skills/planning/SKILL.md +61 -0
- package/skills/planning/examples.md +124 -0
- package/skills/planning/meta.yaml +29 -0
- package/skills/planning/references/output-template.md +37 -0
- package/skills/refactor-safe/SKILL.md +53 -0
- package/skills/refactor-safe/examples.md +96 -0
- package/skills/refactor-safe/meta.yaml +28 -0
- package/skills/refactor-safe/references/output-template.md +37 -0
- package/skills/repo-onboarding/SKILL.md +52 -0
- package/skills/repo-onboarding/examples.md +115 -0
- package/skills/repo-onboarding/meta.yaml +23 -0
- package/skills/repo-onboarding/references/output-template.md +24 -0
- package/skills/using-skills/SKILL.md +108 -0
- package/skills/using-skills/examples.md +79 -0
- package/skills/using-skills/meta.yaml +29 -0
- package/skills/using-skills/references/output-template.md +14 -0
- package/skills/verification-before-completion/SKILL.md +46 -0
- package/skills/verification-before-completion/examples.md +83 -0
- package/skills/verification-before-completion/meta.yaml +26 -0
- package/skills/verification-before-completion/references/checklist.md +7 -0
- package/skills/verification-before-completion/references/output-template.md +16 -0
- package/templates/SKILL.md +29 -0
- package/templates/examples.md +13 -0
- package/templates/meta.yaml +14 -0
- package/templates/output-template.md +11 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# 📋 Tóm Tắt Thiết Kế
|
|
2
|
+
|
|
3
|
+
> 🌐 **[English](../docs/design-brief.md)**
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### ❓ Vấn Đề
|
|
8
|
+
|
|
9
|
+
Workflow AI thường hỏng vì một trong hai lý do:
|
|
10
|
+
|
|
11
|
+
- 🔴 Agent không có phương pháp lặp lại cho một loại công việc
|
|
12
|
+
- 🔴 Agent không có ngữ cảnh bền vững về cách người dùng muốn làm việc
|
|
13
|
+
|
|
14
|
+
Repo này tách biệt hai mối quan tâm đó.
|
|
15
|
+
|
|
16
|
+
### 📦 Repo Này Là Gì
|
|
17
|
+
|
|
18
|
+
Thư viện vận hành cá nhân với ba lớp:
|
|
19
|
+
|
|
20
|
+
| Lớp | Mục đích |
|
|
21
|
+
|---|---|
|
|
22
|
+
| 🎯 `skills/` | Hướng dẫn workflow tái sử dụng |
|
|
23
|
+
| 📚 `knowledge/` | Ghi chú bền vững về nguyên tắc, heuristic, ngữ cảnh dự án |
|
|
24
|
+
| 🔌 `adapters/` | Hướng dẫn phân phối cho các nền tảng agent |
|
|
25
|
+
|
|
26
|
+
### 🚫 Repo Này Không Phải
|
|
27
|
+
|
|
28
|
+
- ❌ Không phải task manager
|
|
29
|
+
- ❌ Không phải plugin runtime
|
|
30
|
+
- ❌ Không phải hệ thống memory dựa trên database
|
|
31
|
+
- ❌ Không phải prompt pack cứng cho một agent duy nhất
|
|
32
|
+
|
|
33
|
+
### 🔍 Ý Tưởng Từ Upstream
|
|
34
|
+
|
|
35
|
+
#### Từ [`hoangnb24/skills`](https://github.com/hoangnb24/skills)
|
|
36
|
+
|
|
37
|
+
- 🔹 Thiết kế skill theo workflow-first
|
|
38
|
+
- 🔹 Router hoặc meta-skill quyết định load gì tiếp theo
|
|
39
|
+
- 🔹 Output contract rõ ràng
|
|
40
|
+
- 🔹 Reference và example đặt cạnh mỗi skill
|
|
41
|
+
|
|
42
|
+
#### Từ các coding agent plan-first
|
|
43
|
+
|
|
44
|
+
- 🔹 Tách planning khỏi execution
|
|
45
|
+
- 🔹 Hiển thị mức sẵn sàng triển khai trước khi bắt đầu code
|
|
46
|
+
- 🔹 Giữ plan đủ cụ thể để thực thi và dễ review
|
|
47
|
+
|
|
48
|
+
#### Từ [`obra/superpowers`](https://github.com/obra/superpowers)
|
|
49
|
+
|
|
50
|
+
- 🔹 Thêm giai đoạn brainstorming trước planning khi request còn mơ hồ
|
|
51
|
+
- 🔹 Coi verification là cổng thật, không phải bước cuối cho có
|
|
52
|
+
- 🔹 Giữ skill triggering và chuyển tiếp workflow rõ ràng
|
|
53
|
+
|
|
54
|
+
#### Từ [`affaan-m/everything-claude-code`](https://github.com/affaan-m/everything-claude-code)
|
|
55
|
+
|
|
56
|
+
- 🔹 Tư duy phân lớp: skill, rule ổn định, memory, adapter
|
|
57
|
+
- 🔹 Hỗ trợ đa nền tảng là ưu tiên hàng đầu
|
|
58
|
+
- 🔹 Để chỗ cho tự động hóa kích hoạt skill và testing trong tương lai
|
|
59
|
+
|
|
60
|
+
#### Từ [`knowns-dev/knowns`](https://github.com/knowns-dev/knowns)
|
|
61
|
+
|
|
62
|
+
- 🔹 Tách skill instruction khỏi kiến thức bền vững
|
|
63
|
+
- 🔹 Giữ một nguồn sự thật duy nhất và sync file platform-specific từ đó
|
|
64
|
+
- 🔹 Hỗ trợ nhiều agent đích mà không viết lại thư viện core
|
|
65
|
+
- 🔹 Để chỗ cho interface machine-readable trong tương lai
|
|
66
|
+
|
|
67
|
+
### 🏛️ Quyết Định Thiết Kế
|
|
68
|
+
|
|
69
|
+
1. 📄 Nội dung core dùng Markdown và YAML để repo giữ tính portable
|
|
70
|
+
2. 🎯 Skill mặc định hẹp, giải quyết tốt một vấn đề lặp lại
|
|
71
|
+
3. 📚 Knowledge phân lớp: `global`, `project`, `working`
|
|
72
|
+
4. 📦 File platform được sinh vào `generated/` thay vì sửa tay
|
|
73
|
+
5. ⚙️ Phiên bản đầu dùng shell script đơn giản thay vì build system
|
|
74
|
+
6. ✅ Planning và verification là các pha rõ ràng cho công việc thay đổi code
|
|
75
|
+
|
|
76
|
+
### 🎯 Phạm Vi Ban Đầu
|
|
77
|
+
|
|
78
|
+
Phiên bản đầu tập trung vào các pattern có giá trị ngay:
|
|
79
|
+
|
|
80
|
+
- 🧭 Phân loại request
|
|
81
|
+
- 💡 Làm rõ request mơ hồ thành hướng đi cụ thể
|
|
82
|
+
- 🗺️ Onboard vào repo
|
|
83
|
+
- 🐛 Triage bug
|
|
84
|
+
- 📐 Lập plan trước khi code
|
|
85
|
+
- 🚀 Triển khai feature
|
|
86
|
+
- ✅ Xác minh kết quả trước khi tuyên bố hoàn thành
|
|
87
|
+
- 🔍 Review code
|
|
88
|
+
- 📝 Cập nhật docs
|
|
89
|
+
|
|
90
|
+
### 🔮 Bước Tiếp Theo
|
|
91
|
+
|
|
92
|
+
Nếu thư viện hữu ích, công việc tiếp theo có thể là:
|
|
93
|
+
|
|
94
|
+
1. 📋 Thêm skill manifest format dễ parse bằng chương trình
|
|
95
|
+
2. 📦 Sinh platform file phong phú hơn từ metadata và knowledge file được chọn
|
|
96
|
+
3. 🧩 Thêm project-specific pack mở rộng thư viện global
|
|
97
|
+
4. 🔌 Expose thư viện qua MCP server hoặc CLI nhẹ
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# 📚 Đặc Tả Knowledge
|
|
2
|
+
|
|
3
|
+
> 🌐 **[English](../docs/knowledge-spec.md)**
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### 🎯 Mục Đích
|
|
8
|
+
|
|
9
|
+
File knowledge lưu ngữ cảnh bền vững giúp cải thiện cách áp dụng skill.
|
|
10
|
+
|
|
11
|
+
> 🎯 **Skill** giải thích *cách làm việc*.
|
|
12
|
+
> 📚 **Knowledge** giải thích *điều gì quan trọng trong môi trường của bạn*.
|
|
13
|
+
|
|
14
|
+
### 📂 Các Lớp
|
|
15
|
+
|
|
16
|
+
#### 🌍 `knowledge/global/`
|
|
17
|
+
|
|
18
|
+
Dùng cho rule và preference xuyên dự án:
|
|
19
|
+
|
|
20
|
+
- 🏛️ Nguyên tắc kỹ thuật
|
|
21
|
+
- 🔍 Heuristic review
|
|
22
|
+
- 🐛 Pattern debug
|
|
23
|
+
- ✍️ Phong cách viết
|
|
24
|
+
|
|
25
|
+
> 🐢 Lớp này thay đổi **chậm**.
|
|
26
|
+
|
|
27
|
+
#### 📁 `knowledge/project/`
|
|
28
|
+
|
|
29
|
+
Dùng cho ngữ cảnh riêng dự án:
|
|
30
|
+
|
|
31
|
+
- 🏗️ Ghi chú kiến trúc
|
|
32
|
+
- ⚙️ Lệnh quan trọng
|
|
33
|
+
- 📏 Convention
|
|
34
|
+
- ⚠️ Rủi ro rollout
|
|
35
|
+
- 📋 Rule domain
|
|
36
|
+
|
|
37
|
+
> 🔄 Lớp này nên được copy hoặc tùy chỉnh **theo từng dự án**.
|
|
38
|
+
|
|
39
|
+
#### 📝 `knowledge/working/`
|
|
40
|
+
|
|
41
|
+
Dùng cho ghi chú tạm thời trong session:
|
|
42
|
+
|
|
43
|
+
- 🧪 Giả thuyết đang active
|
|
44
|
+
- ⏳ Quyết định tạm thời
|
|
45
|
+
- 📌 Follow-up cần promote sau
|
|
46
|
+
|
|
47
|
+
> ⚡ Lớp này thay đổi **thường xuyên** và có thể dọn dẹp mạnh tay.
|
|
48
|
+
|
|
49
|
+
### 📄 Hình Dạng File
|
|
50
|
+
|
|
51
|
+
File knowledge nên đọc được như Markdown thuần.
|
|
52
|
+
|
|
53
|
+
**Các section khuyến nghị:**
|
|
54
|
+
|
|
55
|
+
| Section | Mục đích |
|
|
56
|
+
|---|---|
|
|
57
|
+
| 🎯 Tại sao file này tồn tại | Ngữ cảnh và động lực |
|
|
58
|
+
| 📏 Rule hoặc heuristic | Hướng dẫn hành động |
|
|
59
|
+
| 💡 Ví dụ | Minh họa cụ thể |
|
|
60
|
+
| ⚠️ Điều gì không nên giả định | Rào cản chống lạm dụng |
|
|
61
|
+
|
|
62
|
+
> Frontmatter là tùy chọn. Bắt đầu đơn giản trừ khi cần tag machine-readable.
|
|
63
|
+
|
|
64
|
+
### ⬆️ Quy Tắc Promote
|
|
65
|
+
|
|
66
|
+
Promote một insight lên khi nó có giá trị lặp lại:
|
|
67
|
+
|
|
68
|
+
| Từ | Đến | Khi nào |
|
|
69
|
+
|---|---|---|
|
|
70
|
+
| 📝 `working` | 📁 `project` | Khi nó quan trọng cho codebase hiện tại ngoài một session |
|
|
71
|
+
| 📁 `project` | 🌍 `global` | Khi pattern giúp ích lặp lại xuyên repo |
|
|
72
|
+
|
|
73
|
+
### 🚫 Anti-Pattern
|
|
74
|
+
|
|
75
|
+
- ❌ Trộn ghi chú task-specific vào `global/`
|
|
76
|
+
- ❌ Lưu ghi chú tạm thời dễ bay hơi như sự thật vĩnh viễn
|
|
77
|
+
- ❌ Copy toàn bộ skill instruction vào file knowledge
|
|
78
|
+
- ❌ Để file project trôi xa khỏi codebase thật
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# 🔬 Ghi Chú Nghiên Cứu
|
|
2
|
+
|
|
3
|
+
> 🌐 **[English](../docs/research-notes.md)**
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### 🎯 Mục Tiêu
|
|
8
|
+
|
|
9
|
+
Ghi chú này lưu lại các pattern mạnh nhất từ bên ngoài đáng để chuyển thể vào thư viện skill cá nhân.
|
|
10
|
+
|
|
11
|
+
### 📦 Các Repo Đã Xem Xét
|
|
12
|
+
|
|
13
|
+
#### 🏛️ [`anthropics/skills`](https://github.com/anthropics/skills)
|
|
14
|
+
|
|
15
|
+
**Tại sao quan trọng:**
|
|
16
|
+
|
|
17
|
+
- Ví dụ public sạch về đóng gói skill portable
|
|
18
|
+
- Hợp đồng core cực kỳ đơn giản: skill là folder chứa `SKILL.md`
|
|
19
|
+
- Nhắc nhở tốt rằng skill nên tự chứa và dễ khám phá
|
|
20
|
+
|
|
21
|
+
**Pattern áp dụng:**
|
|
22
|
+
|
|
23
|
+
- 🔹 Một skill mỗi folder
|
|
24
|
+
- 🔹 Tên và mô tả rõ ràng
|
|
25
|
+
- 🔹 Example đặt cạnh skill
|
|
26
|
+
|
|
27
|
+
#### ⚡ [`obra/superpowers`](https://github.com/obra/superpowers)
|
|
28
|
+
|
|
29
|
+
**Tại sao quan trọng:**
|
|
30
|
+
|
|
31
|
+
- Ví dụ public mạnh nhất về workflow phân phối phần mềm dựa trên skill
|
|
32
|
+
- Giữ brainstorm, plan, execution, review, verification thành các bước riêng
|
|
33
|
+
- Coi skill triggering và chuyển tiếp workflow là vấn đề thiết kế, không phải ngẫu nhiên
|
|
34
|
+
|
|
35
|
+
**Pattern áp dụng:**
|
|
36
|
+
|
|
37
|
+
- 🔹 Giai đoạn `brainstorming` rõ ràng cho request chưa rõ
|
|
38
|
+
- 🔹 Giai đoạn `planning` rõ ràng trước thay đổi code non-trivial
|
|
39
|
+
- 🔹 Cổng `verification-before-completion` rõ ràng
|
|
40
|
+
|
|
41
|
+
#### 🧩 [`affaan-m/everything-claude-code`](https://github.com/affaan-m/everything-claude-code)
|
|
42
|
+
|
|
43
|
+
**Tại sao quan trọng:**
|
|
44
|
+
|
|
45
|
+
- Cho thấy hệ sinh thái skill lớn có thể phát triển thành các lớp: skill, rule, memory, hook, adapter
|
|
46
|
+
- Thể hiện kỷ luật đóng gói đa nền tảng mạnh
|
|
47
|
+
- Coi nghiên cứu, verification, và tiến hóa skill là mối quan tâm hàng đầu
|
|
48
|
+
|
|
49
|
+
**Pattern áp dụng:**
|
|
50
|
+
|
|
51
|
+
- 🔹 Tách biệt `skills/`, `knowledge/`, và `adapters/`
|
|
52
|
+
- 🔹 Chỗ cho rule always-on và output platform phong phú hơn trong tương lai
|
|
53
|
+
- 🔹 Tập trung vào hướng dẫn vận hành tái sử dụng thay vì prompt một lần
|
|
54
|
+
|
|
55
|
+
#### 🗃️ [`knowns-dev/knowns`](https://github.com/knowns-dev/knowns)
|
|
56
|
+
|
|
57
|
+
**Tại sao quan trọng:**
|
|
58
|
+
|
|
59
|
+
- Ví dụ mạnh về tách ngữ cảnh và memory khỏi skill instruction
|
|
60
|
+
- Mô hình tốt để sinh file hướng dẫn platform từ một nguồn
|
|
61
|
+
|
|
62
|
+
**Pattern áp dụng:**
|
|
63
|
+
|
|
64
|
+
- 🔹 Ghi chú bền vững ở trong `knowledge/`
|
|
65
|
+
- 🔹 File platform được sinh thay vì phân kỳ thủ công
|
|
66
|
+
|
|
67
|
+
#### 📦 [`hoangnb24/skills`](https://github.com/hoangnb24/skills)
|
|
68
|
+
|
|
69
|
+
**Tại sao quan trọng:**
|
|
70
|
+
|
|
71
|
+
- Thiết kế skill workflow-first với router quyết định load gì tiếp theo
|
|
72
|
+
- Output contract rõ ràng và reference đặt cạnh mỗi skill
|
|
73
|
+
|
|
74
|
+
**Pattern áp dụng:**
|
|
75
|
+
|
|
76
|
+
- 🔹 Router skill (`using-skills`) là điểm vào
|
|
77
|
+
- 🔹 Output template trong `references/`
|
|
78
|
+
- 🔹 Related skills graph cho điều hướng
|
|
79
|
+
|
|
80
|
+
### 🏆 Pattern Được Xếp Hạng
|
|
81
|
+
|
|
82
|
+
| # | Pattern |
|
|
83
|
+
|---|---|
|
|
84
|
+
| 1️⃣ | Tách brainstorming khỏi planning khi request mơ hồ |
|
|
85
|
+
| 2️⃣ | Tách planning khỏi execution cho thay đổi non-trivial |
|
|
86
|
+
| 3️⃣ | Yêu cầu bằng chứng verification trước khi tuyên bố hoàn thành |
|
|
87
|
+
| 4️⃣ | Giữ skill portable và tự chứa |
|
|
88
|
+
| 5️⃣ | Giữ knowledge tách biệt khỏi workflow |
|
|
89
|
+
| 6️⃣ | Sinh adapter output từ một nguồn sự thật duy nhất |
|
|
90
|
+
|
|
91
|
+
### ⏳ Pattern Hoãn Lại
|
|
92
|
+
|
|
93
|
+
- 📦 Đóng gói plugin đầy đủ
|
|
94
|
+
- ⚙️ Hook runtime và tự động hóa
|
|
95
|
+
- 📋 Skill manifest machine-readable
|
|
96
|
+
- 🧪 Test kích hoạt skill
|
|
97
|
+
- 🔌 MCP hoặc CLI bridge
|
|
98
|
+
|
|
99
|
+
> 💡 Đây là nâng cấp tốt trong tương lai, nhưng cố tình ngoài phạm vi phiên bản nhẹ hiện tại.
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# 🎯 Đặc Tả Skill
|
|
2
|
+
|
|
3
|
+
> 🌐 **[English](../docs/skill-spec.md)**
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### 📁 Bố Cục Bắt Buộc
|
|
8
|
+
|
|
9
|
+
Mỗi skill nằm trong thư mục riêng dưới `skills/`.
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
skills/<ten-skill>/
|
|
13
|
+
├─ 📄 meta.yaml
|
|
14
|
+
├─ 📖 SKILL.md
|
|
15
|
+
├─ 💡 examples.md
|
|
16
|
+
└─ 📂 references/
|
|
17
|
+
└─ <file-ho-tro>.md
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### 📄 File Bắt Buộc
|
|
21
|
+
|
|
22
|
+
#### `meta.yaml`
|
|
23
|
+
|
|
24
|
+
Dùng cho metadata ổn định mà script hoặc tooling tương lai có thể đọc.
|
|
25
|
+
|
|
26
|
+
**Trường bắt buộc:**
|
|
27
|
+
|
|
28
|
+
| Key | Mục đích |
|
|
29
|
+
|---|---|
|
|
30
|
+
| `name` | Định danh skill |
|
|
31
|
+
| `version` | Phiên bản semantic |
|
|
32
|
+
| `category` | Danh mục skill |
|
|
33
|
+
| `summary` | Mô tả một dòng |
|
|
34
|
+
|
|
35
|
+
**Trường khuyến nghị:**
|
|
36
|
+
|
|
37
|
+
| Key | Mục đích |
|
|
38
|
+
|---|---|
|
|
39
|
+
| `triggers` | Khi nào kích hoạt |
|
|
40
|
+
| `inputs` | Skill cần gì |
|
|
41
|
+
| `outputs` | Skill tạo ra gì |
|
|
42
|
+
| `constraints` | Rào cản |
|
|
43
|
+
| `related_skills` | Skill liên quan |
|
|
44
|
+
|
|
45
|
+
#### `SKILL.md`
|
|
46
|
+
|
|
47
|
+
File hướng dẫn chính. Giữ tập trung và hướng hành động.
|
|
48
|
+
|
|
49
|
+
**Các section khuyến nghị:**
|
|
50
|
+
|
|
51
|
+
- 🎯 Mục đích
|
|
52
|
+
- ⏰ Khi nào dùng
|
|
53
|
+
- 🔄 Workflow
|
|
54
|
+
- 📋 Output format
|
|
55
|
+
- 🚩 Red flag
|
|
56
|
+
- ✅ Done criteria
|
|
57
|
+
|
|
58
|
+
**Khuyến nghị mạnh khi liên quan:**
|
|
59
|
+
|
|
60
|
+
- 🧭 Quy tắc kích hoạt hoặc gợi ý routing
|
|
61
|
+
- ✅ Cổng verification
|
|
62
|
+
- ➡️ Handoff sang skill tiếp theo
|
|
63
|
+
|
|
64
|
+
#### `examples.md`
|
|
65
|
+
|
|
66
|
+
Cho ít nhất một input thực tế và phong cách response hoặc hành vi mong đợi.
|
|
67
|
+
|
|
68
|
+
#### `references/`
|
|
69
|
+
|
|
70
|
+
Dùng cho artifact hỗ trợ:
|
|
71
|
+
|
|
72
|
+
- 📋 Output template
|
|
73
|
+
- ☑️ Checklist
|
|
74
|
+
- 📊 Rubric
|
|
75
|
+
- 🌳 Cây quyết định
|
|
76
|
+
|
|
77
|
+
> ⚠️ Không chuyển workflow chính vào `references/`. Hành vi chính phải ở trong `SKILL.md`.
|
|
78
|
+
|
|
79
|
+
### ✍️ Quy Tắc Viết
|
|
80
|
+
|
|
81
|
+
- 🔹 Giữ skill đủ hẹp để agent có thể quyết định khi nào dùng
|
|
82
|
+
- 🔹 Tối ưu cho tái sử dụng, không phải cho chi tiết dự án một lần
|
|
83
|
+
- 🔹 Ưu tiên hướng dẫn portable hơn cú pháp vendor-specific
|
|
84
|
+
- 🔹 Tránh giả định ngầm về tool, framework, hay tên thư mục
|
|
85
|
+
- 🔹 Hỏi một câu ngắn khi cần thay vì viết xung quanh sự mơ hồ
|
|
86
|
+
- 🔹 Nếu skill thay đổi code hoặc trạng thái task, nêu rõ bằng chứng nào tính là hoàn thành
|
|
87
|
+
|
|
88
|
+
### ✅ Ngưỡng Chất Lượng
|
|
89
|
+
|
|
90
|
+
Một skill đủ tốt để giữ khi:
|
|
91
|
+
|
|
92
|
+
| | Tiêu chí |
|
|
93
|
+
|---|---|
|
|
94
|
+
| 🎯 | Có trigger rõ ràng |
|
|
95
|
+
| 🔄 | Có workflow lặp lại được |
|
|
96
|
+
| 📋 | Cho output shape ổn định |
|
|
97
|
+
| 🛡️ | Giúp agent tránh failure mode phổ biến |
|
|
98
|
+
| 💡 | Có example thực tế |
|
|
99
|
+
| ➡️ | Làm rõ bước tiếp theo cần làm gì |
|
|
100
|
+
|
|
101
|
+
### 🚫 Anti-Pattern
|
|
102
|
+
|
|
103
|
+
- ❌ Skill cố giải quyết mọi task cùng lúc
|
|
104
|
+
- ❌ Prompt mơ hồ kiểu "hãy là kỹ sư giỏi"
|
|
105
|
+
- ❌ Lý thuyết dài mà không có bước hành động
|
|
106
|
+
- ❌ Giả định cứng về một nền tảng agent
|
|
107
|
+
- ❌ Nhúng secret, token cá nhân, hay đường dẫn máy
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Knowledge Layer
|
|
2
|
+
|
|
3
|
+
This directory stores reusable context that helps skills perform better.
|
|
4
|
+
|
|
5
|
+
- `global/` is for cross-project principles and heuristics.
|
|
6
|
+
- `project/` is for repo-specific notes that should travel with a project.
|
|
7
|
+
- `working/` is for temporary session notes that may later be promoted.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Debugging Patterns
|
|
2
|
+
|
|
3
|
+
## Why This Exists
|
|
4
|
+
|
|
5
|
+
These notes capture a repeatable way to debug without thrashing.
|
|
6
|
+
|
|
7
|
+
## Patterns
|
|
8
|
+
|
|
9
|
+
- Restate the symptom before touching the code.
|
|
10
|
+
- Reproduce the issue if possible.
|
|
11
|
+
- Narrow the code path before editing multiple modules.
|
|
12
|
+
- Separate evidence from hypothesis.
|
|
13
|
+
- Prefer one confirming experiment over many speculative changes.
|
|
14
|
+
- Add regression coverage once the cause is understood.
|
|
15
|
+
|
|
16
|
+
## What Should Not Be Assumed
|
|
17
|
+
|
|
18
|
+
- that the stack trace names the real root cause
|
|
19
|
+
- that the latest changed file is the only relevant area
|
|
20
|
+
- that a flaky issue can be solved by adding retries everywhere
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Engineering Principles
|
|
2
|
+
|
|
3
|
+
## Why This Exists
|
|
4
|
+
|
|
5
|
+
These notes capture stable preferences for how work should be done across projects.
|
|
6
|
+
|
|
7
|
+
## Principles
|
|
8
|
+
|
|
9
|
+
- Read the code before proposing structure changes.
|
|
10
|
+
- Prefer the smallest correct change over a broad rewrite.
|
|
11
|
+
- Reuse existing patterns unless they are clearly broken.
|
|
12
|
+
- Refine vague requests before pretending they are implementation-ready.
|
|
13
|
+
- Ask one short blocking question instead of guessing on critical behavior.
|
|
14
|
+
- Verify important claims with code, tests, or commands.
|
|
15
|
+
- Do not claim completion without fresh evidence.
|
|
16
|
+
- Do not add compatibility layers unless there is a concrete need.
|
|
17
|
+
- Do not revert or overwrite user changes unless explicitly asked.
|
|
18
|
+
|
|
19
|
+
## What Should Not Be Assumed
|
|
20
|
+
|
|
21
|
+
- that newer abstractions are automatically better
|
|
22
|
+
- that a missing test means the behavior is unimportant
|
|
23
|
+
- that docs are always up to date
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Evidence Before Claims
|
|
2
|
+
|
|
3
|
+
## Why This Exists
|
|
4
|
+
|
|
5
|
+
Agents often overstate success after editing code. This note exists to stop that pattern.
|
|
6
|
+
|
|
7
|
+
## Rules
|
|
8
|
+
|
|
9
|
+
- Do not say a fix works unless the relevant check was run fresh.
|
|
10
|
+
- Do not say tests pass unless the test command actually passed.
|
|
11
|
+
- Do not say a bug is fixed unless the original symptom or regression test was verified.
|
|
12
|
+
- Do not rely on partial checks when the claim requires a broader one.
|
|
13
|
+
- If verification is blocked, say exactly what is blocked and what remains unproven.
|
|
14
|
+
|
|
15
|
+
## Examples
|
|
16
|
+
|
|
17
|
+
- Good: `I ran the targeted test and it now passes.`
|
|
18
|
+
- Bad: `This should be fixed now.`
|
|
19
|
+
- Good: `I could not run the full build because dependency installation is missing.`
|
|
20
|
+
- Bad: `Everything looks good.`
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Review Heuristics
|
|
2
|
+
|
|
3
|
+
## Why This Exists
|
|
4
|
+
|
|
5
|
+
These heuristics help keep reviews focused on risk and user impact.
|
|
6
|
+
|
|
7
|
+
## Heuristics
|
|
8
|
+
|
|
9
|
+
- Check whether the change can break existing behavior.
|
|
10
|
+
- Check whether edge cases are now unhandled.
|
|
11
|
+
- Check whether data shape, timing, or ordering assumptions changed.
|
|
12
|
+
- Check whether migrations, flags, or rollout behavior were considered.
|
|
13
|
+
- Check whether tests still prove the intended behavior.
|
|
14
|
+
- Prefer comments that explain impact, not just implementation taste.
|
|
15
|
+
|
|
16
|
+
## Common Categories
|
|
17
|
+
|
|
18
|
+
- correctness
|
|
19
|
+
- regression risk
|
|
20
|
+
- data loss or corruption
|
|
21
|
+
- authorization or security
|
|
22
|
+
- performance cliffs
|
|
23
|
+
- missing coverage
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Skill Triggering Rules
|
|
2
|
+
|
|
3
|
+
## Why This Exists
|
|
4
|
+
|
|
5
|
+
These notes keep the library behavior consistent across agents and sessions.
|
|
6
|
+
|
|
7
|
+
## Rules
|
|
8
|
+
|
|
9
|
+
- Start with `using-skills` when the task shape is unclear.
|
|
10
|
+
- Use `brainstorming` when the request is still fuzzy and the user is really asking for a clarified direction.
|
|
11
|
+
- Use `planning` before code changes for multi-file, ambiguous, or higher-risk work.
|
|
12
|
+
- Use `feature-delivery` only after the implementation path is concrete enough to execute.
|
|
13
|
+
- Use `bug-triage` before fixing an issue whose cause is not yet grounded.
|
|
14
|
+
- Use `verification-before-completion` before any strong success claim.
|
|
15
|
+
- Use `code-review` for review requests and post-implementation risk checks.
|
|
16
|
+
- Use `repo-onboarding` when entering an unfamiliar codebase before productive work can begin.
|
|
17
|
+
- Use `docs-writer` for documentation tasks in a repo whose structure is already understood.
|
|
18
|
+
- Use `refactor-safe` for restructuring, extracting, or migrating code without intended behavior change.
|
|
19
|
+
|
|
20
|
+
## What Should Not Be Assumed
|
|
21
|
+
|
|
22
|
+
- that every request is ready for implementation immediately
|
|
23
|
+
- that planning is unnecessary just because the task sounds small
|
|
24
|
+
- that code edits themselves prove success
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Project Knowledge
|
|
2
|
+
|
|
3
|
+
Use this directory for per-project notes such as:
|
|
4
|
+
|
|
5
|
+
- architecture summaries
|
|
6
|
+
- important commands
|
|
7
|
+
- coding conventions that differ from your defaults
|
|
8
|
+
- domain rules and rollout constraints
|
|
9
|
+
|
|
10
|
+
Keep these notes tied to the real project and update them when the code changes.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Working Knowledge
|
|
2
|
+
|
|
3
|
+
Use this directory for temporary notes that matter during active work, for example:
|
|
4
|
+
|
|
5
|
+
- current hypotheses
|
|
6
|
+
- unresolved questions
|
|
7
|
+
- temporary decision logs
|
|
8
|
+
- follow-up items to promote later
|
|
9
|
+
|
|
10
|
+
Delete or promote these notes regularly so this layer stays useful.
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@anionzo/skill",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Personal AI Skill Library — vendor-neutral, multi-agent skill library for AI-powered software engineering",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"validate": "bash scripts/validate-skills",
|
|
7
|
+
"sync": "bash scripts/sync-platform-files",
|
|
8
|
+
"postinstall": "echo \"\\n🧠 @anionzo/skill installed successfully!\\n\\n📁 Skills: node_modules/@anionzo/skill/skills/\\n📚 Knowledge: node_modules/@anionzo/skill/knowledge/\\n📄 Docs: node_modules/@anionzo/skill/docs/\\n🌐 i18n: node_modules/@anionzo/skill/i18n/\\n\\n🔌 To use: copy generated/ output to your project\\n bash node_modules/@anionzo/skill/scripts/sync-platform-files\\n\""
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"skills/",
|
|
12
|
+
"knowledge/",
|
|
13
|
+
"docs/",
|
|
14
|
+
"i18n/",
|
|
15
|
+
"adapters/",
|
|
16
|
+
"templates/",
|
|
17
|
+
"scripts/",
|
|
18
|
+
"CONTRIBUTING.md",
|
|
19
|
+
"LICENSE",
|
|
20
|
+
"README.md"
|
|
21
|
+
],
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/anionzo/skill.git"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"ai",
|
|
28
|
+
"skills",
|
|
29
|
+
"agent",
|
|
30
|
+
"claude",
|
|
31
|
+
"opencode",
|
|
32
|
+
"gemini",
|
|
33
|
+
"copilot",
|
|
34
|
+
"coding-agent",
|
|
35
|
+
"workflow"
|
|
36
|
+
],
|
|
37
|
+
"author": "Mai Trung Tiến",
|
|
38
|
+
"license": "MIT",
|
|
39
|
+
"bugs": {
|
|
40
|
+
"url": "https://github.com/anionzo/skill/issues"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://github.com/anionzo/skill#readme"
|
|
43
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
|
|
3
|
+
set -eu
|
|
4
|
+
|
|
5
|
+
ROOT=$(CDPATH= cd -- "$(dirname "$0")/.." && pwd)
|
|
6
|
+
OUT=${1:-"$ROOT/generated"}
|
|
7
|
+
CATALOG_FILE="$OUT/.skill-catalog"
|
|
8
|
+
|
|
9
|
+
mkdir -p "$OUT"
|
|
10
|
+
|
|
11
|
+
build_catalog() {
|
|
12
|
+
: > "$CATALOG_FILE"
|
|
13
|
+
|
|
14
|
+
for meta in "$ROOT"/skills/*/meta.yaml; do
|
|
15
|
+
[ -f "$meta" ] || continue
|
|
16
|
+
|
|
17
|
+
name=$(sed -n 's/^name:[[:space:]]*//p' "$meta" | sed -n '1p')
|
|
18
|
+
summary=$(sed -n 's/^summary:[[:space:]]*//p' "$meta" | sed -n '1p')
|
|
19
|
+
|
|
20
|
+
printf '%s|%s\n' "$name" "$summary" >> "$CATALOG_FILE"
|
|
21
|
+
done
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
write_file() {
|
|
25
|
+
title=$1
|
|
26
|
+
target=$2
|
|
27
|
+
|
|
28
|
+
{
|
|
29
|
+
printf '<!-- Generated by scripts/sync-platform-files -->\n'
|
|
30
|
+
printf '# %s\n\n' "$title"
|
|
31
|
+
printf 'Start with `skills/using-skills/SKILL.md` when the task shape is unclear. Use one primary skill at a time, then pull in the smallest amount of supporting knowledge needed.\n\n'
|
|
32
|
+
|
|
33
|
+
printf '## Core Files\n\n'
|
|
34
|
+
printf -- '- `skills/using-skills/SKILL.md`\n'
|
|
35
|
+
printf -- '- `knowledge/global/engineering-principles.md`\n'
|
|
36
|
+
printf -- '- `knowledge/global/review-heuristics.md`\n'
|
|
37
|
+
printf -- '- `knowledge/global/debugging-patterns.md`\n'
|
|
38
|
+
printf -- '- `knowledge/global/evidence-before-claims.md`\n'
|
|
39
|
+
printf -- '- `knowledge/global/skill-triggering-rules.md`\n'
|
|
40
|
+
printf -- '- `docs/skill-spec.md`\n\n'
|
|
41
|
+
|
|
42
|
+
printf '## Working Rules\n\n'
|
|
43
|
+
printf -- '- Prefer the smallest correct change.\n'
|
|
44
|
+
printf -- '- Read the repo and nearby patterns before editing.\n'
|
|
45
|
+
printf -- '- Ask only the shortest blocking question when a decision is missing.\n'
|
|
46
|
+
printf -- '- Verify important claims with code, tests, or commands when possible.\n'
|
|
47
|
+
printf -- '- Keep summaries concise and grounded in files you inspected.\n\n'
|
|
48
|
+
|
|
49
|
+
printf '## Skill Catalog\n\n'
|
|
50
|
+
while IFS='|' read -r name summary; do
|
|
51
|
+
[ -n "$name" ] || continue
|
|
52
|
+
printf -- '- `%s`: %s\n' "$name" "$summary"
|
|
53
|
+
done < "$CATALOG_FILE"
|
|
54
|
+
|
|
55
|
+
printf '\n## Suggested Flow\n\n'
|
|
56
|
+
printf '1. Route with `using-skills` when unsure.\n'
|
|
57
|
+
printf '2. Load one primary skill that matches the current task.\n'
|
|
58
|
+
printf '3. Pull in `knowledge/project/` notes when working inside a real project.\n'
|
|
59
|
+
printf '4. Verify the outcome before declaring the work complete.\n'
|
|
60
|
+
} > "$target"
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
build_catalog
|
|
64
|
+
|
|
65
|
+
write_file "Claude Code Instructions" "$OUT/CLAUDE.md"
|
|
66
|
+
write_file "OpenCode Instructions" "$OUT/OPENCODE.md"
|
|
67
|
+
write_file "Gemini Instructions" "$OUT/GEMINI.md"
|
|
68
|
+
write_file "Generic Agent Instructions" "$OUT/AGENTS.md"
|
|
69
|
+
write_file "GitHub Copilot Instructions" "$OUT/copilot-instructions.md"
|
|
70
|
+
|
|
71
|
+
rm -f "$CATALOG_FILE"
|
|
72
|
+
|
|
73
|
+
printf 'Generated platform files in %s\n' "$OUT"
|