liteagents 2.4.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 (215) hide show
  1. package/CHANGELOG.md +441 -0
  2. package/LICENSE +21 -0
  3. package/README.md +179 -0
  4. package/cli.js +230 -0
  5. package/docs/.gitkeep +1 -0
  6. package/docs/CONTRIBUTING.md +739 -0
  7. package/docs/DUAL_PUBLISH_SUMMARY.md +177 -0
  8. package/docs/ERROR_HANDLING_IMPLEMENTATION.md +327 -0
  9. package/docs/GITHUB_PACKAGES.md +181 -0
  10. package/docs/GITHUB_SETUP.md +158 -0
  11. package/docs/INSTALLATION_DEMO.md +691 -0
  12. package/docs/INSTALLATION_LOCATIONS.md +299 -0
  13. package/docs/INSTALLER_GUIDE.md +1586 -0
  14. package/docs/INTEGRATION_ISSUES_9.1.md +341 -0
  15. package/docs/KNOWLEDGE_BASE.md +727 -0
  16. package/docs/MIGRATION.md +384 -0
  17. package/docs/PACKAGE_BASELINE.md +557 -0
  18. package/docs/PACKAGE_VALIDATION_REPORT.md +427 -0
  19. package/docs/PASS_INTEGRATION.md +307 -0
  20. package/docs/PASS_QUICK_START.md +150 -0
  21. package/docs/PRIVACY.md +203 -0
  22. package/docs/PUBLISHING.md +494 -0
  23. package/docs/QUICK-START.md +318 -0
  24. package/docs/RELEASE_NOTES_1.2.0.md +323 -0
  25. package/docs/SECURITY.md +317 -0
  26. package/docs/SILENT_MODE_GUIDE.md +526 -0
  27. package/docs/SKILLS_CONVERSION.md +154 -0
  28. package/docs/TESTING.md +582 -0
  29. package/docs/TEST_COVERAGE.md +347 -0
  30. package/docs/TROUBLESHOOTING.md +788 -0
  31. package/docs/UPDATED_VARIANT_CONFIGURATION.md +274 -0
  32. package/docs/VARIANT_CONFIGURATION.md +440 -0
  33. package/installer/cli.js +761 -0
  34. package/installer/installation-engine.js +1536 -0
  35. package/installer/package-manager.js +640 -0
  36. package/installer/path-manager.js +427 -0
  37. package/installer/report-template.js +298 -0
  38. package/installer/verification-system.js +274 -0
  39. package/package.json +83 -0
  40. package/packages/ampcode/AGENT.md +58 -0
  41. package/packages/ampcode/README.md +17 -0
  42. package/packages/ampcode/agents/1-create-prd.md +175 -0
  43. package/packages/ampcode/agents/2-generate-tasks.md +190 -0
  44. package/packages/ampcode/agents/3-process-task-list.md +225 -0
  45. package/packages/ampcode/agents/code-developer.md +198 -0
  46. package/packages/ampcode/agents/context-builder.md +142 -0
  47. package/packages/ampcode/agents/feature-planner.md +199 -0
  48. package/packages/ampcode/agents/market-researcher.md +89 -0
  49. package/packages/ampcode/agents/orchestrator.md +116 -0
  50. package/packages/ampcode/agents/quality-assurance.md +115 -0
  51. package/packages/ampcode/agents/system-architect.md +135 -0
  52. package/packages/ampcode/agents/ui-designer.md +184 -0
  53. package/packages/ampcode/commands/brainstorming.md +56 -0
  54. package/packages/ampcode/commands/code-review.md +107 -0
  55. package/packages/ampcode/commands/condition-based-waiting/example.ts +158 -0
  56. package/packages/ampcode/commands/condition-based-waiting.md +122 -0
  57. package/packages/ampcode/commands/debug.md +20 -0
  58. package/packages/ampcode/commands/docs-builder/templates.md +572 -0
  59. package/packages/ampcode/commands/docs-builder.md +106 -0
  60. package/packages/ampcode/commands/explain.md +18 -0
  61. package/packages/ampcode/commands/git-commit.md +14 -0
  62. package/packages/ampcode/commands/optimize.md +20 -0
  63. package/packages/ampcode/commands/refactor.md +21 -0
  64. package/packages/ampcode/commands/review.md +18 -0
  65. package/packages/ampcode/commands/root-cause-tracing/find-polluter.sh +63 -0
  66. package/packages/ampcode/commands/root-cause-tracing.md +176 -0
  67. package/packages/ampcode/commands/security.md +21 -0
  68. package/packages/ampcode/commands/ship.md +18 -0
  69. package/packages/ampcode/commands/skill-creator/scripts/init_skill.py +303 -0
  70. package/packages/ampcode/commands/skill-creator/scripts/package_skill.py +110 -0
  71. package/packages/ampcode/commands/skill-creator/scripts/quick_validate.py +65 -0
  72. package/packages/ampcode/commands/skill-creator.md +211 -0
  73. package/packages/ampcode/commands/stash.md +45 -0
  74. package/packages/ampcode/commands/systematic-debugging.md +297 -0
  75. package/packages/ampcode/commands/test-driven-development.md +390 -0
  76. package/packages/ampcode/commands/test-generate.md +18 -0
  77. package/packages/ampcode/commands/testing-anti-patterns.md +304 -0
  78. package/packages/ampcode/commands/verification-before-completion.md +152 -0
  79. package/packages/ampcode/settings.json +13 -0
  80. package/packages/ampcode/variants.json +8 -0
  81. package/packages/claude/CLAUDE.md +58 -0
  82. package/packages/claude/README.md +23 -0
  83. package/packages/claude/agents/1-create-prd.md +175 -0
  84. package/packages/claude/agents/2-generate-tasks.md +190 -0
  85. package/packages/claude/agents/3-process-task-list.md +225 -0
  86. package/packages/claude/agents/code-developer.md +198 -0
  87. package/packages/claude/agents/context-builder.md +142 -0
  88. package/packages/claude/agents/feature-planner.md +199 -0
  89. package/packages/claude/agents/market-researcher.md +89 -0
  90. package/packages/claude/agents/orchestrator.md +117 -0
  91. package/packages/claude/agents/quality-assurance.md +115 -0
  92. package/packages/claude/agents/system-architect.md +135 -0
  93. package/packages/claude/agents/ui-designer.md +184 -0
  94. package/packages/claude/commands/debug.md +20 -0
  95. package/packages/claude/commands/explain.md +18 -0
  96. package/packages/claude/commands/git-commit.md +14 -0
  97. package/packages/claude/commands/optimize.md +20 -0
  98. package/packages/claude/commands/refactor.md +21 -0
  99. package/packages/claude/commands/review.md +18 -0
  100. package/packages/claude/commands/security.md +21 -0
  101. package/packages/claude/commands/ship.md +18 -0
  102. package/packages/claude/commands/stash.md +45 -0
  103. package/packages/claude/commands/test-generate.md +18 -0
  104. package/packages/claude/skills/brainstorming/SKILL.md +56 -0
  105. package/packages/claude/skills/code-review/SKILL.md +107 -0
  106. package/packages/claude/skills/code-review/code-reviewer.md +146 -0
  107. package/packages/claude/skills/condition-based-waiting/SKILL.md +122 -0
  108. package/packages/claude/skills/condition-based-waiting/example.ts +158 -0
  109. package/packages/claude/skills/docs-builder/SKILL.md +106 -0
  110. package/packages/claude/skills/docs-builder/references/templates.md +572 -0
  111. package/packages/claude/skills/root-cause-tracing/SKILL.md +176 -0
  112. package/packages/claude/skills/root-cause-tracing/find-polluter.sh +63 -0
  113. package/packages/claude/skills/skill-creator/LICENSE.txt +202 -0
  114. package/packages/claude/skills/skill-creator/SKILL.md +211 -0
  115. package/packages/claude/skills/skill-creator/scripts/init_skill.py +303 -0
  116. package/packages/claude/skills/skill-creator/scripts/package_skill.py +110 -0
  117. package/packages/claude/skills/skill-creator/scripts/quick_validate.py +65 -0
  118. package/packages/claude/skills/systematic-debugging/CREATION-LOG.md +119 -0
  119. package/packages/claude/skills/systematic-debugging/SKILL.md +296 -0
  120. package/packages/claude/skills/systematic-debugging/test-academic.md +14 -0
  121. package/packages/claude/skills/systematic-debugging/test-pressure-1.md +58 -0
  122. package/packages/claude/skills/systematic-debugging/test-pressure-2.md +68 -0
  123. package/packages/claude/skills/systematic-debugging/test-pressure-3.md +69 -0
  124. package/packages/claude/skills/test-driven-development/SKILL.md +392 -0
  125. package/packages/claude/skills/testing-anti-patterns/SKILL.md +304 -0
  126. package/packages/claude/skills/verification-before-completion/SKILL.md +152 -0
  127. package/packages/claude/variants.json +9 -0
  128. package/packages/droid/AGENTS.md +52 -0
  129. package/packages/droid/README.md +17 -0
  130. package/packages/droid/change_settings.json +61 -0
  131. package/packages/droid/commands/brainstorming.md +56 -0
  132. package/packages/droid/commands/code-review.md +107 -0
  133. package/packages/droid/commands/condition-based-waiting/example.ts +158 -0
  134. package/packages/droid/commands/condition-based-waiting.md +122 -0
  135. package/packages/droid/commands/debug.md +20 -0
  136. package/packages/droid/commands/docs-builder/templates.md +572 -0
  137. package/packages/droid/commands/docs-builder.md +106 -0
  138. package/packages/droid/commands/explain.md +18 -0
  139. package/packages/droid/commands/git-commit.md +14 -0
  140. package/packages/droid/commands/optimize.md +20 -0
  141. package/packages/droid/commands/refactor.md +21 -0
  142. package/packages/droid/commands/review.md +18 -0
  143. package/packages/droid/commands/root-cause-tracing/find-polluter.sh +63 -0
  144. package/packages/droid/commands/root-cause-tracing.md +176 -0
  145. package/packages/droid/commands/security.md +21 -0
  146. package/packages/droid/commands/ship.md +18 -0
  147. package/packages/droid/commands/skill-creator/scripts/init_skill.py +303 -0
  148. package/packages/droid/commands/skill-creator/scripts/package_skill.py +110 -0
  149. package/packages/droid/commands/skill-creator/scripts/quick_validate.py +65 -0
  150. package/packages/droid/commands/skill-creator.md +211 -0
  151. package/packages/droid/commands/stash.md +45 -0
  152. package/packages/droid/commands/systematic-debugging.md +297 -0
  153. package/packages/droid/commands/test-driven-development.md +390 -0
  154. package/packages/droid/commands/test-generate.md +18 -0
  155. package/packages/droid/commands/testing-anti-patterns.md +304 -0
  156. package/packages/droid/commands/verification-before-completion.md +152 -0
  157. package/packages/droid/droids/1-create-prd.md +170 -0
  158. package/packages/droid/droids/2-generate-tasks.md +190 -0
  159. package/packages/droid/droids/3-process-task-list.md +225 -0
  160. package/packages/droid/droids/code-developer.md +198 -0
  161. package/packages/droid/droids/context-builder.md +142 -0
  162. package/packages/droid/droids/feature-planner.md +199 -0
  163. package/packages/droid/droids/market-researcher.md +89 -0
  164. package/packages/droid/droids/orchestrator.md +116 -0
  165. package/packages/droid/droids/quality-assurance.md +115 -0
  166. package/packages/droid/droids/system-architect.md +135 -0
  167. package/packages/droid/droids/ui-designer.md +184 -0
  168. package/packages/droid/variants.json +8 -0
  169. package/packages/opencode/AGENTS.md +52 -0
  170. package/packages/opencode/README.md +17 -0
  171. package/packages/opencode/agent/1-create-prd.md +179 -0
  172. package/packages/opencode/agent/2-generate-tasks.md +194 -0
  173. package/packages/opencode/agent/3-process-task-list.md +229 -0
  174. package/packages/opencode/agent/code-developer.md +202 -0
  175. package/packages/opencode/agent/context-builder.md +146 -0
  176. package/packages/opencode/agent/feature-planner.md +203 -0
  177. package/packages/opencode/agent/market-researcher.md +93 -0
  178. package/packages/opencode/agent/orchestrator.md +120 -0
  179. package/packages/opencode/agent/quality-assurance.md +119 -0
  180. package/packages/opencode/agent/system-architect.md +139 -0
  181. package/packages/opencode/agent/ui-designer.md +188 -0
  182. package/packages/opencode/command/brainstorming.md +56 -0
  183. package/packages/opencode/command/code-review.md +107 -0
  184. package/packages/opencode/command/condition-based-waiting/example.ts +158 -0
  185. package/packages/opencode/command/condition-based-waiting.md +122 -0
  186. package/packages/opencode/command/debug.md +20 -0
  187. package/packages/opencode/command/docs-builder/templates.md +572 -0
  188. package/packages/opencode/command/docs-builder.md +106 -0
  189. package/packages/opencode/command/explain.md +18 -0
  190. package/packages/opencode/command/git-commit.md +14 -0
  191. package/packages/opencode/command/optimize.md +20 -0
  192. package/packages/opencode/command/refactor.md +21 -0
  193. package/packages/opencode/command/review.md +18 -0
  194. package/packages/opencode/command/root-cause-tracing/find-polluter.sh +63 -0
  195. package/packages/opencode/command/root-cause-tracing.md +176 -0
  196. package/packages/opencode/command/security.md +21 -0
  197. package/packages/opencode/command/ship.md +18 -0
  198. package/packages/opencode/command/skill-creator/scripts/init_skill.py +303 -0
  199. package/packages/opencode/command/skill-creator/scripts/package_skill.py +110 -0
  200. package/packages/opencode/command/skill-creator/scripts/quick_validate.py +65 -0
  201. package/packages/opencode/command/skill-creator.md +211 -0
  202. package/packages/opencode/command/stash.md +45 -0
  203. package/packages/opencode/command/systematic-debugging.md +297 -0
  204. package/packages/opencode/command/test-driven-development.md +390 -0
  205. package/packages/opencode/command/test-generate.md +18 -0
  206. package/packages/opencode/command/testing-anti-patterns.md +304 -0
  207. package/packages/opencode/command/verification-before-completion.md +152 -0
  208. package/packages/opencode/opencode.jsonc +201 -0
  209. package/packages/opencode/variants.json +8 -0
  210. package/packages/subagentic-manual.md +349 -0
  211. package/postinstall.js +21 -0
  212. package/tools/ampcode/manifest-template.json +14 -0
  213. package/tools/claude/manifest-template.json +14 -0
  214. package/tools/droid/manifest-template.json +14 -0
  215. package/tools/opencode/manifest-template.json +14 -0
