@wipal/agent-team 1.0.3 → 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.
Files changed (124) hide show
  1. package/.claude/commands/skills/discover.md +127 -0
  2. package/.claude/commands/skills/install.md +225 -0
  3. package/.claude/commands/skills/review.md +234 -0
  4. package/.claude/commands/utils/learn.md +142 -0
  5. package/.claude/commands/utils/retrospect.md +62 -0
  6. package/.claude/commands/utils/switch.md +113 -0
  7. package/.claude/commands/utils/sync.md +183 -0
  8. package/.claude/rules/common/general-rules.md +6 -0
  9. package/.claude/rules/role-rules/dev-be-rules.md +241 -0
  10. package/.claude/rules/role-rules/dev-fe-rules.md +76 -0
  11. package/.claude/skills/SKILL-INDEX.md +24 -5
  12. package/.claude/skills/core/knowledge-graph/SKILL.md +214 -0
  13. package/.claude/skills/core/sequential-thinking/SKILL.md +112 -0
  14. package/.claude/skills/core/sequential-thinking/references/advanced.md +122 -0
  15. package/.claude/skills/core/sequential-thinking/references/examples.md +274 -0
  16. package/.claude/skills/domain/architecture/c4-architecture/SKILL.md +314 -0
  17. package/.claude/skills/domain/architecture/c4-architecture/references/advanced-patterns.md +552 -0
  18. package/.claude/skills/domain/architecture/c4-architecture/references/c4-syntax.md +492 -0
  19. package/.claude/skills/domain/architecture/c4-architecture/references/common-mistakes.md +437 -0
  20. package/.claude/skills/domain/architecture/mermaid-diagrams/SKILL.md +238 -0
  21. package/.claude/skills/domain/architecture/mermaid-diagrams/references/advanced-features.md +556 -0
  22. package/.claude/skills/domain/architecture/mermaid-diagrams/references/architecture-diagrams.md +192 -0
  23. package/.claude/skills/domain/architecture/mermaid-diagrams/references/c4-diagrams.md +410 -0
  24. package/.claude/skills/domain/architecture/mermaid-diagrams/references/class-diagrams.md +361 -0
  25. package/.claude/skills/domain/architecture/mermaid-diagrams/references/erd-diagrams.md +510 -0
  26. package/.claude/skills/domain/architecture/mermaid-diagrams/references/flowcharts.md +450 -0
  27. package/.claude/skills/domain/architecture/mermaid-diagrams/references/sequence-diagrams.md +394 -0
  28. package/.claude/skills/domain/backend/testing-be/SKILL.md +121 -17
  29. package/.claude/skills/domain/design/design-system/SKILL.md +169 -0
  30. package/.claude/skills/domain/design/html-css-output/SKILL.md +253 -0
  31. package/.claude/skills/domain/design/mockup-creation/SKILL.md +230 -0
  32. package/.claude/skills/domain/design/responsive-design/SKILL.md +207 -0
  33. package/.claude/skills/domain/design/ui-design/SKILL.md +124 -0
  34. package/.claude/skills/domain/frontend/testing-fe/SKILL.md +143 -38
  35. package/.claude/skills/domain/frontend/ui-ux-pro-max/README.md +45 -0
  36. package/.claude/skills/domain/frontend/ui-ux-pro-max/SKILL.md +404 -0
  37. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/charts.csv +26 -0
  38. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/colors.csv +97 -0
  39. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/icons.csv +101 -0
  40. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/landing.csv +31 -0
  41. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/products.csv +97 -0
  42. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/react-performance.csv +45 -0
  43. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/astro.csv +54 -0
  44. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  45. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  46. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  47. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  48. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  49. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  50. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  51. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/react.csv +54 -0
  52. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  53. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  54. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  55. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  56. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/styles.csv +68 -0
  57. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/typography.csv +58 -0
  58. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  59. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  60. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/web-interface.csv +31 -0
  61. package/.claude/skills/domain/frontend/ui-ux-pro-max/scripts/core.py +253 -0
  62. package/.claude/skills/domain/frontend/ui-ux-pro-max/scripts/design_system.py +1067 -0
  63. package/.claude/skills/domain/frontend/ui-ux-pro-max/scripts/search.py +114 -0
  64. package/.claude/skills/domain/product/requirements-clarity/SKILL.md +340 -0
  65. package/.claude/skills/skills-registry.yaml +103 -8
  66. package/README.md +107 -33
  67. package/README.npm.md +252 -0
  68. package/TUTORIAL.md +256 -0
  69. package/bin/agent-team.js +26 -7
  70. package/config/roles.yaml +107 -0
  71. package/docs/01-architecture.md +699 -0
  72. package/docs/02-setup-guide.md +634 -0
  73. package/docs/03-skills-guide.md +628 -0
  74. package/docs/04-workflows.md +792 -0
  75. package/docs/05-model-strategy.md +550 -0
  76. package/docs/06-extend-guide.md +1226 -0
  77. package/docs/07-quick-reference.md +578 -0
  78. package/docs/08-skills-discovery.md +342 -0
  79. package/docs/README.md +134 -0
  80. package/docs/rqm.md +560 -0
  81. package/package.json +10 -4
  82. package/scripts/postinstall.js +46 -0
  83. package/src/commands/add.js +131 -67
  84. package/src/commands/init.js +419 -9
  85. package/src/commands/list.js +20 -16
  86. package/src/commands/projects.js +127 -0
  87. package/src/commands/setup-hooks.js +261 -0
  88. package/src/index.js +0 -1
  89. package/src/utils/file-utils.js +147 -50
  90. package/src/utils/global-registry.js +224 -0
  91. package/templates/CLAUDE.md.tmpl +128 -20
  92. package/templates/MEMORY.md.tmpl +119 -0
  93. package/templates/agent.md.tmpl +205 -0
  94. package/templates/code/nestjs-controller.ts.tmpl +49 -0
  95. package/templates/code/nestjs-dto.ts.tmpl +63 -0
  96. package/templates/code/nestjs-service.ts.tmpl +45 -0
  97. package/templates/code/react-component.tsx.tmpl +24 -0
  98. package/templates/code/react-hook.ts.tmpl +54 -0
  99. package/templates/code/test.spec.ts.tmpl +50 -0
  100. package/templates/code/vue-component.vue.tmpl +49 -0
  101. package/templates/code/vue-composable.ts.tmpl +54 -0
  102. package/templates/knowledge.md.tmpl +152 -17
  103. package/templates/meeting-notes.md.tmpl +110 -0
  104. package/templates/memory/hooks.memory.json +50 -0
  105. package/templates/memory/settings.memory.json +16 -0
  106. package/templates/reports/bug-report.md.tmpl +164 -0
  107. package/templates/reports/code-review.md.tmpl +201 -0
  108. package/templates/reports/sprint-report.md.tmpl +218 -0
  109. package/templates/roles/ba.md +53 -0
  110. package/templates/roles/designer.md +82 -0
  111. package/templates/roles/dev-be.md +49 -0
  112. package/templates/roles/dev-fe.md +49 -0
  113. package/templates/roles/devops.md +53 -0
  114. package/templates/roles/pm.md +49 -0
  115. package/templates/roles/qa.md +53 -0
  116. package/templates/roles/sa.md +49 -0
  117. package/templates/roles/tech-lead.md +132 -0
  118. package/templates/skills/memory/memory-status.md +78 -0
  119. package/templates/skills/memory/recall.md +160 -0
  120. package/templates/skills/memory/reflect.md +168 -0
  121. package/templates/skills/memory/remember.md +105 -0
  122. package/templates/tasks/lessons.md.tmpl +77 -0
  123. package/templates/tasks/todo.md.tmpl +53 -0
  124. package/src/commands/switch.js +0 -53
