claude-all-hands 1.0.1 → 1.0.3

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 (170) hide show
  1. package/.claude/agents/code-simplifier.md +52 -0
  2. package/.claude/agents/curator.md +186 -246
  3. package/.claude/agents/documentation-taxonomist.md +255 -0
  4. package/.claude/agents/documentation-writer.md +366 -0
  5. package/.claude/agents/planner.md +123 -166
  6. package/.claude/agents/researcher.md +58 -41
  7. package/.claude/agents/surveyor.md +81 -0
  8. package/.claude/agents/worker.md +74 -0
  9. package/.claude/commands/continue.md +122 -0
  10. package/.claude/commands/create-skill.md +107 -0
  11. package/.claude/commands/create-specialist.md +111 -0
  12. package/.claude/commands/curator-audit.md +4 -0
  13. package/.claude/commands/debug.md +183 -0
  14. package/.claude/commands/docs-adjust.md +214 -0
  15. package/.claude/commands/docs-audit.md +172 -0
  16. package/.claude/commands/docs-init.md +210 -0
  17. package/.claude/commands/plan.md +199 -102
  18. package/.claude/commands/validate.md +11 -0
  19. package/.claude/commands/whats-next.md +106 -134
  20. package/.claude/envoy/README.md +5 -5
  21. package/.claude/envoy/envoy +11 -14
  22. package/.claude/envoy/package-lock.json +1594 -0
  23. package/.claude/envoy/package.json +38 -0
  24. package/.claude/envoy/src/cli.ts +126 -0
  25. package/.claude/envoy/src/commands/base.ts +216 -0
  26. package/.claude/envoy/src/commands/docs.ts +881 -0
  27. package/.claude/envoy/src/commands/gemini.ts +999 -0
  28. package/.claude/envoy/src/commands/git.ts +639 -0
  29. package/.claude/envoy/src/commands/index.ts +73 -0
  30. package/.claude/envoy/src/commands/knowledge.ts +178 -0
  31. package/.claude/envoy/src/commands/perplexity.ts +129 -0
  32. package/.claude/envoy/src/commands/plan/core.ts +134 -0
  33. package/.claude/envoy/src/commands/plan/findings.ts +446 -0
  34. package/.claude/envoy/src/commands/plan/gates.ts +672 -0
  35. package/.claude/envoy/src/commands/plan/index.ts +135 -0
  36. package/.claude/envoy/src/commands/plan/lifecycle.ts +648 -0
  37. package/.claude/envoy/src/commands/plan/plan-file.ts +138 -0
  38. package/.claude/envoy/src/commands/plan/prompts.ts +285 -0
  39. package/.claude/envoy/src/commands/plan/protocols.ts +166 -0
  40. package/.claude/envoy/src/commands/repomix.ts +99 -0
  41. package/.claude/envoy/src/commands/tavily.ts +220 -0
  42. package/.claude/envoy/src/commands/xai.ts +168 -0
  43. package/.claude/envoy/src/lib/ast-queries.ts +261 -0
  44. package/.claude/envoy/src/lib/design.ts +41 -0
  45. package/.claude/envoy/src/lib/feedback-schemas.ts +154 -0
  46. package/.claude/envoy/src/lib/findings.ts +215 -0
  47. package/.claude/envoy/src/lib/gates.ts +572 -0
  48. package/.claude/envoy/src/lib/git.ts +132 -0
  49. package/.claude/envoy/src/lib/index.ts +188 -0
  50. package/.claude/envoy/src/lib/knowledge.ts +646 -0
  51. package/.claude/envoy/src/lib/markdown.ts +75 -0
  52. package/.claude/envoy/src/lib/observability.ts +262 -0
  53. package/.claude/envoy/src/lib/paths.ts +130 -0
  54. package/.claude/envoy/src/lib/plan-io.ts +117 -0
  55. package/.claude/envoy/src/lib/prompts.ts +231 -0
  56. package/.claude/envoy/src/lib/protocols.ts +314 -0
  57. package/.claude/envoy/src/lib/repomix.ts +133 -0
  58. package/.claude/envoy/src/lib/retry.ts +138 -0
  59. package/.claude/envoy/src/lib/tree-sitter-utils.ts +301 -0
  60. package/.claude/envoy/src/lib/watcher.ts +167 -0
  61. package/.claude/envoy/src/types/tree-sitter.d.ts +76 -0
  62. package/.claude/envoy/tsconfig.json +21 -0
  63. package/.claude/hooks/scripts/enforce_research_fetch.py +1 -1
  64. package/.claude/hooks/scripts/scan_agents.py +62 -0
  65. package/.claude/hooks/scripts/scan_commands.py +50 -0
  66. package/.claude/hooks/scripts/scan_skills.py +46 -70
  67. package/.claude/hooks/scripts/validate_artifacts.py +128 -0
  68. package/.claude/hooks/startup.sh +26 -24
  69. package/.claude/protocols/bug-discovery.yaml +55 -0
  70. package/.claude/protocols/debugging.yaml +51 -0
  71. package/.claude/protocols/discovery.yaml +53 -0
  72. package/.claude/protocols/implementation.yaml +84 -0
  73. package/.claude/settings.json +38 -97
  74. package/.claude/skills/brainstorming/SKILL.md +54 -0
  75. package/.claude/skills/commands-development/SKILL.md +630 -0
  76. package/.claude/skills/commands-development/references/arguments.md +252 -0
  77. package/.claude/skills/commands-development/references/patterns.md +796 -0
  78. package/.claude/skills/commands-development/references/tool-restrictions.md +376 -0
  79. package/.claude/skills/discovery-mode/SKILL.md +108 -0
  80. package/.claude/skills/documentation-taxonomy/SKILL.md +287 -0
  81. package/.claude/skills/hooks-development/SKILL.md +332 -0
  82. package/.claude/skills/hooks-development/references/command-vs-prompt.md +269 -0
  83. package/.claude/skills/hooks-development/references/examples.md +658 -0
  84. package/.claude/skills/hooks-development/references/hook-types.md +463 -0
  85. package/.claude/skills/hooks-development/references/input-output-schemas.md +469 -0
  86. package/.claude/skills/hooks-development/references/matchers.md +470 -0
  87. package/.claude/skills/hooks-development/references/troubleshooting.md +587 -0
  88. package/.claude/skills/implementation-mode/SKILL.md +171 -0
  89. package/.claude/skills/knowledge-discovery/SKILL.md +178 -0
  90. package/.claude/skills/research-tools/SKILL.md +35 -33
  91. package/.claude/skills/skills-development/SKILL.md +192 -0
  92. package/.claude/skills/skills-development/references/api-security.md +226 -0
  93. package/.claude/skills/skills-development/references/be-clear-and-direct.md +531 -0
  94. package/.claude/skills/skills-development/references/common-patterns.md +595 -0
  95. package/.claude/skills/skills-development/references/core-principles.md +437 -0
  96. package/.claude/skills/skills-development/references/executable-code.md +175 -0
  97. package/.claude/skills/skills-development/references/iteration-and-testing.md +474 -0
  98. package/.claude/skills/skills-development/references/recommended-structure.md +168 -0
  99. package/.claude/skills/skills-development/references/skill-structure.md +372 -0
  100. package/.claude/skills/skills-development/references/use-xml-tags.md +466 -0
  101. package/.claude/skills/skills-development/references/using-scripts.md +113 -0
  102. package/.claude/skills/skills-development/references/using-templates.md +112 -0
  103. package/.claude/skills/skills-development/references/workflows-and-validation.md +510 -0
  104. package/.claude/skills/skills-development/templates/router-skill.md +73 -0
  105. package/.claude/skills/skills-development/templates/simple-skill.md +33 -0
  106. package/.claude/skills/skills-development/workflows/add-reference.md +96 -0
  107. package/.claude/skills/skills-development/workflows/add-script.md +93 -0
  108. package/.claude/skills/skills-development/workflows/add-template.md +74 -0
  109. package/.claude/skills/skills-development/workflows/add-workflow.md +120 -0
  110. package/.claude/skills/skills-development/workflows/audit-skill.md +138 -0
  111. package/.claude/skills/skills-development/workflows/create-domain-expertise-skill.md +605 -0
  112. package/.claude/skills/skills-development/workflows/create-new-skill.md +191 -0
  113. package/.claude/skills/skills-development/workflows/get-guidance.md +121 -0
  114. package/.claude/skills/skills-development/workflows/upgrade-to-router.md +161 -0
  115. package/.claude/skills/skills-development/workflows/verify-skill.md +204 -0
  116. package/.claude/skills/subagents-development/SKILL.md +325 -0
  117. package/.claude/skills/subagents-development/references/context-management.md +567 -0
  118. package/.claude/skills/subagents-development/references/debugging-agents.md +714 -0
  119. package/.claude/skills/subagents-development/references/error-handling-and-recovery.md +502 -0
  120. package/.claude/skills/subagents-development/references/evaluation-and-testing.md +374 -0
  121. package/.claude/skills/subagents-development/references/orchestration-patterns.md +591 -0
  122. package/.claude/skills/subagents-development/references/subagents.md +508 -0
  123. package/.claude/skills/subagents-development/references/writing-subagent-prompts.md +517 -0
  124. package/.claude/statusline.sh +24 -0
  125. package/bin/cli.js +150 -72
  126. package/package.json +1 -1
  127. package/.claude/agents/explorer.md +0 -62
  128. package/.claude/agents/parallel-worker.md +0 -121
  129. package/.claude/commands/curation-fix.md +0 -92
  130. package/.claude/commands/new-branch.md +0 -36
  131. package/.claude/commands/parallel-discovery.md +0 -69
  132. package/.claude/commands/parallel-orchestration.md +0 -99
  133. package/.claude/commands/plan-checkpoint.md +0 -37
  134. package/.claude/envoy/commands/__init__.py +0 -1
  135. package/.claude/envoy/commands/base.py +0 -95
  136. package/.claude/envoy/commands/parallel.py +0 -439
  137. package/.claude/envoy/commands/perplexity.py +0 -86
  138. package/.claude/envoy/commands/plans.py +0 -451
  139. package/.claude/envoy/commands/tavily.py +0 -156
  140. package/.claude/envoy/commands/vertex.py +0 -358
  141. package/.claude/envoy/commands/xai.py +0 -124
  142. package/.claude/envoy/envoy.py +0 -122
  143. package/.claude/envoy/pyrightconfig.json +0 -4
  144. package/.claude/envoy/requirements.txt +0 -2
  145. package/.claude/hooks/capture-queries.sh +0 -3
  146. package/.claude/hooks/scripts/enforce_planning.py +0 -118
  147. package/.claude/hooks/scripts/enforce_rg.py +0 -34
  148. package/.claude/hooks/scripts/validate_skill.py +0 -81
  149. package/.claude/skills/claude-envoy-curation/SKILL.md +0 -162
  150. package/.claude/skills/claude-envoy-usage/SKILL.md +0 -46
  151. package/.claude/skills/command-development/SKILL.md +0 -206
  152. package/.claude/skills/command-development/examples/simple-commands.md +0 -212
  153. package/.claude/skills/command-development/references/frontmatter-reference.md +0 -221
  154. package/.claude/skills/hook-development/SKILL.md +0 -127
  155. package/.claude/skills/hook-development/examples/command-hooks.md +0 -301
  156. package/.claude/skills/hook-development/examples/prompt-hooks.md +0 -114
  157. package/.claude/skills/hook-development/references/event-reference.md +0 -226
  158. package/.claude/skills/repomix-extraction/SKILL.md +0 -91
  159. package/.claude/skills/skill-development/SKILL.md +0 -168
  160. package/.claude/skills/skill-development/examples/complete-skill-examples.md +0 -281
  161. package/.claude/skills/skill-development/references/progressive-disclosure.md +0 -141
  162. package/.claude/skills/skill-development/references/writing-style.md +0 -180
  163. package/.claude/skills/skill-development/scripts/validate-skill.sh +0 -144
  164. package/.claude/skills/specialist-builder/SKILL.md +0 -327
  165. package/.claude/skills/specialist-builder/docs/agent-catalog.md +0 -28
  166. package/.claude/skills/specialist-builder/examples/complete-agent-examples.md +0 -206
  167. package/.claude/skills/specialist-builder/references/system-prompt-patterns.md +0 -281
  168. package/.claude/skills/specialist-builder/references/triggering-examples.md +0 -162
  169. package/.claude/skills/specialist-builder/scripts/validate-agent.sh +0 -137
  170. /package/.claude/{envoy/claude-envoy.py → skills/claude-envoy-patterns/SKILL.md} +0 -0