@@ -0,0 +1,303 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Skill Initializer - Creates a new skill from template
4
+
5
+ Usage:
6
+ init_skill.py <skill-name> --path <path>
7
+
8
+ Examples:
9
+ init_skill.py my-new-skill --path skills/public
10
+ init_skill.py my-api-helper --path skills/private
11
+ init_skill.py custom-skill --path /custom/location
12
+ """
13
+
14
+ import sys
15
+ from pathlib import Path
16
+
17
+
18
+ SKILL_TEMPLATE = """---
19
+ name: {skill_name}
20
+ description: [TODO: Complete and informative explanation of what the skill does and when to use it. Include WHEN to use this skill - specific scenarios, file types, or tasks that trigger it.]
21
+ ---
22
+
23
+ # {skill_title}
24
+
25
+ ## Overview
26
+
27
+ [TODO: 1-2 sentences explaining what this skill enables]
28
+
29
+ ## Structuring This Skill
30
+
31
+ [TODO: Choose the structure that best fits this skill's purpose. Common patterns:
32
+
33
+ **1. Workflow-Based** (best for sequential processes)
34
+ - Works well when there are clear step-by-step procedures
35
+ - Example: DOCX skill with "Workflow Decision Tree" → "Reading" → "Creating" → "Editing"
36
+ - Structure: ## Overview → ## Workflow Decision Tree → ## Step 1 → ## Step 2...
37
+
38
+ **2. Task-Based** (best for tool collections)
39
+ - Works well when the skill offers different operations/capabilities
40
+ - Example: PDF skill with "Quick Start" → "Merge PDFs" → "Split PDFs" → "Extract Text"
41
+ - Structure: ## Overview → ## Quick Start → ## Task Category 1 → ## Task Category 2...
42
+
43
+ **3. Reference/Guidelines** (best for standards or specifications)
44
+ - Works well for brand guidelines, coding standards, or requirements
45
+ - Example: Brand styling with "Brand Guidelines" → "Colors" → "Typography" → "Features"
46
+ - Structure: ## Overview → ## Guidelines → ## Specifications → ## Usage...
47
+
48
+ **4. Capabilities-Based** (best for integrated systems)
49
+ - Works well when the skill provides multiple interrelated features
50
+ - Example: Product Management with "Core Capabilities" → numbered capability list
51
+ - Structure: ## Overview → ## Core Capabilities → ### 1. Feature → ### 2. Feature...
52
+
53
+ Patterns can be mixed and matched as needed. Most skills combine patterns (e.g., start with task-based, add workflow for complex operations).
54
+
55
+ Delete this entire "Structuring This Skill" section when done - it's just guidance.]
56
+
57
+ ## [TODO: Replace with the first main section based on chosen structure]
58
+
59
+ [TODO: Add content here. See examples in existing skills:
60
+ - Code samples for technical skills
61
+ - Decision trees for complex workflows
62
+ - Concrete examples with realistic user requests
63
+ - References to scripts/templates/references as needed]
64
+
65
+ ## Resources
66
+
67
+ This skill includes example resource directories that demonstrate how to organize different types of bundled resources:
68
+
69
+ ### scripts/
70
+ Executable code (Python/Bash/etc.) that can be run directly to perform specific operations.
71
+
72
+ **Examples from other skills:**
73
+ - PDF skill: `fill_fillable_fields.py`, `extract_form_field_info.py` - utilities for PDF manipulation
74
+ - DOCX skill: `document.py`, `utilities.py` - Python modules for document processing
75
+
76
+ **Appropriate for:** Python scripts, shell scripts, or any executable code that performs automation, data processing, or specific operations.
77
+
78
+ **Note:** Scripts may be executed without loading into context, but can still be read by Claude for patching or environment adjustments.
79
+
80
+ ### references/
81
+ Documentation and reference material intended to be loaded into context to inform Claude's process and thinking.
82
+
83
+ **Examples from other skills:**
84
+ - Product management: `communication.md`, `context_building.md` - detailed workflow guides
85
+ - BigQuery: API reference documentation and query examples
86
+ - Finance: Schema documentation, company policies
87
+
88
+ **Appropriate for:** In-depth documentation, API references, database schemas, comprehensive guides, or any detailed information that Claude should reference while working.
89
+
90
+ ### assets/
91
+ Files not intended to be loaded into context, but rather used within the output Claude produces.
92
+
93
+ **Examples from other skills:**
94
+ - Brand styling: PowerPoint template files (.pptx), logo files
95
+ - Frontend builder: HTML/React boilerplate project directories
96
+ - Typography: Font files (.ttf, .woff2)
97
+
98
+ **Appropriate for:** Templates, boilerplate code, document templates, images, icons, fonts, or any files meant to be copied or used in the final output.
99
+
100
+ ---
101
+
102
+ **Any unneeded directories can be deleted.** Not every skill requires all three types of resources.
103
+ """
104
+
105
+ EXAMPLE_SCRIPT = '''#!/usr/bin/env python3
106
+ """
107
+ Example helper script for {skill_name}
108
+
109
+ This is a placeholder script that can be executed directly.
110
+ Replace with actual implementation or delete if not needed.
111
+
112
+ Example real scripts from other skills:
113
+ - pdf/scripts/fill_fillable_fields.py - Fills PDF form fields
114
+ - pdf/scripts/convert_pdf_to_images.py - Converts PDF pages to images
115
+ """
116
+
117
+ def main():
118
+ print("This is an example script for {skill_name}")
119
+ # TODO: Add actual script logic here
120
+ # This could be data processing, file conversion, API calls, etc.
121
+
122
+ if __name__ == "__main__":
123
+ main()
124
+ '''
125
+
126
+ EXAMPLE_REFERENCE = """# Reference Documentation for {skill_title}
127
+
128
+ This is a placeholder for detailed reference documentation.
129
+ Replace with actual reference content or delete if not needed.
130
+
131
+ Example real reference docs from other skills:
132
+ - product-management/references/communication.md - Comprehensive guide for status updates
133
+ - product-management/references/context_building.md - Deep-dive on gathering context
134
+ - bigquery/references/ - API references and query examples
135
+
136
+ ## When Reference Docs Are Useful
137
+
138
+ Reference docs are ideal for:
139
+ - Comprehensive API documentation
140
+ - Detailed workflow guides
141
+ - Complex multi-step processes
142
+ - Information too lengthy for main SKILL.md
143
+ - Content that's only needed for specific use cases
144
+
145
+ ## Structure Suggestions
146
+
147
+ ### API Reference Example
148
+ - Overview
149
+ - Authentication
150
+ - Endpoints with examples
151
+ - Error codes
152
+ - Rate limits
153
+
154
+ ### Workflow Guide Example
155
+ - Prerequisites
156
+ - Step-by-step instructions
157
+ - Common patterns
158
+ - Troubleshooting
159
+ - Best practices
160
+ """
161
+
162
+ EXAMPLE_ASSET = """# Example Asset File
163
+
164
+ This placeholder represents where asset files would be stored.
165
+ Replace with actual asset files (templates, images, fonts, etc.) or delete if not needed.
166
+
167
+ Asset files are NOT intended to be loaded into context, but rather used within
168
+ the output Claude produces.
169
+
170
+ Example asset files from other skills:
171
+ - Brand guidelines: logo.png, slides_template.pptx
172
+ - Frontend builder: hello-world/ directory with HTML/React boilerplate
173
+ - Typography: custom-font.ttf, font-family.woff2
174
+ - Data: sample_data.csv, test_dataset.json
175
+
176
+ ## Common Asset Types
177
+
178
+ - Templates: .pptx, .docx, boilerplate directories
179
+ - Images: .png, .jpg, .svg, .gif
180
+ - Fonts: .ttf, .otf, .woff, .woff2
181
+ - Boilerplate code: Project directories, starter files
182
+ - Icons: .ico, .svg
183
+ - Data files: .csv, .json, .xml, .yaml
184
+
185
+ Note: This is a text placeholder. Actual assets can be any file type.
186
+ """
187
+
188
+
189
+ def title_case_skill_name(skill_name):
190
+ """Convert hyphenated skill name to Title Case for display."""
191
+ return ' '.join(word.capitalize() for word in skill_name.split('-'))
192
+
193
+
194
+ def init_skill(skill_name, path):
195
+ """
196
+ Initialize a new skill directory with template SKILL.md.
197
+
198
+ Args:
199
+ skill_name: Name of the skill
200
+ path: Path where the skill directory should be created
201
+
202
+ Returns:
203
+ Path to created skill directory, or None if error
204
+ """
205
+ # Determine skill directory path
206
+ skill_dir = Path(path).resolve() / skill_name
207
+
208
+ # Check if directory already exists
209
+ if skill_dir.exists():
210
+ print(f"❌ Error: Skill directory already exists: {skill_dir}")
211
+ return None
212
+
213
+ # Create skill directory
214
+ try:
215
+ skill_dir.mkdir(parents=True, exist_ok=False)
216
+ print(f"✅ Created skill directory: {skill_dir}")
217
+ except Exception as e:
218
+ print(f"❌ Error creating directory: {e}")
219
+ return None
220
+
221
+ # Create SKILL.md from template
222
+ skill_title = title_case_skill_name(skill_name)
223
+ skill_content = SKILL_TEMPLATE.format(
224
+ skill_name=skill_name,
225
+ skill_title=skill_title
226
+ )
227
+
228
+ skill_md_path = skill_dir / 'SKILL.md'
229
+ try:
230
+ skill_md_path.write_text(skill_content)
231
+ print("✅ Created SKILL.md")
232
+ except Exception as e:
233
+ print(f"❌ Error creating SKILL.md: {e}")
234
+ return None
235
+
236
+ # Create resource directories with example files
237
+ try:
238
+ # Create scripts/ directory with example script
239
+ scripts_dir = skill_dir / 'scripts'
240
+ scripts_dir.mkdir(exist_ok=True)
241
+ example_script = scripts_dir / 'example.py'
242
+ example_script.write_text(EXAMPLE_SCRIPT.format(skill_name=skill_name))
243
+ example_script.chmod(0o755)
244
+ print("✅ Created scripts/example.py")
245
+
246
+ # Create references/ directory with example reference doc
247
+ references_dir = skill_dir / 'references'
248
+ references_dir.mkdir(exist_ok=True)
249
+ example_reference = references_dir / 'api_reference.md'
250
+ example_reference.write_text(EXAMPLE_REFERENCE.format(skill_title=skill_title))
251
+ print("✅ Created references/api_reference.md")
252
+
253
+ # Create assets/ directory with example asset placeholder
254
+ assets_dir = skill_dir / 'assets'
255
+ assets_dir.mkdir(exist_ok=True)
256
+ example_asset = assets_dir / 'example_asset.txt'
257
+ example_asset.write_text(EXAMPLE_ASSET)
258
+ print("✅ Created assets/example_asset.txt")
259
+ except Exception as e:
260
+ print(f"❌ Error creating resource directories: {e}")
261
+ return None
262
+
263
+ # Print next steps
264
+ print(f"\n✅ Skill '{skill_name}' initialized successfully at {skill_dir}")
265
+ print("\nNext steps:")
266
+ print("1. Edit SKILL.md to complete the TODO items and update the description")
267
+ print("2. Customize or delete the example files in scripts/, references/, and assets/")
268
+ print("3. Run the validator when ready to check the skill structure")
269
+
270
+ return skill_dir
271
+
272
+
273
+ def main():
274
+ if len(sys.argv) < 4 or sys.argv[2] != '--path':
275
+ print("Usage: init_skill.py <skill-name> --path <path>")
276
+ print("\nSkill name requirements:")
277
+ print(" - Hyphen-case identifier (e.g., 'data-analyzer')")
278
+ print(" - Lowercase letters, digits, and hyphens only")
279
+ print(" - Max 40 characters")
280
+ print(" - Must match directory name exactly")
281
+ print("\nExamples:")
282
+ print(" init_skill.py my-new-skill --path skills/public")
283
+ print(" init_skill.py my-api-helper --path skills/private")
284
+ print(" init_skill.py custom-skill --path /custom/location")
285
+ sys.exit(1)
286
+
287
+ skill_name = sys.argv[1]
288
+ path = sys.argv[3]
289
+
290
+ print(f"🚀 Initializing skill: {skill_name}")
291
+ print(f" Location: {path}")
292
+ print()
293
+
294
+ result = init_skill(skill_name, path)
295
+
296
+ if result:
297
+ sys.exit(0)
298
+ else:
299
+ sys.exit(1)
300
+
301
+
302
+ if __name__ == "__main__":
303
+ main()
@@ -0,0 +1,110 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Skill Packager - Creates a distributable zip file of a skill folder
4
+
5
+ Usage:
6
+ python utils/package_skill.py <path/to/skill-folder> [output-directory]
7
+
8
+ Example:
9
+ python utils/package_skill.py skills/public/my-skill
10
+ python utils/package_skill.py skills/public/my-skill ./dist
11
+ """
12
+
13
+ import sys
14
+ import zipfile
15
+ from pathlib import Path
16
+ from quick_validate import validate_skill
17
+
18
+
19
+ def package_skill(skill_path, output_dir=None):
20
+ """
21
+ Package a skill folder into a zip file.
22
+
23
+ Args:
24
+ skill_path: Path to the skill folder
25
+ output_dir: Optional output directory for the zip file (defaults to current directory)
26
+
27
+ Returns:
28
+ Path to the created zip file, or None if error
29
+ """
30
+ skill_path = Path(skill_path).resolve()
31
+
32
+ # Validate skill folder exists
33
+ if not skill_path.exists():
34
+ print(f"❌ Error: Skill folder not found: {skill_path}")
35
+ return None
36
+
37
+ if not skill_path.is_dir():
38
+ print(f"❌ Error: Path is not a directory: {skill_path}")
39
+ return None
40
+
41
+ # Validate SKILL.md exists
42
+ skill_md = skill_path / "SKILL.md"
43
+ if not skill_md.exists():
44
+ print(f"❌ Error: SKILL.md not found in {skill_path}")
45
+ return None
46
+
47
+ # Run validation before packaging
48
+ print("🔍 Validating skill...")
49
+ valid, message = validate_skill(skill_path)
50
+ if not valid:
51
+ print(f"❌ Validation failed: {message}")
52
+ print(" Please fix the validation errors before packaging.")
53
+ return None
54
+ print(f"✅ {message}\n")
55
+
56
+ # Determine output location
57
+ skill_name = skill_path.name
58
+ if output_dir:
59
+ output_path = Path(output_dir).resolve()
60
+ output_path.mkdir(parents=True, exist_ok=True)
61
+ else:
62
+ output_path = Path.cwd()
63
+
64
+ zip_filename = output_path / f"{skill_name}.zip"
65
+
66
+ # Create the zip file
67
+ try:
68
+ with zipfile.ZipFile(zip_filename, 'w', zipfile.ZIP_DEFLATED) as zipf:
69
+ # Walk through the skill directory
70
+ for file_path in skill_path.rglob('*'):
71
+ if file_path.is_file():
72
+ # Calculate the relative path within the zip
73
+ arcname = file_path.relative_to(skill_path.parent)
74
+ zipf.write(file_path, arcname)
75
+ print(f" Added: {arcname}")
76
+
77
+ print(f"\n✅ Successfully packaged skill to: {zip_filename}")
78
+ return zip_filename
79
+
80
+ except Exception as e:
81
+ print(f"❌ Error creating zip file: {e}")
82
+ return None
83
+
84
+
85
+ def main():
86
+ if len(sys.argv) < 2:
87
+ print("Usage: python utils/package_skill.py <path/to/skill-folder> [output-directory]")
88
+ print("\nExample:")
89
+ print(" python utils/package_skill.py skills/public/my-skill")
90
+ print(" python utils/package_skill.py skills/public/my-skill ./dist")
91
+ sys.exit(1)
92
+
93
+ skill_path = sys.argv[1]
94
+ output_dir = sys.argv[2] if len(sys.argv) > 2 else None
95
+
96
+ print(f"📦 Packaging skill: {skill_path}")
97
+ if output_dir:
98
+ print(f" Output directory: {output_dir}")
99
+ print()
100
+
101
+ result = package_skill(skill_path, output_dir)
102
+
103
+ if result:
104
+ sys.exit(0)
105
+ else:
106
+ sys.exit(1)
107
+
108
+
109
+ if __name__ == "__main__":
110
+ main()
@@ -0,0 +1,65 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Quick validation script for skills - minimal version
4
+ """
5
+
6
+ import sys
7
+ import os
8
+ import re
9
+ from pathlib import Path
10
+
11
+ def validate_skill(skill_path):
12
+ """Basic validation of a skill"""
13
+ skill_path = Path(skill_path)
14
+
15
+ # Check SKILL.md exists
16
+ skill_md = skill_path / 'SKILL.md'
17
+ if not skill_md.exists():
18
+ return False, "SKILL.md not found"
19
+
20
+ # Read and validate frontmatter
21
+ content = skill_md.read_text()
22
+ if not content.startswith('---'):
23
+ return False, "No YAML frontmatter found"
24
+
25
+ # Extract frontmatter
26
+ match = re.match(r'^---\n(.*?)\n---', content, re.DOTALL)
27
+ if not match:
28
+ return False, "Invalid frontmatter format"
29
+
30
+ frontmatter = match.group(1)
31
+
32
+ # Check required fields
33
+ if 'name:' not in frontmatter:
34
+ return False, "Missing 'name' in frontmatter"
35
+ if 'description:' not in frontmatter:
36
+ return False, "Missing 'description' in frontmatter"
37
+
38
+ # Extract name for validation
39
+ name_match = re.search(r'name:\s*(.+)', frontmatter)
40
+ if name_match:
41
+ name = name_match.group(1).strip()
42
+ # Check naming convention (hyphen-case: lowercase with hyphens)
43
+ if not re.match(r'^[a-z0-9-]+$', name):
44
+ return False, f"Name '{name}' should be hyphen-case (lowercase letters, digits, and hyphens only)"
45
+ if name.startswith('-') or name.endswith('-') or '--' in name:
46
+ return False, f"Name '{name}' cannot start/end with hyphen or contain consecutive hyphens"
47
+
48
+ # Extract and validate description
49
+ desc_match = re.search(r'description:\s*(.+)', frontmatter)
50
+ if desc_match:
51
+ description = desc_match.group(1).strip()
52
+ # Check for angle brackets
53
+ if '<' in description or '>' in description:
54
+ return False, "Description cannot contain angle brackets (< or >)"
55
+
56
+ return True, "Skill is valid!"
57
+
58
+ if __name__ == "__main__":
59
+ if len(sys.argv) != 2:
60
+ print("Usage: python quick_validate.py <skill_directory>")
61
+ sys.exit(1)
62
+
63
+ valid, message = validate_skill(sys.argv[1])
64
+ print(message)
65
+ sys.exit(0 if valid else 1)
@@ -0,0 +1,119 @@
1
+ # Creation Log: Systematic Debugging Skill
2
+
3
+ Reference example of extracting, structuring, and bulletproofing a critical skill.
4
+
5
+ ## Source Material
6
+
7
+ Extracted debugging framework from `/Users/jesse/.claude/CLAUDE.md`:
8
+ - 4-phase systematic process (Investigation → Pattern Analysis → Hypothesis → Implementation)
9
+ - Core mandate: ALWAYS find root cause, NEVER fix symptoms
10
+ - Rules designed to resist time pressure and rationalization
11
+
12
+ ## Extraction Decisions
13
+
14
+ **What to include:**
15
+ - Complete 4-phase framework with all rules
16
+ - Anti-shortcuts ("NEVER fix symptom", "STOP and re-analyze")
17
+ - Pressure-resistant language ("even if faster", "even if I seem in a hurry")
18
+ - Concrete steps for each phase
19
+
20
+ **What to leave out:**
21
+ - Project-specific context
22
+ - Repetitive variations of same rule
23
+ - Narrative explanations (condensed to principles)
24
+
25
+ ## Structure Following skill-creation/SKILL.md
26
+
27
+ 1. **Rich when_to_use** - Included symptoms and anti-patterns
28
+ 2. **Type: technique** - Concrete process with steps
29
+ 3. **Keywords** - "root cause", "symptom", "workaround", "debugging", "investigation"
30
+ 4. **Flowchart** - Decision point for "fix failed" → re-analyze vs add more fixes
31
+ 5. **Phase-by-phase breakdown** - Scannable checklist format
32
+ 6. **Anti-patterns section** - What NOT to do (critical for this skill)
33
+
34
+ ## Bulletproofing Elements
35
+
36
+ Framework designed to resist rationalization under pressure:
37
+
38
+ ### Language Choices
39
+ - "ALWAYS" / "NEVER" (not "should" / "try to")
40
+ - "even if faster" / "even if I seem in a hurry"
41
+ - "STOP and re-analyze" (explicit pause)
42
+ - "Don't skip past" (catches the actual behavior)
43
+
44
+ ### Structural Defenses
45
+ - **Phase 1 required** - Can't skip to implementation
46
+ - **Single hypothesis rule** - Forces thinking, prevents shotgun fixes
47
+ - **Explicit failure mode** - "IF your first fix doesn't work" with mandatory action
48
+ - **Anti-patterns section** - Shows exactly what shortcuts look like
49
+
50
+ ### Redundancy
51
+ - Root cause mandate in overview + when_to_use + Phase 1 + implementation rules
52
+ - "NEVER fix symptom" appears 4 times in different contexts
53
+ - Each phase has explicit "don't skip" guidance
54
+
55
+ ## Testing Approach
56
+
57
+ Created 4 validation tests following skills/meta/testing-skills-with-subagents:
58
+
59
+ ### Test 1: Academic Context (No Pressure)
60
+ - Simple bug, no time pressure
61
+ - **Result:** Perfect compliance, complete investigation
62
+
63
+ ### Test 2: Time Pressure + Obvious Quick Fix
64
+ - User "in a hurry", symptom fix looks easy
65
+ - **Result:** Resisted shortcut, followed full process, found real root cause
66
+
67
+ ### Test 3: Complex System + Uncertainty
68
+ - Multi-layer failure, unclear if can find root cause
69
+ - **Result:** Systematic investigation, traced through all layers, found source
70
+
71
+ ### Test 4: Failed First Fix
72
+ - Hypothesis doesn't work, temptation to add more fixes
73
+ - **Result:** Stopped, re-analyzed, formed new hypothesis (no shotgun)
74
+
75
+ **All tests passed.** No rationalizations found.
76
+
77
+ ## Iterations
78
+
79
+ ### Initial Version
80
+ - Complete 4-phase framework
81
+ - Anti-patterns section
82
+ - Flowchart for "fix failed" decision
83
+
84
+ ### Enhancement 1: TDD Reference
85
+ - Added link to skills/testing/test-driven-development
86
+ - Note explaining TDD's "simplest code" ≠ debugging's "root cause"
87
+ - Prevents confusion between methodologies
88
+
89
+ ## Final Outcome
90
+
91
+ Bulletproof skill that:
92
+ - ✅ Clearly mandates root cause investigation
93
+ - ✅ Resists time pressure rationalization
94
+ - ✅ Provides concrete steps for each phase
95
+ - ✅ Shows anti-patterns explicitly
96
+ - ✅ Tested under multiple pressure scenarios
97
+ - ✅ Clarifies relationship to TDD
98
+ - ✅ Ready for use
99
+
100
+ ## Key Insight
101
+
102
+ **Most important bulletproofing:** Anti-patterns section showing exact shortcuts that feel justified in the moment. When Claude thinks "I'll just add this one quick fix", seeing that exact pattern listed as wrong creates cognitive friction.
103
+
104
+ ## Usage Example
105
+
106
+ When encountering a bug:
107
+ 1. Load skill: skills/debugging/systematic-debugging
108
+ 2. Read overview (10 sec) - reminded of mandate
109
+ 3. Follow Phase 1 checklist - forced investigation
110
+ 4. If tempted to skip - see anti-pattern, stop
111
+ 5. Complete all phases - root cause found
112
+
113
+ **Time investment:** 5-10 minutes
114
+ **Time saved:** Hours of symptom-whack-a-mole
115
+
116
+ ---
117
+
118
+ *Created: 2025-10-03*
119
+ *Purpose: Reference example for skill extraction and bulletproofing*