@@ -0,0 +1,628 @@
1
+ # Skills Guide
2
+
3
+ > **Phiên bản:** 1.0
4
+ > **Cập nhật:** 2025-02-25
5
+ > **Related:** [Architecture](01-architecture.md) | [Setup Guide](02-setup-guide.md) | [Extend Guide](06-extend-guide.md)
6
+
7
+ ---
8
+
9
+ ## 📋 Mục Lục
10
+
11
+ 1. [Skills Overview](#-skills-overview)
12
+ 2. [Skill Sources Policy](#-skill-sources-policy)
13
+ 3. [Official Sources](#-official-sources)
14
+ 4. [Community Sources](#-community-sources)
15
+ 5. [Installation Strategies](#-installation-strategies)
16
+ 6. [Skill Categories](#-skill-categories)
17
+ 7. [Skill Format](#-skill-format)
18
+ 8. [Skill Verification](#-skill-verification)
19
+ 9. [Best Practices](#-best-practices)
20
+
21
+ ---
22
+
23
+ ## 🎯 Skills Overview
24
+
25
+ Skills là reusable instruction templates và slash commands mà agent có thể sử dụng.
26
+
27
+ ### Categorization System
28
+
29
+ ```
30
+ skills/
31
+ ├── base/ # Shared across ALL roles
32
+ │ ├── code-review/
33
+ │ ├── git-automation/
34
+ │ └── retrospect-work/
35
+
36
+ ├── roles/ # Role-specific
37
+ │ ├── dev-fe/
38
+ │ │ ├── frontend-design/
39
+ │ │ └── accessibility/
40
+ │ ├── dev-be/
41
+ │ │ ├── api-design/
42
+ │ │ └── database-design/
43
+ │ └── qa/
44
+ │ └── test-planning/
45
+
46
+ └── variants/ # Tech-specific
47
+ ├── frameworks/
48
+ │ ├── react/
49
+ │ └── vue/
50
+ ├── styling/
51
+ │ └── tailwind/
52
+ └── testing/
53
+ ├── vitest/
54
+ └── playwright/
55
+ ```
56
+
57
+ ---
58
+
59
+ ## 📜 Skill Sources Policy
60
+
61
+ ```
62
+ ┌─────────────────────────────────────────────────────────────────────────────┐
63
+ │ SKILL SOURCES POLICY │
64
+ ├─────────────────────────────────────────────────────────────────────────────┤
65
+ │ │
66
+ │ ┌─────────────────────────────────────────────────────────────────────┐ │
67
+ │ │ OFFICIAL SOURCES (INSTALL OK) │ │
68
+ │ │ Có thể install/reference │ │
69
+ │ ├─────────────────────────────────────────────────────────────────────┤ │
70
+ │ │ ✅ Anthropic → github.com/anthropics/skills │ │
71
+ │ │ ✅ Vercel Labs → github.com/vercel-labs/agent-skills │ │
72
+ │ │ ✅ Microsoft → github.com/microsoft/skills │ │
73
+ │ │ ✅ Google → github.com/google/gemini-skills │ │
74
+ │ │ ✅ Meta/Facebook → github.com/facebook/llama-recipes │ │
75
+ │ │ ✅ Cloudflare → github.com/cloudflare/agents-sdk │ │
76
+ │ │ ✅ Stripe → github.com/stripe/agent-skills │ │
77
+ │ │ ✅ Expo → github.com/expo/expo-skills │ │
78
+ │ │ ✅ Sentry → github.com/getsentry/agent-skills │ │
79
+ │ └─────────────────────────────────────────────────────────────────────┘ │
80
+ │ │
81
+ │ ┌─────────────────────────────────────────────────────────────────────┐ │
82
+ │ │ COMMUNITY SOURCES (MUST COPY) │ │
83
+ │ │ PHẢI COPY vào source code │ │
84
+ │ ├─────────────────────────────────────────────────────────────────────┤ │
85
+ │ │ ⚠️ ClaudeKit → github.com/mrgoonie/claudekit-skills │ │
86
+ │ │ ⚠️ VoltAgent → github.com/VoltAgent/awesome-agent-skills │ │
87
+ │ │ ⚠️ Individual devs → muratcankoylan, obra, ibelick, etc. │ │
88
+ │ │ ⚠️ Any other repo → NOT from official tech companies │ │
89
+ │ └─────────────────────────────────────────────────────────────────────┘ │
90
+ │ │
91
+ └─────────────────────────────────────────────────────────────────────────────┘
92
+ ```
93
+
94
+ ### Why COPY for Community?
95
+
96
+ | Reason | Description |
97
+ |--------|-------------|
98
+ | ✅ **Độc lập** | Không cần internet để dùng |
99
+ | ✅ **Version control** | Skills được track trong git |
100
+ | ✅ **Customizable** | Có thể sửa theo project needs |
101
+ | ✅ **Stable** | Không bị break khi external repo update |
102
+ | ✅ **Reviewable** | PR review cho skill changes |
103
+ | ✅ **Offline** | Hoạt động khi không có mạng |
104
+
105
+ ---
106
+
107
+ ## ✅ Official Sources
108
+
109
+ ### Anthropic Skills
110
+
111
+ **Source:** https://github.com/anthropics/skills
112
+
113
+ | Skill | Description | Roles |
114
+ |-------|-------------|-------|
115
+ | `docx` | Word docs với formatting, comments | BA, PM, All |
116
+ | `pdf` | Extract text/tables, merge, split PDFs | BA, PM, QA |
117
+ | `pptx` | PowerPoint presentations | PM, Designer |
118
+ | `xlsx` | Excel với formulas, charts, data | BA, PM, QA |
119
+ | `frontend-design` | Production-grade UI components | Dev FE, Designer |
120
+ | `web-artifacts-builder` | React/Tailwind multi-component | Dev FE |
121
+ | `canvas-design` | Visual art, posters (PNG/PDF) | Designer |
122
+ | `brand-guidelines` | Apply brand colors & typography | Designer |
123
+ | `internal-comms` | Status updates, team communication | PM, All |
124
+ | `skill-creator` | Guide to create new skills | All |
125
+ | `git-automation` | Commit, PR, merge automation | All Devs |
126
+ | `webapp-testing` | Playwright browser automation | QA, QA Automation |
127
+
128
+ ### Vercel Labs Skills
129
+
130
+ **Source:** https://github.com/vercel-labs/agent-skills
131
+
132
+ | Skill | Description | Roles |
133
+ |-------|-------------|-------|
134
+ | `react-best-practices` | 40+ rules, 8 categories - performance | Dev FE |
135
+ | `web-design-guidelines` | 100+ rules - accessibility, UX audit | Dev FE, QA |
136
+ | `react-native-guidelines` | 16 rules - mobile performance | Dev Mobile |
137
+ | `composition-patterns` | Compound components, state lifting | Dev FE |
138
+ | `vercel-deploy-claimable` | Deploy to Vercel instantly | DevOps |
139
+
140
+ ### Microsoft Skills
141
+
142
+ **Source:** https://github.com/microsoft/skills
143
+
144
+ | Skill | Description | Roles |
145
+ |-------|-------------|-------|
146
+ | `azure-ai-agents` | Azure cloud integration | Dev BE, DevOps |
147
+ | `azure-identity` | Azure authentication | Dev BE |
148
+ | `fastapi-router` | FastAPI routing patterns | Dev BE |
149
+ | `pydantic-models` | Pydantic model patterns | Dev BE |
150
+ | `typescript-patterns` | TypeScript best practices | Dev FE/BE |
151
+
152
+ ### Other Official Sources
153
+
154
+ | Source | URL | Notable Skills |
155
+ |--------|-----|----------------|
156
+ | **Google** | github.com/google/gemini-skills | gemini-skills, ai-multimodal |
157
+ | **Meta/Facebook** | github.com/facebookresearch/llama-recipes | llama-recipes |
158
+ | **Cloudflare** | github.com/cloudflare/agents-sdk | agents-sdk, building-mcp-server |
159
+ | **Stripe** | github.com/stripe/agent-skills | stripe-best-practices |
160
+ | **Expo** | github.com/expo/expo-skills | expo-app-design |
161
+ | **Sentry** | github.com/getsentry/agent-skills | code-review, find-bugs |
162
+
163
+ ---
164
+
165
+ ## 👥 Community Sources
166
+
167
+ ### ClaudeKit Skills
168
+
169
+ **Source:** https://github.com/mrgoonie/claudekit-skills
170
+
171
+ **Key Patterns Learned:**
172
+ - Plugin Marketplace System
173
+ - Reference Files for detailed content
174
+ - Subagent Pattern for complex tasks
175
+ - Verification Gates before completion
176
+
177
+ | Category | Skills |
178
+ |----------|--------|
179
+ | **Debugging** | `defense-in-depth`, `root-cause-tracing`, `systematic-debugging`, `verification-before-completion` |
180
+ | **Problem Solving** | `collision-zone-thinking`, `inversion-exercise`, `meta-pattern-recognition`, `scale-game`, `simplification-cascades`, `when-stuck` |
181
+ | **AI/ML** | `ai-multimodal`, `context-engineering` |
182
+ | **MCP** | `mcp-management`, `mcp-builder` |
183
+ | **Code Review** | `code-review` |
184
+
185
+ ### VoltAgent Skills (380+ Curated)
186
+
187
+ **Source:** https://github.com/VoltAgent/awesome-agent-skills
188
+
189
+ Curated list of 380+ skills from 25+ official teams.
190
+
191
+ **Notable Categories:**
192
+
193
+ | Category | Skills | Source |
194
+ |----------|--------|--------|
195
+ | **Context Engineering** | context-fundamentals, context-optimization | muratcankoylan |
196
+ | **Development** | test-driven-development, subagent-driven-development | obra |
197
+ | **UI/UX** | ui-skills, apple-hig-skills, taste-skill | ibelick |
198
+ | **Marketing** | marketingskills (23+ skills) | coreyhaines31 |
199
+ | **Specialized** | swiftui-expert-skill, threejs-skills | AvdLee, CloudAI-X |
200
+
201
+ ### Other Community Sources
202
+
203
+ | Source | URL | Skills to Copy |
204
+ |--------|-----|----------------|
205
+ | **frontend-slides** | github.com/zarazhangrui/frontend-slides | Presentation generation |
206
+ | **Trail of Bits** | github.com/trailofbits | Security skills, static-analysis |
207
+ | **Individual Devs** | Various | context-engineering, ui-skills |
208
+
209
+ ---
210
+
211
+ ## 🔧 Installation Strategies
212
+
213
+ ### Strategy Overview
214
+
215
+ | Strategy | Use For | Pros | Cons |
216
+ |----------|---------|------|------|
217
+ | **COPY** | Community, Custom | Independent, customizable | No auto-updates |
218
+ | **SYMLINK** | Shared base skills | Consistent, auto-update | Can't customize per-agent |
219
+ | **REFERENCE** | Official sources | Always latest | Requires internet |
220
+
221
+ ### COPY Strategy (Recommended for Community)
222
+
223
+ ```bash
224
+ # Copy skill to agent
225
+ cp -r .claude/skills/community/debugging .claude/agents/payment-fe/skills/
226
+
227
+ # Or use script
228
+ ./agent.sh copy-skill payment-fe debugging --source community
229
+ ```
230
+
231
+ **When to use:**
232
+ - Community skills (ClaudeKit, VoltAgent)
233
+ - Custom skills for specific project
234
+ - Skills that need modification
235
+
236
+ ### SYMLINK Strategy (Recommended for Shared)
237
+
238
+ ```bash
239
+ # Create symlink to shared skill
240
+ ln -s ../../shared-skills/frontend-design .claude/agents/payment-fe/skills/
241
+
242
+ # Or use script
243
+ ./agent.sh link-skill payment-fe frontend-design
244
+ ```
245
+
246
+ **When to use:**
247
+ - Base skills shared by all agents
248
+ - Skills that should be consistent across agents
249
+ - Want updates to propagate automatically
250
+
251
+ ### REFERENCE Strategy (For Official)
252
+
253
+ ```bash
254
+ # Install from official source
255
+ npx ai-agent-skills install anthropics/skills \
256
+ --target .claude/skills/official/anthropic
257
+
258
+ # Reference in agent config
259
+ # CLAUDE.md:
260
+ # skills:
261
+ # external:
262
+ # - anthropics/skills/docx
263
+ # - anthropics/skills/pdf
264
+ ```
265
+
266
+ **When to use:**
267
+ - Official skills from trusted sources
268
+ - Want always latest version
269
+ - Accept internet dependency
270
+
271
+ ### Auto Strategy Selection
272
+
273
+ Setup script tự động chọn strategy:
274
+
275
+ ```bash
276
+ # Script logic:
277
+ if skill in official_sources:
278
+ strategy = "REFERENCE" # or INSTALL
279
+ elif skill in base_skills:
280
+ strategy = "SYMLINK"
281
+ else: # community or variant
282
+ strategy = "COPY"
283
+ ```
284
+
285
+ ---
286
+
287
+ ## 📁 Skill Categories
288
+
289
+ ### Base Skills (Shared)
290
+
291
+ ```text
292
+ .claude/skills/base/
293
+ ├── code-review/ # Code review checklist
294
+ ├── git-automation/ # Git workflow automation
295
+ └── retrospect-work/ # Self-learning mechanism
296
+ ```
297
+
298
+ ### Role-Specific Skills
299
+
300
+ ```text
301
+ .claude/skills/roles/
302
+ ├── dev-fe/
303
+ │ ├── frontend-design/ # UI component design
304
+ │ └── accessibility/ # A11y guidelines
305
+ ├── dev-be/
306
+ │ ├── api-design/ # RESTful API patterns
307
+ │ ├── database-design/ # Schema design
308
+ │ └── security/ # Security best practices
309
+ ├── qa/
310
+ │ ├── test-planning/ # Test case creation
311
+ │ └── bug-reporting/ # Bug report template
312
+ └── pm/
313
+ └── sprint-planning/ # Sprint planning workflow
314
+ ```
315
+
316
+ ### Variant Skills
317
+
318
+ ```text
319
+ .claude/skills/variants/
320
+ ├── frameworks/
321
+ │ ├── react/
322
+ │ │ ├── react-best-practices/
323
+ │ │ └── scaffold-react-page/
324
+ │ └── vue/
325
+ │ └── vue-patterns/
326
+ ├── styling/
327
+ │ └── tailwind/
328
+ │ └── tailwind-patterns/
329
+ └── testing/
330
+ ├── vitest/
331
+ └── playwright/
332
+ ```
333
+
334
+ ---
335
+
336
+ ## 📝 Skill Format
337
+
338
+ ### Standard Skill Structure
339
+
340
+ ```markdown
341
+ ---
342
+ name: skill-name
343
+ description: |
344
+ Detailed description of when to use this skill.
345
+ Multiple lines for clarity.
346
+ dependencies:
347
+ - required-skill-1
348
+ references:
349
+ - references/detailed-guide.md
350
+ ---
351
+
352
+ # Skill Title
353
+
354
+ Brief overview of the skill's purpose.
355
+
356
+ ## Core Principle
357
+ **One sentence that captures the essence.**
358
+
359
+ ## When to Use This Skill
360
+ ### Trigger Condition 1
361
+ - Situation A
362
+ - Situation B
363
+
364
+ ## Steps
365
+ ### Step 1: Identify
366
+ Description of identification step.
367
+
368
+ ### Step 2: Validate
369
+ Description of validation step.
370
+
371
+ ### Step 3: Execute
372
+ Description of execution step.
373
+
374
+ ## Rules
375
+ - ❌ What NOT to do
376
+ - ✅ What TO do
377
+
378
+ ## Output
379
+ - Output 1
380
+ - Output 2
381
+ ```
382
+
383
+ ### Skill with Reference Files
384
+
385
+ ```
386
+ .claude/skills/debugging/
387
+ ├── SKILL.md # Main skill (short)
388
+ └── references/
389
+ ├── defense-in-depth.md # Detailed guide
390
+ ├── systematic-debugging.md # Detailed guide
391
+ └── verification-protocol.md # Detailed guide
392
+ ```
393
+
394
+ ### Complete Skill Example
395
+
396
+ ```markdown
397
+ ---
398
+ name: scaffold-react-page
399
+ description: |
400
+ Tạo React page với routing, state management, và API integration.
401
+ Tự động scaffold file structure theo conventions.
402
+ version: 1.0.0
403
+ category: development
404
+ tags:
405
+ - react
406
+ - scaffolding
407
+ - frontend
408
+ variant: react
409
+ strategy: copy
410
+ depends_on:
411
+ - frontend-design
412
+ - react-best-practices
413
+ ---
414
+
415
+ # Skill: Scaffold React Page
416
+
417
+ ## Trigger
418
+ - Slash command: `/scaffold-react-page <page-name>`
419
+ - Hoặc: `/scaffold page <page-name> --variant react`
420
+
421
+ ## Prerequisites
422
+ - Context7 MCP connected
423
+ - Project has React setup
424
+
425
+ ## Inputs
426
+ - `page-name`: Tên page (e.g., "UserProfile")
427
+ - `--with-api`: Include API integration (default: true)
428
+ - `--with-state`: Include state management (default: zustand)
429
+ - `--with-test`: Include test file (default: true)
430
+
431
+ ## Steps
432
+
433
+ ### 1. Validate Context
434
+ Check if React is set up.
435
+
436
+ ### 2. Lookup Best Practices (via Context7)
437
+ Fetch React Router, TanStack Query, Zustand patterns.
438
+
439
+ ### 3. Create File Structure
440
+ ```
441
+ src/pages/{PageName}/
442
+ ├── index.tsx
443
+ ├── {PageName}.tsx
444
+ ├── {PageName}.module.css
445
+ ├── hooks/
446
+ │ └── use{PageName}.ts
447
+ ├── components/
448
+ └── types.ts
449
+ ```
450
+
451
+ ### 4. Generate Code
452
+ - Generate page component with routing
453
+ - Add state management
454
+ - Create API hooks
455
+ - Generate test file
456
+
457
+ ## Output
458
+ ```
459
+ ✅ Created page: {PageName}
460
+ 📄 src/pages/{PageName}/index.tsx
461
+ 📄 src/pages/{PageName}/{PageName}.tsx
462
+ ✏️ Updated: src/router/index.tsx
463
+ ```
464
+ ```
465
+
466
+ ---
467
+
468
+ ## ✅ Skill Verification
469
+
470
+ ### Check Script
471
+
472
+ ```bash
473
+ #!/bin/bash
474
+ # scripts/check-skills.sh
475
+
476
+ # Check all agents
477
+ ./agent.sh check --all
478
+
479
+ # Check specific agent
480
+ ./agent.sh check payment-fe
481
+
482
+ # Check and auto-fix
483
+ ./agent.sh check payment-fe --fix
484
+ ```
485
+
486
+ ### Verification Output
487
+
488
+ ```
489
+ ═══════════════════════════════════════════════════════════════
490
+ 🔍 SKILL CHECK - payment-fe
491
+ ═══════════════════════════════════════════════════════════════
492
+
493
+ 📁 Agent: payment-fe (dev-fe + react + tailwind + zustand)
494
+ ├── ✅ frontend-design (shared-skill, symlinked)
495
+ ├── ✅ react-best-practices (copied)
496
+ ├── ✅ tailwind-patterns (copied)
497
+ ├── ❌ zustand-patterns (MISSING)
498
+ ├── ✅ vitest-testing (copied)
499
+ └── ✅ git-automation (shared-skill, symlinked)
500
+
501
+ ═══════════════════════════════════════════════════════════════
502
+ 📊 SUMMARY
503
+ ═══════════════════════════════════════════════════════════════
504
+ Total skills required: 6
505
+ ✅ Available: 5
506
+ ❌ Missing: 1
507
+
508
+ ═══════════════════════════════════════════════════════════════
509
+ 🔧 AUTO-INSTALL (--fix mode)
510
+ ═══════════════════════════════════════════════════════════════
511
+
512
+ Installing missing skills...
513
+
514
+ [1/1] zustand-patterns
515
+ ├── Source: skills/variants/state/zustand/
516
+ ├── Type: COPY (variant-specific)
517
+ └── ✅ Copied to: .claude/agents/payment-fe/skills/
518
+
519
+ ═══════════════════════════════════════════════════════════════
520
+ ✅ ALL SKILLS INSTALLED SUCCESSFULLY
521
+ ═══════════════════════════════════════════════════════════════
522
+ ```
523
+
524
+ ### variants.json Tracking
525
+
526
+ ```json
527
+ {
528
+ "agent_name": "payment-fe",
529
+ "base_role": "dev-fe",
530
+
531
+ "installed_variants": {
532
+ "framework": {
533
+ "name": "react",
534
+ "skills": ["react-best-practices", "react-patterns"],
535
+ "strategy": "copy"
536
+ },
537
+ "styling": {
538
+ "name": "tailwind",
539
+ "skills": ["tailwind-patterns"],
540
+ "strategy": "copy"
541
+ },
542
+ "state": {
543
+ "name": "zustand",
544
+ "skills": ["zustand-patterns"],
545
+ "strategy": "copy"
546
+ }
547
+ },
548
+
549
+ "shared_skills": [
550
+ {
551
+ "name": "frontend-design",
552
+ "strategy": "symlink"
553
+ }
554
+ ]
555
+ }
556
+ ```
557
+
558
+ ---
559
+
560
+ ## 💡 Best Practices
561
+
562
+ ### 1. Skill Organization
563
+
564
+ ```text
565
+ ✅ DO:
566
+ - Keep skills focused on single responsibility
567
+ - Use reference files for detailed content
568
+ - Document dependencies clearly
569
+ - Version skills when making changes
570
+
571
+ ❌ DON'T:
572
+ - Create monolithic skills
573
+ - Duplicate content across skills
574
+ - Skip documentation
575
+ - Mix concerns in one skill
576
+ ```
577
+
578
+ ### 2. Installation Choices
579
+
580
+ ```text
581
+ ✅ DO:
582
+ - COPY community skills for independence
583
+ - SYMLINK shared base skills
584
+ - REFERENCE official skills when internet is OK
585
+
586
+ ❌ DON'T:
587
+ - SYMLINK variant-specific skills
588
+ - COPY official skills (wastes space)
589
+ - REFERENCE community skills (unreliable)
590
+ ```
591
+
592
+ ### 3. Skill Verification
593
+
594
+ ```text
595
+ ✅ DO:
596
+ - Run check after setup
597
+ - Use --fix to auto-install missing
598
+ - Review variants.json regularly
599
+
600
+ ❌ DON'T:
601
+ - Assume skills are installed
602
+ - Skip verification step
603
+ - Ignore missing skill warnings
604
+ ```
605
+
606
+ ### 4. Skill Updates
607
+
608
+ ```text
609
+ ✅ DO:
610
+ - Track skill versions
611
+ - Test after updates
612
+ - Document changes in changelog
613
+
614
+ ❌ DON'T:
615
+ - Update skills mid-sprint
616
+ - Update without testing
617
+ - Mix skill versions
618
+ ```
619
+
620
+ ---
621
+
622
+ ## 📚 Related Documentation
623
+
624
+ - [Architecture](01-architecture.md) - System architecture
625
+ - [Setup Guide](02-setup-guide.md) - Setup instructions
626
+ - [Workflows](04-workflows.md) - Using skills in workflows
627
+ - [Extend Guide](06-extend-guide.md) - Creating new skills
628
+ - [Quick Reference](07-quick-reference.md) - Cheat sheet