@@ -0,0 +1,466 @@
1
+ <overview>
2
+ Skills use pure XML structure for consistent parsing, efficient token usage, and improved Claude performance. This reference defines the required and conditional XML tags for skill authoring, along with intelligence rules for tag selection.
3
+ </overview>
4
+
5
+ <critical_rule>
6
+ **Remove ALL markdown headings (#, ##, ###) from skill body content.** Replace with semantic XML tags. Keep markdown formatting WITHIN content (bold, italic, lists, code blocks, links).
7
+ </critical_rule>
8
+
9
+ <required_tags>
10
+ Every skill MUST have these three tags:
11
+
12
+ <tag name="objective">
13
+ **Purpose**: What the skill does and why it matters. Sets context and scope.
14
+
15
+ **Content**: 1-3 paragraphs explaining the skill's purpose, domain, and value proposition.
16
+
17
+ **Example**:
18
+ ```xml
19
+ <objective>
20
+ Extract text and tables from PDF files, fill forms, and merge documents using Python libraries. This skill provides patterns for common PDF operations without requiring external services or APIs.
21
+ </objective>
22
+ ```
23
+ </tag>
24
+
25
+ <tag name="quick_start">
26
+ **Purpose**: Immediate, actionable guidance. Gets Claude started quickly without reading advanced sections.
27
+
28
+ **Content**: Minimal working example, essential commands, or basic usage pattern.
29
+
30
+ **Example**:
31
+ ```xml
32
+ <quick_start>
33
+ Extract text with pdfplumber:
34
+
35
+ ```python
36
+ import pdfplumber
37
+ with pdfplumber.open("file.pdf") as pdf:
38
+ text = pdf.pages[0].extract_text()
39
+ ```
40
+ </quick_start>
41
+ ```
42
+ </tag>
43
+
44
+ <tag name="success_criteria">
45
+ **Purpose**: How to know the task worked. Defines completion criteria.
46
+
47
+ **Alternative name**: `<when_successful>` (use whichever fits better)
48
+
49
+ **Content**: Clear criteria for successful execution, validation steps, or expected outputs.
50
+
51
+ **Example**:
52
+ ```xml
53
+ <success_criteria>
54
+ A well-structured skill has:
55
+
56
+ - Valid YAML frontmatter with descriptive name and description
57
+ - Pure XML structure with no markdown headings in body
58
+ - Required tags: objective, quick_start, success_criteria
59
+ - Progressive disclosure (SKILL.md < 500 lines, details in reference files)
60
+ - Real-world testing and iteration based on observed behavior
61
+ </success_criteria>
62
+ ```
63
+ </tag>
64
+ </required_tags>
65
+
66
+ <conditional_tags>
67
+ Add these tags based on skill complexity and domain requirements:
68
+
69
+ <tag name="context">
70
+ **When to use**: Background or situational information that Claude needs before starting.
71
+
72
+ **Example**:
73
+ ```xml
74
+ <context>
75
+ The Facebook Marketing API uses a hierarchy: Account → Campaign → Ad Set → Ad. Each level has different configuration options and requires specific permissions. Always verify API access before making changes.
76
+ </context>
77
+ ```
78
+ </tag>
79
+
80
+ <tag name="workflow">
81
+ **When to use**: Step-by-step procedures, sequential operations, multi-step processes.
82
+
83
+ **Alternative name**: `<process>`
84
+
85
+ **Example**:
86
+ ```xml
87
+ <workflow>
88
+ 1. **Analyze the form**: Run analyze_form.py to extract field definitions
89
+ 2. **Create field mapping**: Edit fields.json with values
90
+ 3. **Validate mapping**: Run validate_fields.py
91
+ 4. **Fill the form**: Run fill_form.py
92
+ 5. **Verify output**: Check generated PDF
93
+ </workflow>
94
+ ```
95
+ </tag>
96
+
97
+ <tag name="advanced_features">
98
+ **When to use**: Deep-dive topics that most users won't need (progressive disclosure).
99
+
100
+ **Example**:
101
+ ```xml
102
+ <advanced_features>
103
+ **Custom styling**: See [styling.md](styling.md)
104
+ **Template inheritance**: See [templates.md](templates.md)
105
+ **API reference**: See [reference.md](reference.md)
106
+ </advanced_features>
107
+ ```
108
+ </tag>
109
+
110
+ <tag name="validation">
111
+ **When to use**: Skills with verification steps, quality checks, or validation scripts.
112
+
113
+ **Example**:
114
+ ```xml
115
+ <validation>
116
+ After making changes, validate immediately:
117
+
118
+ ```bash
119
+ python scripts/validate.py output_dir/
120
+ ```
121
+
122
+ Only proceed when validation passes. If errors occur, review and fix before continuing.
123
+ </validation>
124
+ ```
125
+ </tag>
126
+
127
+ <tag name="examples">
128
+ **When to use**: Multi-shot learning, input/output pairs, demonstrating patterns.
129
+
130
+ **Example**:
131
+ ```xml
132
+ <examples>
133
+ <example number="1">
134
+ <input>User clicked signup button</input>
135
+ <output>track('signup_initiated', { source: 'homepage' })</output>
136
+ </example>
137
+
138
+ <example number="2">
139
+ <input>Purchase completed</input>
140
+ <output>track('purchase', { value: 49.99, currency: 'USD' })</output>
141
+ </example>
142
+ </examples>
143
+ ```
144
+ </tag>
145
+
146
+ <tag name="anti_patterns">
147
+ **When to use**: Common mistakes that Claude should avoid.
148
+
149
+ **Example**:
150
+ ```xml
151
+ <anti_patterns>
152
+ <pitfall name="vague_descriptions">
153
+ - ❌ "Helps with documents"
154
+ - ✅ "Extract text and tables from PDF files"
155
+ </pitfall>
156
+
157
+ <pitfall name="too_many_options">
158
+ - ❌ "You can use pypdf, or pdfplumber, or PyMuPDF..."
159
+ - ✅ "Use pdfplumber for text extraction. For OCR, use pytesseract instead."
160
+ </pitfall>
161
+ </anti_patterns>
162
+ ```
163
+ </tag>
164
+
165
+ <tag name="security_checklist">
166
+ **When to use**: Skills with security implications (API keys, payments, authentication).
167
+
168
+ **Example**:
169
+ ```xml
170
+ <security_checklist>
171
+ - Never log API keys or tokens
172
+ - Always use environment variables for credentials
173
+ - Validate all user input before API calls
174
+ - Use HTTPS for all external requests
175
+ - Check API response status before proceeding
176
+ </security_checklist>
177
+ ```
178
+ </tag>
179
+
180
+ <tag name="testing">
181
+ **When to use**: Testing workflows, test patterns, or validation steps.
182
+
183
+ **Example**:
184
+ ```xml
185
+ <testing>
186
+ Test with all target models (Haiku, Sonnet, Opus):
187
+
188
+ 1. Run skill on representative tasks
189
+ 2. Observe where Claude struggles or succeeds
190
+ 3. Iterate based on actual behavior
191
+ 4. Validate XML structure after changes
192
+ </testing>
193
+ ```
194
+ </tag>
195
+
196
+ <tag name="common_patterns">
197
+ **When to use**: Code examples, recipes, or reusable patterns.
198
+
199
+ **Example**:
200
+ ```xml
201
+ <common_patterns>
202
+ <pattern name="error_handling">
203
+ ```python
204
+ try:
205
+ result = process_file(path)
206
+ except FileNotFoundError:
207
+ print(f"File not found: {path}")
208
+ except Exception as e:
209
+ print(f"Error: {e}")
210
+ ```
211
+ </pattern>
212
+ </common_patterns>
213
+ ```
214
+ </tag>
215
+
216
+ <tag name="reference_guides">
217
+ **When to use**: Links to detailed reference files (progressive disclosure).
218
+
219
+ **Alternative name**: `<detailed_references>`
220
+
221
+ **Example**:
222
+ ```xml
223
+ <reference_guides>
224
+ For deeper topics, see reference files:
225
+
226
+ **API operations**: [references/api-operations.md](references/api-operations.md)
227
+ **Security patterns**: [references/security.md](references/security.md)
228
+ **Troubleshooting**: [references/troubleshooting.md](references/troubleshooting.md)
229
+ </reference_guides>
230
+ ```
231
+ </tag>
232
+ </conditional_tags>
233
+
234
+ <intelligence_rules>
235
+ <decision_tree>
236
+ **Simple skills** (single domain, straightforward):
237
+ - Required tags only: objective, quick_start, success_criteria
238
+ - Example: Text extraction, file format conversion, simple calculations
239
+
240
+ **Medium skills** (multiple patterns, some complexity):
241
+ - Required tags + workflow/examples as needed
242
+ - Example: Document processing with steps, API integration with configuration
243
+
244
+ **Complex skills** (multiple domains, security, APIs):
245
+ - Required tags + conditional tags as appropriate
246
+ - Example: Payment processing, authentication systems, multi-step workflows with validation
247
+ </decision_tree>
248
+
249
+ <principle>
250
+ Don't over-engineer simple skills. Don't under-specify complex skills. Match tag selection to actual complexity and user needs.
251
+ </principle>
252
+
253
+ <when_to_add_conditional>
254
+ Ask these questions:
255
+
256
+ - **Context needed?** → Add `<context>`
257
+ - **Multi-step process?** → Add `<workflow>` or `<process>`
258
+ - **Advanced topics to hide?** → Add `<advanced_features>` + reference files
259
+ - **Validation required?** → Add `<validation>`
260
+ - **Pattern demonstration?** → Add `<examples>`
261
+ - **Common mistakes?** → Add `<anti_patterns>`
262
+ - **Security concerns?** → Add `<security_checklist>`
263
+ - **Testing guidance?** → Add `<testing>`
264
+ - **Code recipes?** → Add `<common_patterns>`
265
+ - **Deep references?** → Add `<reference_guides>`
266
+ </when_to_add_conditional>
267
+ </intelligence_rules>
268
+
269
+ <xml_vs_markdown_headings>
270
+ <token_efficiency>
271
+ XML tags are more efficient than markdown headings:
272
+
273
+ **Markdown headings**:
274
+ ```markdown
275
+ ## Quick start
276
+ ## Workflow
277
+ ## Advanced features
278
+ ## Success criteria
279
+ ```
280
+ Total: ~20 tokens, no semantic meaning to Claude
281
+
282
+ **XML tags**:
283
+ ```xml
284
+ <quick_start>
285
+ <workflow>
286
+ <advanced_features>
287
+ <success_criteria>
288
+ ```
289
+ Total: ~15 tokens, semantic meaning built-in
290
+ </token_efficiency>
291
+
292
+ <parsing_accuracy>
293
+ XML provides unambiguous boundaries and semantic meaning. Claude can reliably:
294
+ - Identify section boundaries
295
+ - Understand content purpose
296
+ - Skip irrelevant sections
297
+ - Parse programmatically
298
+
299
+ Markdown headings are just visual formatting. Claude must infer meaning from heading text.
300
+ </parsing_accuracy>
301
+
302
+ <consistency>
303
+ XML enforces consistent structure across all skills. All skills use the same tag names for the same purposes. Makes it easier to:
304
+ - Validate skill structure programmatically
305
+ - Learn patterns across skills
306
+ - Maintain consistent quality
307
+ </consistency>
308
+ </xml_vs_markdown_headings>
309
+
310
+ <nesting_guidelines>
311
+ <proper_nesting>
312
+ XML tags can nest for hierarchical content:
313
+
314
+ ```xml
315
+ <examples>
316
+ <example number="1">
317
+ <input>User input here</input>
318
+ <output>Expected output here</output>
319
+ </example>
320
+
321
+ <example number="2">
322
+ <input>Another input</input>
323
+ <output>Another output</output>
324
+ </example>
325
+ </examples>
326
+ ```
327
+ </proper_nesting>
328
+
329
+ <closing_tags>
330
+ Always close tags properly:
331
+
332
+ ✅ Good:
333
+ ```xml
334
+ <objective>
335
+ Content here
336
+ </objective>
337
+ ```
338
+
339
+ ❌ Bad:
340
+ ```xml
341
+ <objective>
342
+ Content here
343
+ ```
344
+ </closing_tags>
345
+
346
+ <tag_naming>
347
+ Use descriptive, semantic names:
348
+ - `<workflow>` not `<steps>`
349
+ - `<success_criteria>` not `<done>`
350
+ - `<anti_patterns>` not `<dont_do>`
351
+
352
+ Be consistent within your skill. If you use `<workflow>`, don't also use `<process>` for the same purpose.
353
+ </tag_naming>
354
+ </nesting_guidelines>
355
+
356
+ <anti_pattern>
357
+ **DO NOT use markdown headings in skill body content.**
358
+
359
+ ❌ Bad (hybrid approach):
360
+ ```markdown
361
+ # PDF Processing
362
+
363
+ ## Quick start
364
+
365
+ Extract text with pdfplumber...
366
+
367
+ ## Advanced features
368
+
369
+ Form filling...
370
+ ```
371
+
372
+ ✅ Good (pure XML):
373
+ ```markdown
374
+ <objective>
375
+ PDF processing with text extraction, form filling, and merging.
376
+ </objective>
377
+
378
+ <quick_start>
379
+ Extract text with pdfplumber...
380
+ </quick_start>
381
+
382
+ <advanced_features>
383
+ Form filling...
384
+ </advanced_features>
385
+ ```
386
+ </anti_pattern>
387
+
388
+ <benefits>
389
+ <benefit type="clarity">
390
+ Clearly separate different sections with unambiguous boundaries
391
+ </benefit>
392
+
393
+ <benefit type="accuracy">
394
+ Reduce parsing errors. Claude knows exactly where sections begin and end.
395
+ </benefit>
396
+
397
+ <benefit type="flexibility">
398
+ Easily find, add, remove, or modify sections without rewriting
399
+ </benefit>
400
+
401
+ <benefit type="parseability">
402
+ Programmatically extract specific sections for validation or analysis
403
+ </benefit>
404
+
405
+ <benefit type="efficiency">
406
+ Lower token usage compared to markdown headings
407
+ </benefit>
408
+
409
+ <benefit type="consistency">
410
+ Standardized structure across all skills in the ecosystem
411
+ </benefit>
412
+ </benefits>
413
+
414
+ <combining_with_other_techniques>
415
+ XML tags work well with other prompting techniques:
416
+
417
+ **Multi-shot learning**:
418
+ ```xml
419
+ <examples>
420
+ <example number="1">...</example>
421
+ <example number="2">...</example>
422
+ </examples>
423
+ ```
424
+
425
+ **Chain of thought**:
426
+ ```xml
427
+ <thinking>
428
+ Analyze the problem...
429
+ </thinking>
430
+
431
+ <answer>
432
+ Based on the analysis...
433
+ </answer>
434
+ ```
435
+
436
+ **Template provision**:
437
+ ```xml
438
+ <template>
439
+ ```markdown
440
+ # Report Title
441
+
442
+ ## Summary
443
+ ...
444
+ ```
445
+ </template>
446
+ ```
447
+
448
+ **Reference material**:
449
+ ```xml
450
+ <schema>
451
+ {
452
+ "field": "type"
453
+ }
454
+ </schema>
455
+ ```
456
+ </combining_with_other_techniques>
457
+
458
+ <tag_reference_pattern>
459
+ When referencing content in tags, use the tag name:
460
+
461
+ "Using the schema in `<schema>` tags..."
462
+ "Follow the workflow in `<workflow>`..."
463
+ "See examples in `<examples>`..."
464
+
465
+ This makes the structure self-documenting.
466
+ </tag_reference_pattern>
@@ -0,0 +1,113 @@
1
+ # Using Scripts in Skills
2
+
3
+ <purpose>
4
+ Scripts are executable code that Claude runs as-is rather than regenerating each time. They ensure reliable, error-free execution of repeated operations.
5
+ </purpose>
6
+
7
+ <when_to_use>
8
+ Use scripts when:
9
+ - The same code runs across multiple skill invocations
10
+ - Operations are error-prone when rewritten from scratch
11
+ - Complex shell commands or API interactions are involved
12
+ - Consistency matters more than flexibility
13
+
14
+ Common script types:
15
+ - **Deployment** - Deploy to Vercel, publish packages, push releases
16
+ - **Setup** - Initialize projects, install dependencies, configure environments
17
+ - **API calls** - Authenticated requests, webhook handlers, data fetches
18
+ - **Data processing** - Transform files, batch operations, migrations
19
+ - **Build processes** - Compile, bundle, test runners
20
+ </when_to_use>
21
+
22
+ <script_structure>
23
+ Scripts live in `scripts/` within the skill directory:
24
+
25
+ ```
26
+ skill-name/
27
+ ├── SKILL.md
28
+ ├── workflows/
29
+ ├── references/
30
+ ├── templates/
31
+ └── scripts/
32
+ ├── deploy.sh
33
+ ├── setup.py
34
+ └── fetch-data.ts
35
+ ```
36
+
37
+ A well-structured script includes:
38
+ 1. Clear purpose comment at top
39
+ 2. Input validation
40
+ 3. Error handling
41
+ 4. Idempotent operations where possible
42
+ 5. Clear output/feedback
43
+ </script_structure>
44
+
45
+ <script_example>
46
+ ```bash
47
+ #!/bin/bash
48
+ # deploy.sh - Deploy project to Vercel
49
+ # Usage: ./deploy.sh [environment]
50
+ # Environments: preview (default), production
51
+
52
+ set -euo pipefail
53
+
54
+ ENVIRONMENT="${1:-preview}"
55
+
56
+ # Validate environment
57
+ if [[ "$ENVIRONMENT" != "preview" && "$ENVIRONMENT" != "production" ]]; then
58
+ echo "Error: Environment must be 'preview' or 'production'"
59
+ exit 1
60
+ fi
61
+
62
+ echo "Deploying to $ENVIRONMENT..."
63
+
64
+ if [[ "$ENVIRONMENT" == "production" ]]; then
65
+ vercel --prod
66
+ else
67
+ vercel
68
+ fi
69
+
70
+ echo "Deployment complete."
71
+ ```
72
+ </script_example>
73
+
74
+ <workflow_integration>
75
+ Workflows reference scripts like this:
76
+
77
+ ```xml
78
+ <process>
79
+ ## Step 5: Deploy
80
+
81
+ 1. Ensure all tests pass
82
+ 2. Run `scripts/deploy.sh production`
83
+ 3. Verify deployment succeeded
84
+ 4. Update user with deployment URL
85
+ </process>
86
+ ```
87
+
88
+ The workflow tells Claude WHEN to run the script. The script handles HOW the operation executes.
89
+ </workflow_integration>
90
+
91
+ <best_practices>
92
+ **Do:**
93
+ - Make scripts idempotent (safe to run multiple times)
94
+ - Include clear usage comments
95
+ - Validate inputs before executing
96
+ - Provide meaningful error messages
97
+ - Use `set -euo pipefail` in bash scripts
98
+
99
+ **Don't:**
100
+ - Hardcode secrets or credentials (use environment variables)
101
+ - Create scripts for one-off operations
102
+ - Skip error handling
103
+ - Make scripts do too many unrelated things
104
+ - Forget to make scripts executable (`chmod +x`)
105
+ </best_practices>
106
+
107
+ <security_considerations>
108
+ - Never embed API keys, tokens, or secrets in scripts
109
+ - Use environment variables for sensitive configuration
110
+ - Validate and sanitize any user-provided inputs
111
+ - Be cautious with scripts that delete or modify data
112
+ - Consider adding `--dry-run` options for destructive operations
113
+ </security_considerations>
@@ -0,0 +1,112 @@
1
+ # Using Templates in Skills
2
+
3
+ <purpose>
4
+ Templates are reusable output structures that Claude copies and fills in. They ensure consistent, high-quality outputs without regenerating structure each time.
5
+ </purpose>
6
+
7
+ <when_to_use>
8
+ Use templates when:
9
+ - Output should have consistent structure across invocations
10
+ - The structure matters more than creative generation
11
+ - Filling placeholders is more reliable than blank-page generation
12
+ - Users expect predictable, professional-looking outputs
13
+
14
+ Common template types:
15
+ - **Plans** - Project plans, implementation plans, migration plans
16
+ - **Specifications** - Technical specs, feature specs, API specs
17
+ - **Documents** - Reports, proposals, summaries
18
+ - **Configurations** - Config files, settings, environment setups
19
+ - **Scaffolds** - File structures, boilerplate code
20
+ </when_to_use>
21
+
22
+ <template_structure>
23
+ Templates live in `templates/` within the skill directory:
24
+
25
+ ```
26
+ skill-name/
27
+ ├── SKILL.md
28
+ ├── workflows/
29
+ ├── references/
30
+ └── templates/
31
+ ├── plan-template.md
32
+ ├── spec-template.md
33
+ └── report-template.md
34
+ ```
35
+
36
+ A template file contains:
37
+ 1. Clear section markers
38
+ 2. Placeholder indicators (use `{{placeholder}}` or `[PLACEHOLDER]`)
39
+ 3. Inline guidance for what goes where
40
+ 4. Example content where helpful
41
+ </template_structure>
42
+
43
+ <template_example>
44
+ ```markdown
45
+ # {{PROJECT_NAME}} Implementation Plan
46
+
47
+ ## Overview
48
+ {{1-2 sentence summary of what this plan covers}}
49
+
50
+ ## Goals
51
+ - {{Primary goal}}
52
+ - {{Secondary goals...}}
53
+
54
+ ## Scope
55
+ **In scope:**
56
+ - {{What's included}}
57
+
58
+ **Out of scope:**
59
+ - {{What's explicitly excluded}}
60
+
61
+ ## Phases
62
+
63
+ ### Phase 1: {{Phase name}}
64
+ **Duration:** {{Estimated duration}}
65
+ **Deliverables:**
66
+ - {{Deliverable 1}}
67
+ - {{Deliverable 2}}
68
+
69
+ ### Phase 2: {{Phase name}}
70
+ ...
71
+
72
+ ## Success Criteria
73
+ - [ ] {{Measurable criterion 1}}
74
+ - [ ] {{Measurable criterion 2}}
75
+
76
+ ## Risks
77
+ | Risk | Likelihood | Impact | Mitigation |
78
+ |------|------------|--------|------------|
79
+ | {{Risk}} | {{H/M/L}} | {{H/M/L}} | {{Strategy}} |
80
+ ```
81
+ </template_example>
82
+
83
+ <workflow_integration>
84
+ Workflows reference templates like this:
85
+
86
+ ```xml
87
+ <process>
88
+ ## Step 3: Generate Plan
89
+
90
+ 1. Read `templates/plan-template.md`
91
+ 2. Copy the template structure
92
+ 3. Fill each placeholder based on gathered requirements
93
+ 4. Review for completeness
94
+ </process>
95
+ ```
96
+
97
+ The workflow tells Claude WHEN to use the template. The template provides WHAT structure to produce.
98
+ </workflow_integration>
99
+
100
+ <best_practices>
101
+ **Do:**
102
+ - Keep templates focused on structure, not content
103
+ - Use clear placeholder syntax consistently
104
+ - Include brief inline guidance where sections might be ambiguous
105
+ - Make templates complete but minimal
106
+
107
+ **Don't:**
108
+ - Put excessive example content that might be copied verbatim
109
+ - Create templates for outputs that genuinely need creative generation
110
+ - Over-constrain with too many required sections
111
+ - Forget to update templates when requirements change
112
+ </best_practices>