moai-adk 0.4.4__py3-none-any.whl → 0.4.7__py3-none-any.whl

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.

Potentially problematic release.


This version of moai-adk might be problematic. Click here for more details.

Files changed (191) hide show
  1. moai_adk/__init__.py +1 -1
  2. moai_adk/core/project/initializer.py +12 -5
  3. moai_adk/templates/.claude/agents/alfred/skill-factory.md +829 -0
  4. moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/SKILL.md +78 -77
  5. moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/examples.md +29 -0
  6. moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/reference.md +28 -0
  7. moai_adk/templates/.claude/skills/moai-alfred-debugger-pro/SKILL.md +87 -77
  8. moai_adk/templates/.claude/skills/moai-alfred-debugger-pro/examples.md +29 -0
  9. moai_adk/templates/.claude/skills/moai-alfred-debugger-pro/reference.md +28 -0
  10. moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/SKILL.md +76 -66
  11. moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/examples.md +29 -0
  12. moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/reference.md +28 -0
  13. moai_adk/templates/.claude/skills/moai-alfred-git-workflow/SKILL.md +86 -59
  14. moai_adk/templates/.claude/skills/moai-alfred-git-workflow/examples.md +29 -0
  15. moai_adk/templates/.claude/skills/moai-alfred-git-workflow/reference.md +29 -0
  16. moai_adk/templates/.claude/skills/moai-alfred-language-detection/SKILL.md +87 -73
  17. moai_adk/templates/.claude/skills/moai-alfred-language-detection/examples.md +29 -0
  18. moai_adk/templates/.claude/skills/moai-alfred-language-detection/reference.md +28 -0
  19. moai_adk/templates/.claude/skills/moai-alfred-performance-optimizer/SKILL.md +87 -79
  20. moai_adk/templates/.claude/skills/moai-alfred-performance-optimizer/examples.md +29 -0
  21. moai_adk/templates/.claude/skills/moai-alfred-performance-optimizer/reference.md +28 -0
  22. moai_adk/templates/.claude/skills/moai-alfred-refactoring-coach/SKILL.md +87 -71
  23. moai_adk/templates/.claude/skills/moai-alfred-refactoring-coach/examples.md +29 -0
  24. moai_adk/templates/.claude/skills/moai-alfred-refactoring-coach/reference.md +28 -0
  25. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/SKILL.md +78 -62
  26. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/examples.md +29 -0
  27. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/reference.md +28 -0
  28. moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/SKILL.md +78 -55
  29. moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/examples.md +29 -0
  30. moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/reference.md +28 -0
  31. moai_adk/templates/.claude/skills/moai-alfred-trust-validation/SKILL.md +78 -64
  32. moai_adk/templates/.claude/skills/moai-alfred-trust-validation/examples.md +29 -0
  33. moai_adk/templates/.claude/skills/moai-alfred-trust-validation/reference.md +28 -0
  34. moai_adk/templates/.claude/skills/moai-alfred-tui-survey/SKILL.md +604 -56
  35. moai_adk/templates/.claude/skills/moai-alfred-tui-survey/examples.md +974 -44
  36. moai_adk/templates/.claude/skills/moai-alfred-tui-survey/reference.md +801 -0
  37. moai_adk/templates/.claude/skills/moai-claude-code/SKILL.md +88 -61
  38. moai_adk/templates/.claude/skills/moai-claude-code/examples.md +16 -500
  39. moai_adk/templates/.claude/skills/moai-claude-code/reference.md +15 -420
  40. moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +234 -43
  41. moai_adk/templates/.claude/skills/moai-domain-backend/examples.md +1633 -0
  42. moai_adk/templates/.claude/skills/moai-domain-backend/reference.md +660 -0
  43. moai_adk/templates/.claude/skills/moai-domain-cli-tool/SKILL.md +97 -69
  44. moai_adk/templates/.claude/skills/moai-domain-cli-tool/examples.md +29 -0
  45. moai_adk/templates/.claude/skills/moai-domain-cli-tool/reference.md +30 -0
  46. moai_adk/templates/.claude/skills/moai-domain-data-science/SKILL.md +97 -72
  47. moai_adk/templates/.claude/skills/moai-domain-data-science/examples.md +29 -0
  48. moai_adk/templates/.claude/skills/moai-domain-data-science/reference.md +30 -0
  49. moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +97 -74
  50. moai_adk/templates/.claude/skills/moai-domain-database/examples.md +29 -0
  51. moai_adk/templates/.claude/skills/moai-domain-database/reference.md +30 -0
  52. moai_adk/templates/.claude/skills/moai-domain-devops/SKILL.md +98 -74
  53. moai_adk/templates/.claude/skills/moai-domain-devops/examples.md +29 -0
  54. moai_adk/templates/.claude/skills/moai-domain-devops/reference.md +31 -0
  55. moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +98 -73
  56. moai_adk/templates/.claude/skills/moai-domain-frontend/examples.md +29 -0
  57. moai_adk/templates/.claude/skills/moai-domain-frontend/reference.md +31 -0
  58. moai_adk/templates/.claude/skills/moai-domain-ml/SKILL.md +97 -73
  59. moai_adk/templates/.claude/skills/moai-domain-ml/examples.md +29 -0
  60. moai_adk/templates/.claude/skills/moai-domain-ml/reference.md +30 -0
  61. moai_adk/templates/.claude/skills/moai-domain-mobile-app/SKILL.md +97 -67
  62. moai_adk/templates/.claude/skills/moai-domain-mobile-app/examples.md +29 -0
  63. moai_adk/templates/.claude/skills/moai-domain-mobile-app/reference.md +30 -0
  64. moai_adk/templates/.claude/skills/moai-domain-security/SKILL.md +97 -79
  65. moai_adk/templates/.claude/skills/moai-domain-security/examples.md +29 -0
  66. moai_adk/templates/.claude/skills/moai-domain-security/reference.md +30 -0
  67. moai_adk/templates/.claude/skills/moai-domain-web-api/SKILL.md +97 -71
  68. moai_adk/templates/.claude/skills/moai-domain-web-api/examples.md +29 -0
  69. moai_adk/templates/.claude/skills/moai-domain-web-api/reference.md +30 -0
  70. moai_adk/templates/.claude/skills/moai-essentials-debug/SKILL.md +656 -60
  71. moai_adk/templates/.claude/skills/moai-essentials-debug/examples.md +1107 -0
  72. moai_adk/templates/.claude/skills/moai-essentials-debug/reference.md +1533 -0
  73. moai_adk/templates/.claude/skills/moai-essentials-perf/SKILL.md +87 -78
  74. moai_adk/templates/.claude/skills/moai-essentials-perf/examples.md +29 -0
  75. moai_adk/templates/.claude/skills/moai-essentials-perf/reference.md +28 -0
  76. moai_adk/templates/.claude/skills/moai-essentials-refactor/SKILL.md +87 -70
  77. moai_adk/templates/.claude/skills/moai-essentials-refactor/examples.md +29 -0
  78. moai_adk/templates/.claude/skills/moai-essentials-refactor/reference.md +28 -0
  79. moai_adk/templates/.claude/skills/moai-essentials-review/SKILL.md +87 -86
  80. moai_adk/templates/.claude/skills/moai-essentials-review/examples.md +29 -0
  81. moai_adk/templates/.claude/skills/moai-essentials-review/reference.md +28 -0
  82. moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +77 -62
  83. moai_adk/templates/.claude/skills/moai-foundation-ears/examples.md +29 -0
  84. moai_adk/templates/.claude/skills/moai-foundation-ears/reference.md +28 -0
  85. moai_adk/templates/.claude/skills/moai-foundation-git/SKILL.md +88 -56
  86. moai_adk/templates/.claude/skills/moai-foundation-git/examples.md +29 -0
  87. moai_adk/templates/.claude/skills/moai-foundation-git/reference.md +29 -0
  88. moai_adk/templates/.claude/skills/moai-foundation-langs/SKILL.md +90 -71
  89. moai_adk/templates/.claude/skills/moai-foundation-langs/examples.md +29 -0
  90. moai_adk/templates/.claude/skills/moai-foundation-langs/reference.md +28 -0
  91. moai_adk/templates/.claude/skills/moai-foundation-specs/SKILL.md +78 -58
  92. moai_adk/templates/.claude/skills/moai-foundation-specs/examples.md +29 -0
  93. moai_adk/templates/.claude/skills/moai-foundation-specs/reference.md +28 -0
  94. moai_adk/templates/.claude/skills/moai-foundation-tags/SKILL.md +78 -51
  95. moai_adk/templates/.claude/skills/moai-foundation-tags/examples.md +29 -0
  96. moai_adk/templates/.claude/skills/moai-foundation-tags/reference.md +28 -0
  97. moai_adk/templates/.claude/skills/moai-foundation-trust/SKILL.md +253 -32
  98. moai_adk/templates/.claude/skills/moai-foundation-trust/examples.md +0 -0
  99. moai_adk/templates/.claude/skills/moai-foundation-trust/reference.md +1099 -0
  100. moai_adk/templates/.claude/skills/moai-lang-c/SKILL.md +98 -74
  101. moai_adk/templates/.claude/skills/moai-lang-c/examples.md +29 -0
  102. moai_adk/templates/.claude/skills/moai-lang-c/reference.md +31 -0
  103. moai_adk/templates/.claude/skills/moai-lang-clojure/SKILL.md +97 -74
  104. moai_adk/templates/.claude/skills/moai-lang-clojure/examples.md +29 -0
  105. moai_adk/templates/.claude/skills/moai-lang-clojure/reference.md +30 -0
  106. moai_adk/templates/.claude/skills/moai-lang-cpp/SKILL.md +98 -76
  107. moai_adk/templates/.claude/skills/moai-lang-cpp/examples.md +29 -0
  108. moai_adk/templates/.claude/skills/moai-lang-cpp/reference.md +31 -0
  109. moai_adk/templates/.claude/skills/moai-lang-csharp/SKILL.md +97 -74
  110. moai_adk/templates/.claude/skills/moai-lang-csharp/examples.md +29 -0
  111. moai_adk/templates/.claude/skills/moai-lang-csharp/reference.md +30 -0
  112. moai_adk/templates/.claude/skills/moai-lang-dart/SKILL.md +86 -61
  113. moai_adk/templates/.claude/skills/moai-lang-dart/examples.md +29 -0
  114. moai_adk/templates/.claude/skills/moai-lang-dart/reference.md +30 -0
  115. moai_adk/templates/.claude/skills/moai-lang-elixir/SKILL.md +98 -73
  116. moai_adk/templates/.claude/skills/moai-lang-elixir/examples.md +29 -0
  117. moai_adk/templates/.claude/skills/moai-lang-elixir/reference.md +31 -0
  118. moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +98 -74
  119. moai_adk/templates/.claude/skills/moai-lang-go/examples.md +29 -0
  120. moai_adk/templates/.claude/skills/moai-lang-go/reference.md +31 -0
  121. moai_adk/templates/.claude/skills/moai-lang-haskell/SKILL.md +98 -74
  122. moai_adk/templates/.claude/skills/moai-lang-haskell/examples.md +29 -0
  123. moai_adk/templates/.claude/skills/moai-lang-haskell/reference.md +31 -0
  124. moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +87 -61
  125. moai_adk/templates/.claude/skills/moai-lang-java/examples.md +29 -0
  126. moai_adk/templates/.claude/skills/moai-lang-java/reference.md +31 -0
  127. moai_adk/templates/.claude/skills/moai-lang-javascript/SKILL.md +88 -59
  128. moai_adk/templates/.claude/skills/moai-lang-javascript/examples.md +29 -0
  129. moai_adk/templates/.claude/skills/moai-lang-javascript/reference.md +32 -0
  130. moai_adk/templates/.claude/skills/moai-lang-julia/SKILL.md +86 -61
  131. moai_adk/templates/.claude/skills/moai-lang-julia/examples.md +29 -0
  132. moai_adk/templates/.claude/skills/moai-lang-julia/reference.md +30 -0
  133. moai_adk/templates/.claude/skills/moai-lang-kotlin/SKILL.md +98 -73
  134. moai_adk/templates/.claude/skills/moai-lang-kotlin/examples.md +29 -0
  135. moai_adk/templates/.claude/skills/moai-lang-kotlin/reference.md +31 -0
  136. moai_adk/templates/.claude/skills/moai-lang-lua/SKILL.md +86 -61
  137. moai_adk/templates/.claude/skills/moai-lang-lua/examples.md +29 -0
  138. moai_adk/templates/.claude/skills/moai-lang-lua/reference.md +30 -0
  139. moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +86 -61
  140. moai_adk/templates/.claude/skills/moai-lang-php/examples.md +29 -0
  141. moai_adk/templates/.claude/skills/moai-lang-php/reference.md +30 -0
  142. moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +388 -53
  143. moai_adk/templates/.claude/skills/moai-lang-python/examples.md +624 -0
  144. moai_adk/templates/.claude/skills/moai-lang-python/reference.md +316 -0
  145. moai_adk/templates/.claude/skills/moai-lang-r/SKILL.md +97 -73
  146. moai_adk/templates/.claude/skills/moai-lang-r/examples.md +29 -0
  147. moai_adk/templates/.claude/skills/moai-lang-r/reference.md +30 -0
  148. moai_adk/templates/.claude/skills/moai-lang-ruby/SKILL.md +98 -73
  149. moai_adk/templates/.claude/skills/moai-lang-ruby/examples.md +29 -0
  150. moai_adk/templates/.claude/skills/moai-lang-ruby/reference.md +31 -0
  151. moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +98 -74
  152. moai_adk/templates/.claude/skills/moai-lang-rust/examples.md +29 -0
  153. moai_adk/templates/.claude/skills/moai-lang-rust/reference.md +31 -0
  154. moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +97 -74
  155. moai_adk/templates/.claude/skills/moai-lang-scala/examples.md +29 -0
  156. moai_adk/templates/.claude/skills/moai-lang-scala/reference.md +30 -0
  157. moai_adk/templates/.claude/skills/moai-lang-shell/SKILL.md +97 -74
  158. moai_adk/templates/.claude/skills/moai-lang-shell/examples.md +29 -0
  159. moai_adk/templates/.claude/skills/moai-lang-shell/reference.md +30 -0
  160. moai_adk/templates/.claude/skills/moai-lang-sql/SKILL.md +98 -74
  161. moai_adk/templates/.claude/skills/moai-lang-sql/examples.md +29 -0
  162. moai_adk/templates/.claude/skills/moai-lang-sql/reference.md +31 -0
  163. moai_adk/templates/.claude/skills/moai-lang-swift/SKILL.md +97 -73
  164. moai_adk/templates/.claude/skills/moai-lang-swift/examples.md +29 -0
  165. moai_adk/templates/.claude/skills/moai-lang-swift/reference.md +30 -0
  166. moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +90 -59
  167. moai_adk/templates/.claude/skills/moai-lang-typescript/examples.md +29 -0
  168. moai_adk/templates/.claude/skills/moai-lang-typescript/reference.md +34 -0
  169. moai_adk/templates/.claude/skills/moai-skill-factory/CHECKLIST.md +482 -0
  170. moai_adk/templates/.claude/skills/moai-skill-factory/EXAMPLES.md +52 -0
  171. moai_adk/templates/.claude/skills/moai-skill-factory/INTERACTIVE-DISCOVERY.md +524 -0
  172. moai_adk/templates/.claude/skills/moai-skill-factory/METADATA.md +477 -0
  173. moai_adk/templates/.claude/skills/moai-skill-factory/SKILL-UPDATE-ADVISOR.md +577 -0
  174. moai_adk/templates/.claude/skills/moai-skill-factory/SKILL.md +560 -0
  175. moai_adk/templates/.claude/skills/moai-skill-factory/STRUCTURE.md +583 -0
  176. moai_adk/templates/.claude/skills/moai-skill-factory/WEB-RESEARCH.md +526 -0
  177. moai_adk/templates/.claude/skills/moai-skill-factory/reference.md +69 -0
  178. moai_adk/templates/.claude/skills/moai-skill-factory/scripts/generate-structure.sh +328 -0
  179. moai_adk/templates/.claude/skills/moai-skill-factory/scripts/validate-skill.sh +312 -0
  180. moai_adk/templates/.claude/skills/moai-skill-factory/templates/SKILL_TEMPLATE.md +245 -0
  181. moai_adk/templates/.claude/skills/moai-skill-factory/templates/examples-template.md +285 -0
  182. moai_adk/templates/.claude/skills/moai-skill-factory/templates/reference-template.md +278 -0
  183. moai_adk/templates/.claude/skills/moai-skill-factory/templates/scripts-template.sh +303 -0
  184. moai_adk/templates/CLAUDE.md +43 -11
  185. moai_adk-0.4.7.dist-info/METADATA +1162 -0
  186. moai_adk-0.4.7.dist-info/RECORD +275 -0
  187. moai_adk-0.4.4.dist-info/METADATA +0 -369
  188. moai_adk-0.4.4.dist-info/RECORD +0 -152
  189. {moai_adk-0.4.4.dist-info → moai_adk-0.4.7.dist-info}/WHEEL +0 -0
  190. {moai_adk-0.4.4.dist-info → moai_adk-0.4.7.dist-info}/entry_points.txt +0 -0
  191. {moai_adk-0.4.4.dist-info → moai_adk-0.4.7.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,560 @@
1
+ ---
2
+ name: moai-skill-factory
3
+ version: 2.0.0
4
+ created: 2025-10-22
5
+ updated: 2025-10-22
6
+ status: active
7
+ description: Create and maintain high-quality Claude Code Skills through interactive discovery, web research, and continuous updates. Use when building new Skills, researching latest best practices, updating existing Skills with current information, or generating Skill packages backed by official documentation and real-world examples.
8
+ keywords: [skill-creation, claude-skills, best-practices, web-research, interactive-discovery, skill-updates]
9
+ allowed-tools:
10
+ - Read
11
+ - Write
12
+ - Glob
13
+ - Bash
14
+ - WebFetch
15
+ - WebSearch
16
+ ---
17
+ # Generating High-Quality Claude Code Skills
18
+
19
+ > **Quick Reference**: See `METADATA.md` for metadata authoring, `STRUCTURE.md` for file organization, `EXAMPLES.md` for real-world case studies, and `CHECKLIST.md` for validation.
20
+
21
+ ---
22
+
23
+ ## What Are Skills?
24
+
25
+ **Skills** are modular, reusable knowledge capsules that extend Claude's capabilities in Claude Code. They combine strategic guidance, best practices, templates, and automation scripts into organized filesystem packages.
26
+
27
+ ### Three-Level Progressive Disclosure Model
28
+
29
+ Skills load in stages to minimize context overhead:
30
+
31
+ ```
32
+ Level 1: Metadata (Always Active)
33
+ ├── name, description, allowed-tools
34
+ └── ~100 tokens total (minimal overhead)
35
+
36
+ Level 2: Instructions (Triggered On Demand)
37
+ ├── SKILL.md main body (workflows, patterns, best practices)
38
+ └── Loads when Claude recognizes relevance to the request
39
+
40
+ Level 3: Resources (As Needed)
41
+ ├── Supporting files (reference.md, examples.md)
42
+ ├── Scripts, templates
43
+ └── Consumed only when explicitly referenced or accessed
44
+ ```
45
+
46
+ **Key Benefit**: Many Skills loaded at session start without context penalty. Full content loads only when relevant.
47
+
48
+ ---
49
+
50
+ ## Core Principles for Skill Creation
51
+
52
+ ### 1. Conciseness Over Completeness
53
+
54
+ ```
55
+ ❌ Don't: Explain how algorithms work in detail (assume Claude knows)
56
+ ✅ Do: Reference patterns, provide decision trees, link to examples
57
+ ```
58
+
59
+ SKILL.md should stay **under 500 lines**. Trust that Claude is already intelligent—provide guidance, not lectures.
60
+
61
+ ### 2. Appropriate Freedom Levels
62
+
63
+ Match specificity to task fragility:
64
+
65
+ | Freedom Level | When to Use | Example | Content Style |
66
+ |---------------|-----------|---------|----------------|
67
+ | **High** | Flexible, creative work | Architecture design, strategy | Principles, trade-offs, considerations |
68
+ | **Medium** | Standard patterns exist | Data validation workflows | Pseudocode, flowcharts, annotated code |
69
+ | **Low** | Deterministic, error-prone | Bash operations, file handling | Specific scripts with error handling |
70
+
71
+ ### 3. Multi-Model Testing
72
+
73
+ Verify Skill works across:
74
+ - **Haiku**: Can it understand concise examples? Does it activate correctly?
75
+ - **Sonnet**: Does it exploit the full Skill? Synthesize across sections?
76
+ - **Opus**: Can it extend patterns beyond examples?
77
+
78
+ ### 4. Consistent Terminology
79
+
80
+ ```
81
+ ✅ Good: Use "migration", "index", "constraint" consistently
82
+ ❌ Bad: Switch between "migration", "schema change", "version bump"
83
+ ```
84
+
85
+ Maintain a glossary for domain-specific terms.
86
+
87
+ ### 5. Progressive Disclosure Through Linking
88
+
89
+ ```
90
+ Main SKILL.md:
91
+ ├── Overview + Quick Start
92
+ └── "For detailed reference, see [reference.md](reference.md)"
93
+
94
+ reference.md:
95
+ ├── Detailed specs, API docs, edge cases
96
+ └── "Example implementations in [examples.md](examples.md)"
97
+
98
+ examples.md:
99
+ ├── 3-4 real-world scenarios
100
+ └── "Utility scripts available in scripts/"
101
+ ```
102
+
103
+ Never create deeply nested structures—one level of indirection is enough.
104
+
105
+ ---
106
+
107
+ ## SKILL Package File Organization
108
+
109
+ ### Recommended Structure
110
+
111
+ ```
112
+ skill-name/
113
+ ├── SKILL.md # Main instructions (~400 lines)
114
+ ├── METADATA.md # Metadata authoring guide (optional)
115
+ ├── STRUCTURE.md # File organization reference (optional)
116
+ ├── reference.md # Detailed reference docs (optional)
117
+ ├── examples.md # 3-4 real-world examples (optional)
118
+ ├── CHECKLIST.md # Quality validation (optional)
119
+ ├── scripts/ # Utility scripts
120
+ │ ├── helper_script.sh
121
+ │ └── validator.py
122
+ └── templates/ # Reusable templates
123
+ ├── template_main.md
124
+ └── config-template.json
125
+ ```
126
+
127
+ ### Rules for File Organization
128
+
129
+ | Rule | Rationale | Example |
130
+ |------|-----------|---------|
131
+ | One level deep | Avoids nested discovery | ✅ `reference.md` not `docs/reference/api.md` |
132
+ | Relative paths | Cross-platform compatibility | ✅ `[see reference.md](reference.md)` not `./docs/...` |
133
+ | Forward slashes | Unix convention | ✅ `scripts/helper.sh` not `scripts\helper.sh` |
134
+ | Clear naming | Self-documenting | ✅ `validate-skill.sh` not `v.sh` |
135
+ | <500 lines per file | Manageable context | Split if SKILL.md exceeds 500 lines |
136
+
137
+ ---
138
+
139
+ ## YAML Metadata Requirements
140
+
141
+ ### Frontmatter Structure
142
+
143
+ ```yaml
144
+ ---
145
+ name: "Skill Name"
146
+ description: "What it does and when to use it"
147
+ allowed-tools: "Tool1, Tool2, Tool3"
148
+ ---
149
+ ```
150
+
151
+ ### Field Specifications
152
+
153
+ #### `name` (Required)
154
+ - **Max 64 characters**
155
+ - **Recommended Format**: Gerund (action verb) + domain
156
+ - **Examples**:
157
+ - ✅ "Processing CSV Files with Python"
158
+ - ✅ "Debugging Go Applications with Delve"
159
+ - ❌ "CSV Processing" (too generic)
160
+ - ❌ "Python CSV Helper Tool" (too descriptive)
161
+
162
+ #### `description` (Required)
163
+ - **Max 1024 characters**
164
+ - **Format**: Third person, action-oriented
165
+ - **Must include**:
166
+ - What the Skill does (capabilities)
167
+ - When to use it (trigger scenarios)
168
+ - 3+ discoverable keywords
169
+
170
+ **Template**:
171
+ ```
172
+ "[Capability 1], [Capability 2], or [Capability 3].
173
+ Use when [trigger scenario 1], [trigger scenario 2],
174
+ or [trigger scenario 3]."
175
+ ```
176
+
177
+ **Example**:
178
+ ```
179
+ "Extract text and tables from PDF files, create and edit spreadsheets,
180
+ generate business reports, or merge documents. Use when working with
181
+ PDF documents, Excel files, CSV data, or when the user mentions document
182
+ extraction, data export, or report generation."
183
+ ```
184
+
185
+ **Trigger Keywords** (examples):
186
+ - Problem domain: PDF, Excel, CSV, JSON, XML
187
+ - Operation: parsing, validation, transformation, cleaning
188
+ - Tech stack: Python, TypeScript, Go, Rust
189
+ - Pattern: algorithm, design pattern, architecture
190
+
191
+ #### `allowed-tools` (Recommended)
192
+ - **Minimal principle**: Only include tools the Skill actually uses
193
+ - **Format**: Comma-separated list of tool names and patterns
194
+ - **Examples**:
195
+ - `"Read, Grep, Glob"` (read-only analysis)
196
+ - `"Read, Write, Edit, Bash(git:*)"` (Git operations)
197
+ - `"Bash(python:*), Bash(pytest:*), Read"` (Python testing)
198
+ - `"Read, Bash(curl:*), Bash(jq:*)"` (API interaction)
199
+
200
+ ---
201
+
202
+ ## Content Structure: Freedom Level Framework
203
+
204
+ ### High Freedom: Principles & Guidance (30-40% of SKILL.md)
205
+
206
+ For creative, flexible tasks where direction matters more than prescription.
207
+
208
+ **Content Type**:
209
+ - Core principles (3-5 key ideas)
210
+ - Trade-off analysis
211
+ - Decision matrices
212
+ - Consideration frameworks
213
+
214
+ **Example: Architecture Decisions**
215
+ ```
216
+ ## Architecture Trade-offs
217
+
218
+ | Pattern | Pros | Cons | When to use |
219
+ |---------|------|------|-------------|
220
+ | Monolith | Simple to start | Scales poorly | MVP, <10 microservices |
221
+ | Microservices | Scales, independent deploy | Complex networking | 10+ teams, different stacks |
222
+ | Serverless | Zero ops, elastic | Cold starts, vendor lock-in | Event-driven, variable load |
223
+ ```
224
+
225
+ ### Medium Freedom: Patterns & Pseudocode (40-50% of SKILL.md)
226
+
227
+ For standard patterns where a reference implementation aids understanding.
228
+
229
+ **Content Type**:
230
+ - Pseudocode with annotations
231
+ - Flowcharts/decision trees
232
+ - Pattern examples (not production code)
233
+ - Configuration templates
234
+
235
+ **Example: Data Validation Workflow**
236
+ ```
237
+ ## Pseudocode Pattern: CSV Validation
238
+
239
+ ```pseudocode
240
+ 1. Load CSV file
241
+ 2. For each column:
242
+ a. Check data type matches schema
243
+ b. Validate range/constraints
244
+ c. Flag missing values
245
+ 3. If all checks pass:
246
+ ✓ Proceed to transformation
247
+ 4. Else:
248
+ ✗ Report errors with row/column numbers
249
+ ✗ Suggest fixes
250
+ ```
251
+
252
+ ### Low Freedom: Specific Scripts & Commands (10-20% of SKILL.md)
253
+
254
+ For deterministic, error-prone operations where exact execution matters.
255
+
256
+ **Content Type**:
257
+ - Ready-to-run Bash/Python scripts
258
+ - Error handling & validation
259
+ - Exit codes & logging
260
+ - Hardened templates
261
+
262
+ **Example: Safe File Operation**
263
+ ```bash
264
+ #!/bin/bash
265
+ set -euo pipefail # Exit on error, undefined var, pipe fail
266
+
267
+ SOURCE_FILE="$1"
268
+ DEST_DIR="$2"
269
+
270
+ # Validation
271
+ if [[ ! -f "$SOURCE_FILE" ]]; then
272
+ echo "ERROR: Source file not found: $SOURCE_FILE" >&2
273
+ exit 1
274
+ fi
275
+
276
+ if [[ ! -d "$DEST_DIR" ]]; then
277
+ echo "ERROR: Destination directory not found: $DEST_DIR" >&2
278
+ exit 1
279
+ fi
280
+
281
+ # Safe copy with backup
282
+ cp "$SOURCE_FILE" "$DEST_DIR/"
283
+ echo "✓ File copied successfully to $DEST_DIR"
284
+ exit 0
285
+ ```
286
+
287
+ ---
288
+
289
+ ## Writing Style Guidelines
290
+
291
+ ### Terminology Consistency
292
+
293
+ **Audit Checklist**:
294
+ - [ ] Define each domain term once (glossary section)
295
+ - [ ] Use the same term consistently throughout (no synonyms)
296
+ - [ ] Italicize or bold terms on first use: *term*, **term**
297
+
298
+ **Example Glossary**:
299
+ ```markdown
300
+ ### Glossary
301
+
302
+ - **Index**: B-tree data structure for search optimization
303
+ - **Constraint**: Data integrity rule (NOT "validation rule")
304
+ - **Migration**: Schema version change (NOT "upgrade", "deploy")
305
+ ```
306
+
307
+ ### Example Coverage
308
+
309
+ Every major concept needs at least one example:
310
+
311
+ ```
312
+ ✅ GOOD:
313
+ ## Pseudocode Pattern
314
+ [pattern description]
315
+ [pseudocode or flowchart]
316
+
317
+ ### Example 1: Simple Case
318
+ [code example]
319
+
320
+ ### Example 2: Edge Case
321
+ [code example]
322
+
323
+ ❌ BAD:
324
+ ## Pseudocode Pattern
325
+ [pattern description only, no examples]
326
+ ```
327
+
328
+ ### Anti-Patterns to Avoid
329
+
330
+ | Anti-Pattern | Example | Fix |
331
+ |--------------|---------|-----|
332
+ | Time-sensitive info | "Today's date is 2025-01-15" | "Use current system date" |
333
+ | Vague instructions | "Make it fast" | "Profile with [tool], measure [metric]" |
334
+ | Too many options | 10+ approaches listed | Pick 3 main approaches, others in "Alternatives" |
335
+ | Nested references | `docs/api/v2/reference/examples.md` | Keep to one level: `reference.md` |
336
+ | Windows paths | `docs\api\reference.md` | Use `/`: `docs/api/reference.md` |
337
+
338
+ ---
339
+
340
+ ## Quality Validation Checklist
341
+
342
+ Before publishing, audit your Skill:
343
+
344
+ ### Metadata Completeness
345
+ - [ ] `name` ≤ 64 characters, gerund format
346
+ - [ ] `description` ≤ 1024 chars, includes 3+ triggers
347
+ - [ ] `allowed-tools` is minimal and justified
348
+ - [ ] YAML frontmatter is valid (no tabs, proper indentation)
349
+
350
+ ### Content Quality
351
+ - [ ] SKILL.md ≤ 500 lines
352
+ - [ ] All major concepts have examples
353
+ - [ ] Terminology is consistent throughout
354
+ - [ ] Anti-patterns avoided (no time-sensitive data, no nested paths)
355
+ - [ ] Progressive Disclosure pattern applied
356
+ - [ ] Relative paths used throughout
357
+
358
+ ### Specificity & Discoverability
359
+ - [ ] Name is specific (not "Python Helper")
360
+ - [ ] Description includes problem domain keywords
361
+ - [ ] Triggers match likely user search terms
362
+ - [ ] Scope is bounded (1-3 related domains)
363
+
364
+ ### Multi-Model Compatibility
365
+ - [ ] Haiku can understand concise examples
366
+ - [ ] Sonnet exploits full Skill capabilities
367
+ - [ ] Opus can extend patterns beyond examples
368
+
369
+ ### Security Posture
370
+ - [ ] No credentials, API keys, or secrets in examples
371
+ - [ ] No system state assumptions (e.g., "assuming ~/config exists")
372
+ - [ ] Scripts include error handling & exit codes
373
+ - [ ] Dangerous operations (rm, mv) use explicit confirmations
374
+
375
+ ---
376
+
377
+ ## Freedom Level Decision Framework
378
+
379
+ Use this tree to determine high/medium/low freedom mix:
380
+
381
+ ```
382
+ 1. Is the task deterministic?
383
+ ├─ YES: Well-defined algorithm, fixed steps
384
+ │ └─→ Low Freedom: Specific script with error handling
385
+ │ (Example: Bash file operations, deployment steps)
386
+
387
+ └─ NO: Flexible, context-dependent, multiple valid approaches
388
+ └─ Does the task have standard patterns?
389
+ ├─ YES: Established best practice (e.g., validation)
390
+ │ └─→ Medium Freedom: Pseudocode + examples
391
+ │ (Example: Data validation, testing patterns)
392
+
393
+ └─ NO: Novel or creative work
394
+ └─→ High Freedom: Principles + considerations
395
+ (Example: Architecture design, code organization)
396
+ ```
397
+
398
+ ---
399
+
400
+ ## Real-World Skill Examples
401
+
402
+ See `[examples.md](examples.md)` for three complete case studies:
403
+ 1. **High Freedom Example**: Architecture Design Skill
404
+ 2. **Medium Freedom Example**: Testing Patterns Skill
405
+ 3. **Low Freedom Example**: Deployment Automation Skill
406
+
407
+ Each demonstrates complete metadata, content structure, and freedom levels.
408
+
409
+ ---
410
+
411
+ ## File Templates & Scaffolding
412
+
413
+ ### Creating a New Skill
414
+
415
+ 1. **Generate structure** (see `STRUCTURE.md`):
416
+ ```
417
+ skill-name/
418
+ ├── SKILL.md
419
+ ├── reference.md
420
+ ├── examples.md
421
+ ├── scripts/
422
+ └── templates/
423
+ ```
424
+
425
+ 2. **Add frontmatter** to SKILL.md:
426
+ ```yaml
427
+ ---
428
+ name: "[Gerund] [Domain]"
429
+ description: "[Capability]. Use when [trigger 1], [trigger 2]."
430
+ allowed-tools: "Tool1, Tool2"
431
+ ---
432
+ ```
433
+
434
+ 3. **Structure content** (High + Medium + Low):
435
+ - Principles/overview (High)
436
+ - Patterns & pseudocode (Medium)
437
+ - Ready-to-run scripts (Low)
438
+
439
+ 4. **Validate** against CHECKLIST.md
440
+
441
+ 5. **Test** across Haiku, Sonnet, Opus
442
+
443
+ ### Template Files
444
+
445
+ See `templates/` directory:
446
+ - `SKILL_TEMPLATE.md`: Base Skill structure
447
+ - `reference-template.md`: Supporting docs template
448
+ - `examples-template.md`: Example scenarios template
449
+ - `scripts-template.sh`: Error-handling Bash template
450
+
451
+ ---
452
+
453
+ ## Common Failure Modes & Fixes
454
+
455
+ | Issue | Root Cause | Fix |
456
+ |-------|-----------|-----|
457
+ | **Not activating** | Description too generic | Add 5+ specific keywords, mention common triggers |
458
+ | **Haiku ignores it** | Examples too complex | Simplify pseudocode, add short examples |
459
+ | **Over-specifying** | Too much low-freedom content | Reduce scripts, increase principles |
460
+ | **Scope creep** | Covers too many domains | Split into 2-3 focused Skills |
461
+ | **Terminology mismatch** | Terms used inconsistently | Audit and standardize with glossary |
462
+ | **File too large** | SKILL.md > 500 lines | Move content to reference.md or examples.md |
463
+
464
+ ---
465
+
466
+ ## Integration with moai-alfred-skill-generator
467
+
468
+ This Skill is invoked by the **moai-alfred-skill-generator** Sub-Agent during Skill creation phases:
469
+
470
+ ```
471
+ User: "/alfred:1-plan Create Skill for X"
472
+
473
+ skill-generator Sub-Agent (ANALYZE → DESIGN → ASSURE phases)
474
+
475
+ moai-skill-generator Skill (PRODUCE phase)
476
+
477
+ Complete Skill package created
478
+ ```
479
+
480
+ ---
481
+
482
+ ## Quick Start: Creating Your First Skill
483
+
484
+ ### 5-Step Process
485
+
486
+ 1. **Define Problem** (10 min):
487
+ - What gap does this Skill fill?
488
+ - Who uses it? What are trigger scenarios?
489
+
490
+ 2. **Design Metadata** (10 min):
491
+ - Name (gerund + domain)
492
+ - Description (capabilities + triggers)
493
+ - Allowed-tools (minimal list)
494
+
495
+ 3. **Structure Content** (30 min):
496
+ - High freedom: Principles (20%)
497
+ - Medium freedom: Patterns (50%)
498
+ - Low freedom: Scripts (30%)
499
+
500
+ 4. **Add Examples & References** (30 min):
501
+ - 3-4 concrete examples in examples.md
502
+ - Detailed reference in reference.md
503
+ - Reusable templates in templates/
504
+
505
+ 5. **Validate & Test** (20 min):
506
+ - Run through CHECKLIST.md
507
+ - Test with Haiku, Sonnet, Opus
508
+ - Peer review (if available)
509
+
510
+ **Total Time**: ~2 hours for comprehensive Skill
511
+
512
+ ---
513
+
514
+ ---
515
+
516
+ ## Advanced Features: Interactive Discovery & Web Research
517
+
518
+ See [INTERACTIVE-DISCOVERY.md](INTERACTIVE-DISCOVERY.md) for detailed guidance on:
519
+ - Using TUI surveys for user engagement
520
+ - Structuring effective questions
521
+ - Clarifying vague requirements
522
+
523
+ See [WEB-RESEARCH.md](WEB-RESEARCH.md) for detailed guidance on:
524
+ - Web search strategies for latest information
525
+ - Source prioritization and validation
526
+ - Official documentation integration
527
+ - Fact-checking and deprecation detection
528
+
529
+ See [SKILL-UPDATE-ADVISOR.md](SKILL-UPDATE-ADVISOR.md) for detailed guidance on:
530
+ - Analyzing existing Skills for updates
531
+ - Detecting outdated patterns and versions
532
+ - Proposing data-driven improvements
533
+ - Generating migration guides
534
+
535
+ ---
536
+
537
+ ## Key References
538
+
539
+ - [METADATA.md](METADATA.md) — Metadata authoring guide
540
+ - [STRUCTURE.md](STRUCTURE.md) — File organization patterns
541
+ - [EXAMPLES.md](EXAMPLES.md) — Real-world Skill case studies
542
+ - [CHECKLIST.md](CHECKLIST.md) — Pre-publication validation
543
+ - [INTERACTIVE-DISCOVERY.md](INTERACTIVE-DISCOVERY.md) — TUI survey patterns (NEW)
544
+ - [WEB-RESEARCH.md](WEB-RESEARCH.md) — Web research strategies (NEW)
545
+ - [SKILL-UPDATE-ADVISOR.md](SKILL-UPDATE-ADVISOR.md) — Skill analysis & updates (NEW)
546
+
547
+ ---
548
+
549
+ **Version**: 0.3.0 (with Interactive Discovery, Web Research, & Update Advisor)
550
+ **Last Updated**: 2025-10-22
551
+ **Framework**: MoAI-ADK + Claude Skills + skill-factory Sub-Agent
552
+ **Status**: Production-ready
553
+ **Key Features**:
554
+ - ✅ Interactive user surveys via moai-alfred-tui-survey
555
+ - ✅ Web research integration for latest information
556
+ - ✅ Skill analysis & update recommendations
557
+ - ✅ Official documentation validation
558
+ - ✅ Progressive Disclosure pattern
559
+ - ✅ Freedom level framework
560
+ - ✅ Multi-model compatibility testing