claude-all-hands 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/code-simplifier.md +52 -0
- package/.claude/agents/curator.md +189 -245
- package/.claude/agents/documentor.md +147 -0
- package/.claude/agents/planner.md +123 -166
- package/.claude/agents/researcher.md +58 -41
- package/.claude/agents/surveyor.md +81 -0
- package/.claude/agents/worker.md +74 -0
- package/.claude/commands/audit-docs.md +94 -0
- package/.claude/commands/continue.md +120 -0
- package/.claude/commands/create-docs.md +100 -0
- package/.claude/commands/create-skill.md +107 -0
- package/.claude/commands/create-specialist.md +111 -0
- package/.claude/commands/curator-audit.md +4 -0
- package/.claude/commands/debug.md +183 -0
- package/.claude/commands/plan.md +199 -102
- package/.claude/commands/validate.md +11 -0
- package/.claude/commands/whats-next.md +106 -134
- package/.claude/envoy/envoy +11 -14
- package/.claude/envoy/package-lock.json +1388 -0
- package/.claude/envoy/package.json +29 -0
- package/.claude/envoy/src/cli.ts +126 -0
- package/.claude/envoy/src/commands/base.ts +216 -0
- package/.claude/envoy/src/commands/gemini.ts +999 -0
- package/.claude/envoy/src/commands/git.ts +639 -0
- package/.claude/envoy/src/commands/index.ts +73 -0
- package/.claude/envoy/src/commands/knowledge.ts +187 -0
- package/.claude/envoy/src/commands/perplexity.ts +129 -0
- package/.claude/envoy/src/commands/plan/core.ts +134 -0
- package/.claude/envoy/src/commands/plan/findings.ts +446 -0
- package/.claude/envoy/src/commands/plan/gates.ts +672 -0
- package/.claude/envoy/src/commands/plan/index.ts +135 -0
- package/.claude/envoy/src/commands/plan/lifecycle.ts +648 -0
- package/.claude/envoy/src/commands/plan/plan-file.ts +138 -0
- package/.claude/envoy/src/commands/plan/prompts.ts +285 -0
- package/.claude/envoy/src/commands/plan/protocols.ts +166 -0
- package/.claude/envoy/src/commands/repomix.ts +99 -0
- package/.claude/envoy/src/commands/tavily.ts +220 -0
- package/.claude/envoy/src/commands/xai.ts +168 -0
- package/.claude/envoy/src/lib/design.ts +41 -0
- package/.claude/envoy/src/lib/feedback-schemas.ts +154 -0
- package/.claude/envoy/src/lib/findings.ts +215 -0
- package/.claude/envoy/src/lib/gates.ts +572 -0
- package/.claude/envoy/src/lib/git.ts +132 -0
- package/.claude/envoy/src/lib/index.ts +188 -0
- package/.claude/envoy/src/lib/knowledge.ts +594 -0
- package/.claude/envoy/src/lib/markdown.ts +75 -0
- package/.claude/envoy/src/lib/observability.ts +262 -0
- package/.claude/envoy/src/lib/paths.ts +130 -0
- package/.claude/envoy/src/lib/plan-io.ts +117 -0
- package/.claude/envoy/src/lib/prompts.ts +231 -0
- package/.claude/envoy/src/lib/protocols.ts +314 -0
- package/.claude/envoy/src/lib/repomix.ts +133 -0
- package/.claude/envoy/src/lib/retry.ts +138 -0
- package/.claude/envoy/src/lib/watcher.ts +167 -0
- package/.claude/envoy/tsconfig.json +21 -0
- package/.claude/hooks/scripts/scan_agents.py +62 -0
- package/.claude/hooks/scripts/scan_commands.py +50 -0
- package/.claude/hooks/scripts/scan_skills.py +46 -70
- package/.claude/hooks/scripts/validate_artifacts.py +128 -0
- package/.claude/hooks/startup.sh +26 -24
- package/.claude/protocols/bug-discovery.yaml +55 -0
- package/.claude/protocols/debugging.yaml +51 -0
- package/.claude/protocols/discovery.yaml +53 -0
- package/.claude/protocols/implementation.yaml +84 -0
- package/.claude/settings.json +37 -97
- package/.claude/skills/brainstorming/SKILL.md +54 -0
- package/.claude/skills/commands-development/SKILL.md +630 -0
- package/.claude/skills/commands-development/references/arguments.md +252 -0
- package/.claude/skills/commands-development/references/patterns.md +796 -0
- package/.claude/skills/commands-development/references/tool-restrictions.md +376 -0
- package/.claude/skills/discovery-mode/SKILL.md +108 -0
- package/.claude/skills/hooks-development/SKILL.md +332 -0
- package/.claude/skills/hooks-development/references/command-vs-prompt.md +269 -0
- package/.claude/skills/hooks-development/references/examples.md +658 -0
- package/.claude/skills/hooks-development/references/hook-types.md +463 -0
- package/.claude/skills/hooks-development/references/input-output-schemas.md +469 -0
- package/.claude/skills/hooks-development/references/matchers.md +470 -0
- package/.claude/skills/hooks-development/references/troubleshooting.md +587 -0
- package/.claude/skills/implementation-mode/SKILL.md +171 -0
- package/.claude/skills/research-tools/SKILL.md +35 -33
- package/.claude/skills/skills-development/SKILL.md +192 -0
- package/.claude/skills/skills-development/references/api-security.md +226 -0
- package/.claude/skills/skills-development/references/be-clear-and-direct.md +531 -0
- package/.claude/skills/skills-development/references/common-patterns.md +595 -0
- package/.claude/skills/skills-development/references/core-principles.md +437 -0
- package/.claude/skills/skills-development/references/executable-code.md +175 -0
- package/.claude/skills/skills-development/references/iteration-and-testing.md +474 -0
- package/.claude/skills/skills-development/references/recommended-structure.md +168 -0
- package/.claude/skills/skills-development/references/skill-structure.md +372 -0
- package/.claude/skills/skills-development/references/use-xml-tags.md +466 -0
- package/.claude/skills/skills-development/references/using-scripts.md +113 -0
- package/.claude/skills/skills-development/references/using-templates.md +112 -0
- package/.claude/skills/skills-development/references/workflows-and-validation.md +510 -0
- package/.claude/skills/skills-development/templates/router-skill.md +73 -0
- package/.claude/skills/skills-development/templates/simple-skill.md +33 -0
- package/.claude/skills/skills-development/workflows/add-reference.md +96 -0
- package/.claude/skills/skills-development/workflows/add-script.md +93 -0
- package/.claude/skills/skills-development/workflows/add-template.md +74 -0
- package/.claude/skills/skills-development/workflows/add-workflow.md +120 -0
- package/.claude/skills/skills-development/workflows/audit-skill.md +138 -0
- package/.claude/skills/skills-development/workflows/create-domain-expertise-skill.md +605 -0
- package/.claude/skills/skills-development/workflows/create-new-skill.md +191 -0
- package/.claude/skills/skills-development/workflows/get-guidance.md +121 -0
- package/.claude/skills/skills-development/workflows/upgrade-to-router.md +161 -0
- package/.claude/skills/skills-development/workflows/verify-skill.md +204 -0
- package/.claude/skills/subagents-development/SKILL.md +325 -0
- package/.claude/skills/subagents-development/references/context-management.md +567 -0
- package/.claude/skills/subagents-development/references/debugging-agents.md +714 -0
- package/.claude/skills/subagents-development/references/error-handling-and-recovery.md +502 -0
- package/.claude/skills/subagents-development/references/evaluation-and-testing.md +374 -0
- package/.claude/skills/subagents-development/references/orchestration-patterns.md +591 -0
- package/.claude/skills/subagents-development/references/subagents.md +508 -0
- package/.claude/skills/subagents-development/references/writing-subagent-prompts.md +517 -0
- package/.claude/statusline.sh +24 -0
- package/bin/cli.js +110 -72
- package/package.json +1 -1
- package/.claude/agents/explorer.md +0 -62
- package/.claude/agents/parallel-worker.md +0 -121
- package/.claude/commands/curation-fix.md +0 -92
- package/.claude/commands/new-branch.md +0 -36
- package/.claude/commands/parallel-discovery.md +0 -69
- package/.claude/commands/parallel-orchestration.md +0 -99
- package/.claude/commands/plan-checkpoint.md +0 -37
- package/.claude/envoy/commands/__init__.py +0 -1
- package/.claude/envoy/commands/base.py +0 -95
- package/.claude/envoy/commands/parallel.py +0 -439
- package/.claude/envoy/commands/perplexity.py +0 -86
- package/.claude/envoy/commands/plans.py +0 -451
- package/.claude/envoy/commands/tavily.py +0 -156
- package/.claude/envoy/commands/vertex.py +0 -358
- package/.claude/envoy/commands/xai.py +0 -124
- package/.claude/envoy/envoy.py +0 -122
- package/.claude/envoy/pyrightconfig.json +0 -4
- package/.claude/envoy/requirements.txt +0 -2
- package/.claude/hooks/capture-queries.sh +0 -3
- package/.claude/hooks/scripts/enforce_planning.py +0 -118
- package/.claude/hooks/scripts/enforce_rg.py +0 -34
- package/.claude/hooks/scripts/validate_skill.py +0 -81
- package/.claude/skills/claude-envoy-curation/SKILL.md +0 -162
- package/.claude/skills/claude-envoy-usage/SKILL.md +0 -46
- package/.claude/skills/command-development/SKILL.md +0 -206
- package/.claude/skills/command-development/examples/simple-commands.md +0 -212
- package/.claude/skills/command-development/references/frontmatter-reference.md +0 -221
- package/.claude/skills/hook-development/SKILL.md +0 -127
- package/.claude/skills/hook-development/examples/command-hooks.md +0 -301
- package/.claude/skills/hook-development/examples/prompt-hooks.md +0 -114
- package/.claude/skills/hook-development/references/event-reference.md +0 -226
- package/.claude/skills/repomix-extraction/SKILL.md +0 -91
- package/.claude/skills/skill-development/SKILL.md +0 -168
- package/.claude/skills/skill-development/examples/complete-skill-examples.md +0 -281
- package/.claude/skills/skill-development/references/progressive-disclosure.md +0 -141
- package/.claude/skills/skill-development/references/writing-style.md +0 -180
- package/.claude/skills/skill-development/scripts/validate-skill.sh +0 -144
- package/.claude/skills/specialist-builder/SKILL.md +0 -327
- package/.claude/skills/specialist-builder/docs/agent-catalog.md +0 -28
- package/.claude/skills/specialist-builder/examples/complete-agent-examples.md +0 -206
- package/.claude/skills/specialist-builder/references/system-prompt-patterns.md +0 -281
- package/.claude/skills/specialist-builder/references/triggering-examples.md +0 -162
- package/.claude/skills/specialist-builder/scripts/validate-agent.sh +0 -137
- /package/.claude/{envoy/claude-envoy.py → skills/claude-envoy-patterns/SKILL.md} +0 -0
|
@@ -0,0 +1,595 @@
|
|
|
1
|
+
<overview>
|
|
2
|
+
This reference documents common patterns for skill authoring, including templates, examples, terminology consistency, and anti-patterns. All patterns use pure XML structure.
|
|
3
|
+
</overview>
|
|
4
|
+
|
|
5
|
+
<template_pattern>
|
|
6
|
+
<description>
|
|
7
|
+
Provide templates for output format. Match the level of strictness to your needs.
|
|
8
|
+
</description>
|
|
9
|
+
|
|
10
|
+
<strict_requirements>
|
|
11
|
+
Use when output format must be exact and consistent:
|
|
12
|
+
|
|
13
|
+
```xml
|
|
14
|
+
<report_structure>
|
|
15
|
+
ALWAYS use this exact template structure:
|
|
16
|
+
|
|
17
|
+
```markdown
|
|
18
|
+
# [Analysis Title]
|
|
19
|
+
|
|
20
|
+
## Executive summary
|
|
21
|
+
[One-paragraph overview of key findings]
|
|
22
|
+
|
|
23
|
+
## Key findings
|
|
24
|
+
- Finding 1 with supporting data
|
|
25
|
+
- Finding 2 with supporting data
|
|
26
|
+
- Finding 3 with supporting data
|
|
27
|
+
|
|
28
|
+
## Recommendations
|
|
29
|
+
1. Specific actionable recommendation
|
|
30
|
+
2. Specific actionable recommendation
|
|
31
|
+
```
|
|
32
|
+
</report_structure>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**When to use**: Compliance reports, standardized formats, automated processing
|
|
36
|
+
</strict_requirements>
|
|
37
|
+
|
|
38
|
+
<flexible_guidance>
|
|
39
|
+
Use when Claude should adapt the format based on context:
|
|
40
|
+
|
|
41
|
+
```xml
|
|
42
|
+
<report_structure>
|
|
43
|
+
Here is a sensible default format, but use your best judgment:
|
|
44
|
+
|
|
45
|
+
```markdown
|
|
46
|
+
# [Analysis Title]
|
|
47
|
+
|
|
48
|
+
## Executive summary
|
|
49
|
+
[Overview]
|
|
50
|
+
|
|
51
|
+
## Key findings
|
|
52
|
+
[Adapt sections based on what you discover]
|
|
53
|
+
|
|
54
|
+
## Recommendations
|
|
55
|
+
[Tailor to the specific context]
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Adjust sections as needed for the specific analysis type.
|
|
59
|
+
</report_structure>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**When to use**: Exploratory analysis, context-dependent formatting, creative tasks
|
|
63
|
+
</flexible_guidance>
|
|
64
|
+
</template_pattern>
|
|
65
|
+
|
|
66
|
+
<examples_pattern>
|
|
67
|
+
<description>
|
|
68
|
+
For skills where output quality depends on seeing examples, provide input/output pairs.
|
|
69
|
+
</description>
|
|
70
|
+
|
|
71
|
+
<commit_messages_example>
|
|
72
|
+
```xml
|
|
73
|
+
<objective>
|
|
74
|
+
Generate commit messages following conventional commit format.
|
|
75
|
+
</objective>
|
|
76
|
+
|
|
77
|
+
<commit_message_format>
|
|
78
|
+
Generate commit messages following these examples:
|
|
79
|
+
|
|
80
|
+
<example number="1">
|
|
81
|
+
<input>Added user authentication with JWT tokens</input>
|
|
82
|
+
<output>
|
|
83
|
+
```
|
|
84
|
+
feat(auth): implement JWT-based authentication
|
|
85
|
+
|
|
86
|
+
Add login endpoint and token validation middleware
|
|
87
|
+
```
|
|
88
|
+
</output>
|
|
89
|
+
</example>
|
|
90
|
+
|
|
91
|
+
<example number="2">
|
|
92
|
+
<input>Fixed bug where dates displayed incorrectly in reports</input>
|
|
93
|
+
<output>
|
|
94
|
+
```
|
|
95
|
+
fix(reports): correct date formatting in timezone conversion
|
|
96
|
+
|
|
97
|
+
Use UTC timestamps consistently across report generation
|
|
98
|
+
```
|
|
99
|
+
</output>
|
|
100
|
+
</example>
|
|
101
|
+
|
|
102
|
+
Follow this style: type(scope): brief description, then detailed explanation.
|
|
103
|
+
</commit_message_format>
|
|
104
|
+
```
|
|
105
|
+
</commit_messages_example>
|
|
106
|
+
|
|
107
|
+
<when_to_use>
|
|
108
|
+
- Output format has nuances that text explanations can't capture
|
|
109
|
+
- Pattern recognition is easier than rule following
|
|
110
|
+
- Examples demonstrate edge cases
|
|
111
|
+
- Multi-shot learning improves quality
|
|
112
|
+
</when_to_use>
|
|
113
|
+
</examples_pattern>
|
|
114
|
+
|
|
115
|
+
<consistent_terminology>
|
|
116
|
+
<principle>
|
|
117
|
+
Choose one term and use it throughout the skill. Inconsistent terminology confuses Claude and reduces execution quality.
|
|
118
|
+
</principle>
|
|
119
|
+
|
|
120
|
+
<good_example>
|
|
121
|
+
Consistent usage:
|
|
122
|
+
- Always "API endpoint" (not mixing with "URL", "API route", "path")
|
|
123
|
+
- Always "field" (not mixing with "box", "element", "control")
|
|
124
|
+
- Always "extract" (not mixing with "pull", "get", "retrieve")
|
|
125
|
+
|
|
126
|
+
```xml
|
|
127
|
+
<objective>
|
|
128
|
+
Extract data from API endpoints using field mappings.
|
|
129
|
+
</objective>
|
|
130
|
+
|
|
131
|
+
<quick_start>
|
|
132
|
+
1. Identify the API endpoint
|
|
133
|
+
2. Map response fields to your schema
|
|
134
|
+
3. Extract field values
|
|
135
|
+
</quick_start>
|
|
136
|
+
```
|
|
137
|
+
</good_example>
|
|
138
|
+
|
|
139
|
+
<bad_example>
|
|
140
|
+
Inconsistent usage creates confusion:
|
|
141
|
+
|
|
142
|
+
```xml
|
|
143
|
+
<objective>
|
|
144
|
+
Pull data from API routes using element mappings.
|
|
145
|
+
</objective>
|
|
146
|
+
|
|
147
|
+
<quick_start>
|
|
148
|
+
1. Identify the URL
|
|
149
|
+
2. Map response boxes to your schema
|
|
150
|
+
3. Retrieve control values
|
|
151
|
+
</quick_start>
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Claude must now interpret: Are "API routes" and "URLs" the same? Are "fields", "boxes", "elements", and "controls" the same?
|
|
155
|
+
</bad_example>
|
|
156
|
+
|
|
157
|
+
<implementation>
|
|
158
|
+
1. Choose terminology early in skill development
|
|
159
|
+
2. Document key terms in `<objective>` or `<context>`
|
|
160
|
+
3. Use find/replace to enforce consistency
|
|
161
|
+
4. Review reference files for consistent usage
|
|
162
|
+
</implementation>
|
|
163
|
+
</consistent_terminology>
|
|
164
|
+
|
|
165
|
+
<provide_default_with_escape_hatch>
|
|
166
|
+
<principle>
|
|
167
|
+
Provide a default approach with an escape hatch for special cases, not a list of alternatives. Too many options paralyze decision-making.
|
|
168
|
+
</principle>
|
|
169
|
+
|
|
170
|
+
<good_example>
|
|
171
|
+
Clear default with escape hatch:
|
|
172
|
+
|
|
173
|
+
```xml
|
|
174
|
+
<quick_start>
|
|
175
|
+
Use pdfplumber for text extraction:
|
|
176
|
+
|
|
177
|
+
```python
|
|
178
|
+
import pdfplumber
|
|
179
|
+
with pdfplumber.open("file.pdf") as pdf:
|
|
180
|
+
text = pdf.pages[0].extract_text()
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
For scanned PDFs requiring OCR, use pdf2image with pytesseract instead.
|
|
184
|
+
</quick_start>
|
|
185
|
+
```
|
|
186
|
+
</good_example>
|
|
187
|
+
|
|
188
|
+
<bad_example>
|
|
189
|
+
Too many options creates decision paralysis:
|
|
190
|
+
|
|
191
|
+
```xml
|
|
192
|
+
<quick_start>
|
|
193
|
+
You can use any of these libraries:
|
|
194
|
+
|
|
195
|
+
- **pypdf**: Good for basic extraction
|
|
196
|
+
- **pdfplumber**: Better for tables
|
|
197
|
+
- **PyMuPDF**: Faster but more complex
|
|
198
|
+
- **pdf2image**: For scanned documents
|
|
199
|
+
- **pdfminer**: Low-level control
|
|
200
|
+
- **tabula-py**: Table-focused
|
|
201
|
+
|
|
202
|
+
Choose based on your needs.
|
|
203
|
+
</quick_start>
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Claude must now research and compare all options before starting. This wastes tokens and time.
|
|
207
|
+
</bad_example>
|
|
208
|
+
|
|
209
|
+
<implementation>
|
|
210
|
+
1. Recommend ONE default approach
|
|
211
|
+
2. Explain when to use the default (implied: most of the time)
|
|
212
|
+
3. Add ONE escape hatch for edge cases
|
|
213
|
+
4. Link to advanced reference if multiple alternatives truly needed
|
|
214
|
+
</implementation>
|
|
215
|
+
</provide_default_with_escape_hatch>
|
|
216
|
+
|
|
217
|
+
<anti_patterns>
|
|
218
|
+
<description>
|
|
219
|
+
Common mistakes to avoid when authoring skills.
|
|
220
|
+
</description>
|
|
221
|
+
|
|
222
|
+
<pitfall name="markdown_headings_in_body">
|
|
223
|
+
❌ **BAD**: Using markdown headings in skill body:
|
|
224
|
+
|
|
225
|
+
```markdown
|
|
226
|
+
# PDF Processing
|
|
227
|
+
|
|
228
|
+
## Quick start
|
|
229
|
+
Extract text with pdfplumber...
|
|
230
|
+
|
|
231
|
+
## Advanced features
|
|
232
|
+
Form filling requires additional setup...
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
✅ **GOOD**: Using pure XML structure:
|
|
236
|
+
|
|
237
|
+
```xml
|
|
238
|
+
<objective>
|
|
239
|
+
PDF processing with text extraction, form filling, and merging capabilities.
|
|
240
|
+
</objective>
|
|
241
|
+
|
|
242
|
+
<quick_start>
|
|
243
|
+
Extract text with pdfplumber...
|
|
244
|
+
</quick_start>
|
|
245
|
+
|
|
246
|
+
<advanced_features>
|
|
247
|
+
Form filling requires additional setup...
|
|
248
|
+
</advanced_features>
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
**Why it matters**: XML provides semantic meaning, reliable parsing, and token efficiency.
|
|
252
|
+
</pitfall>
|
|
253
|
+
|
|
254
|
+
<pitfall name="vague_descriptions">
|
|
255
|
+
❌ **BAD**:
|
|
256
|
+
```yaml
|
|
257
|
+
description: Helps with documents
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
✅ **GOOD**:
|
|
261
|
+
```yaml
|
|
262
|
+
description: Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when the user mentions PDFs, forms, or document extraction.
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
**Why it matters**: Vague descriptions prevent Claude from discovering and using the skill appropriately.
|
|
266
|
+
</pitfall>
|
|
267
|
+
|
|
268
|
+
<pitfall name="inconsistent_pov">
|
|
269
|
+
❌ **BAD**:
|
|
270
|
+
```yaml
|
|
271
|
+
description: I can help you process Excel files and generate reports
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
✅ **GOOD**:
|
|
275
|
+
```yaml
|
|
276
|
+
description: Processes Excel files and generates reports. Use when analyzing spreadsheets or .xlsx files.
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
**Why it matters**: Skills must use third person. First/second person breaks the skill metadata pattern.
|
|
280
|
+
</pitfall>
|
|
281
|
+
|
|
282
|
+
<pitfall name="wrong_naming_convention">
|
|
283
|
+
❌ **BAD**: Directory name doesn't match skill name or verb-noun convention:
|
|
284
|
+
- Directory: `facebook-ads`, Name: `facebook-ads-manager`
|
|
285
|
+
- Directory: `stripe-integration`, Name: `stripe`
|
|
286
|
+
- Directory: `helper-scripts`, Name: `helper`
|
|
287
|
+
|
|
288
|
+
✅ **GOOD**: Consistent verb-noun convention:
|
|
289
|
+
- Directory: `manage-facebook-ads`, Name: `manage-facebook-ads`
|
|
290
|
+
- Directory: `setup-stripe-payments`, Name: `setup-stripe-payments`
|
|
291
|
+
- Directory: `process-pdfs`, Name: `process-pdfs`
|
|
292
|
+
|
|
293
|
+
**Why it matters**: Consistency in naming makes skills discoverable and predictable.
|
|
294
|
+
</pitfall>
|
|
295
|
+
|
|
296
|
+
<pitfall name="too_many_options">
|
|
297
|
+
❌ **BAD**:
|
|
298
|
+
```xml
|
|
299
|
+
<quick_start>
|
|
300
|
+
You can use pypdf, or pdfplumber, or PyMuPDF, or pdf2image, or pdfminer, or tabula-py...
|
|
301
|
+
</quick_start>
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
✅ **GOOD**:
|
|
305
|
+
```xml
|
|
306
|
+
<quick_start>
|
|
307
|
+
Use pdfplumber for text extraction:
|
|
308
|
+
|
|
309
|
+
```python
|
|
310
|
+
import pdfplumber
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
For scanned PDFs requiring OCR, use pdf2image with pytesseract instead.
|
|
314
|
+
</quick_start>
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
**Why it matters**: Decision paralysis. Provide one default approach with escape hatch for special cases.
|
|
318
|
+
</pitfall>
|
|
319
|
+
|
|
320
|
+
<pitfall name="deeply_nested_references">
|
|
321
|
+
❌ **BAD**: References nested multiple levels:
|
|
322
|
+
```
|
|
323
|
+
SKILL.md → advanced.md → details.md → examples.md
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
✅ **GOOD**: References one level deep from SKILL.md:
|
|
327
|
+
```
|
|
328
|
+
SKILL.md → advanced.md
|
|
329
|
+
SKILL.md → details.md
|
|
330
|
+
SKILL.md → examples.md
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
**Why it matters**: Claude may only partially read deeply nested files. Keep references one level deep from SKILL.md.
|
|
334
|
+
</pitfall>
|
|
335
|
+
|
|
336
|
+
<pitfall name="windows_paths">
|
|
337
|
+
❌ **BAD**:
|
|
338
|
+
```xml
|
|
339
|
+
<reference_guides>
|
|
340
|
+
See scripts\validate.py for validation
|
|
341
|
+
</reference_guides>
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
✅ **GOOD**:
|
|
345
|
+
```xml
|
|
346
|
+
<reference_guides>
|
|
347
|
+
See scripts/validate.py for validation
|
|
348
|
+
</reference_guides>
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
**Why it matters**: Always use forward slashes for cross-platform compatibility.
|
|
352
|
+
</pitfall>
|
|
353
|
+
|
|
354
|
+
<pitfall name="dynamic_context_and_file_reference_execution">
|
|
355
|
+
**Problem**: When showing examples of dynamic context syntax (exclamation mark + backticks) or file references (@ prefix), the skill loader executes these during skill loading.
|
|
356
|
+
|
|
357
|
+
❌ **BAD** - These execute during skill load:
|
|
358
|
+
```xml
|
|
359
|
+
<examples>
|
|
360
|
+
Load current status with: !`git status`
|
|
361
|
+
Review dependencies in: @package.json
|
|
362
|
+
</examples>
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
✅ **GOOD** - Add space to prevent execution:
|
|
366
|
+
```xml
|
|
367
|
+
<examples>
|
|
368
|
+
Load current status with: ! `git status` (remove space before backtick in actual usage)
|
|
369
|
+
Review dependencies in: @ package.json (remove space after @ in actual usage)
|
|
370
|
+
</examples>
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
**When this applies**:
|
|
374
|
+
- Skills that teach users about dynamic context (slash commands, prompts)
|
|
375
|
+
- Any documentation showing the exclamation mark prefix syntax or @ file references
|
|
376
|
+
- Skills with example commands or file paths that shouldn't execute during loading
|
|
377
|
+
|
|
378
|
+
**Why it matters**: Without the space, these execute during skill load, causing errors or unwanted file reads.
|
|
379
|
+
</pitfall>
|
|
380
|
+
|
|
381
|
+
<pitfall name="missing_required_tags">
|
|
382
|
+
❌ **BAD**: Missing required tags:
|
|
383
|
+
```xml
|
|
384
|
+
<quick_start>
|
|
385
|
+
Use this tool for processing...
|
|
386
|
+
</quick_start>
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
✅ **GOOD**: All required tags present:
|
|
390
|
+
```xml
|
|
391
|
+
<objective>
|
|
392
|
+
Process data files with validation and transformation.
|
|
393
|
+
</objective>
|
|
394
|
+
|
|
395
|
+
<quick_start>
|
|
396
|
+
Use this tool for processing...
|
|
397
|
+
</quick_start>
|
|
398
|
+
|
|
399
|
+
<success_criteria>
|
|
400
|
+
- Input file successfully processed
|
|
401
|
+
- Output file validates without errors
|
|
402
|
+
- Transformation applied correctly
|
|
403
|
+
</success_criteria>
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
**Why it matters**: Every skill must have `<objective>`, `<quick_start>`, and `<success_criteria>` (or `<when_successful>`).
|
|
407
|
+
</pitfall>
|
|
408
|
+
|
|
409
|
+
<pitfall name="hybrid_xml_markdown">
|
|
410
|
+
❌ **BAD**: Mixing XML tags with markdown headings:
|
|
411
|
+
```markdown
|
|
412
|
+
<objective>
|
|
413
|
+
PDF processing capabilities
|
|
414
|
+
</objective>
|
|
415
|
+
|
|
416
|
+
## Quick start
|
|
417
|
+
|
|
418
|
+
Extract text with pdfplumber...
|
|
419
|
+
|
|
420
|
+
## Advanced features
|
|
421
|
+
|
|
422
|
+
Form filling...
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
✅ **GOOD**: Pure XML throughout:
|
|
426
|
+
```xml
|
|
427
|
+
<objective>
|
|
428
|
+
PDF processing capabilities
|
|
429
|
+
</objective>
|
|
430
|
+
|
|
431
|
+
<quick_start>
|
|
432
|
+
Extract text with pdfplumber...
|
|
433
|
+
</quick_start>
|
|
434
|
+
|
|
435
|
+
<advanced_features>
|
|
436
|
+
Form filling...
|
|
437
|
+
</advanced_features>
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
**Why it matters**: Consistency in structure. Either use pure XML or pure markdown (prefer XML).
|
|
441
|
+
</pitfall>
|
|
442
|
+
|
|
443
|
+
<pitfall name="unclosed_xml_tags">
|
|
444
|
+
❌ **BAD**: Forgetting to close XML tags:
|
|
445
|
+
```xml
|
|
446
|
+
<objective>
|
|
447
|
+
Process PDF files
|
|
448
|
+
|
|
449
|
+
<quick_start>
|
|
450
|
+
Use pdfplumber...
|
|
451
|
+
</quick_start>
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
✅ **GOOD**: Properly closed tags:
|
|
455
|
+
```xml
|
|
456
|
+
<objective>
|
|
457
|
+
Process PDF files
|
|
458
|
+
</objective>
|
|
459
|
+
|
|
460
|
+
<quick_start>
|
|
461
|
+
Use pdfplumber...
|
|
462
|
+
</quick_start>
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
**Why it matters**: Unclosed tags break XML parsing and create ambiguous boundaries.
|
|
466
|
+
</pitfall>
|
|
467
|
+
</anti_patterns>
|
|
468
|
+
|
|
469
|
+
<progressive_disclosure_pattern>
|
|
470
|
+
<description>
|
|
471
|
+
Keep SKILL.md concise by linking to detailed reference files. Claude loads reference files only when needed.
|
|
472
|
+
</description>
|
|
473
|
+
|
|
474
|
+
<implementation>
|
|
475
|
+
```xml
|
|
476
|
+
<objective>
|
|
477
|
+
Manage Facebook Ads campaigns, ad sets, and ads via the Marketing API.
|
|
478
|
+
</objective>
|
|
479
|
+
|
|
480
|
+
<quick_start>
|
|
481
|
+
<basic_operations>
|
|
482
|
+
See [basic-operations.md](basic-operations.md) for campaign creation and management.
|
|
483
|
+
</basic_operations>
|
|
484
|
+
</quick_start>
|
|
485
|
+
|
|
486
|
+
<advanced_features>
|
|
487
|
+
**Custom audiences**: See [audiences.md](audiences.md)
|
|
488
|
+
**Conversion tracking**: See [conversions.md](conversions.md)
|
|
489
|
+
**Budget optimization**: See [budgets.md](budgets.md)
|
|
490
|
+
**API reference**: See [api-reference.md](api-reference.md)
|
|
491
|
+
</advanced_features>
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
**Benefits**:
|
|
495
|
+
- SKILL.md stays under 500 lines
|
|
496
|
+
- Claude only reads relevant reference files
|
|
497
|
+
- Token usage scales with task complexity
|
|
498
|
+
- Easier to maintain and update
|
|
499
|
+
</implementation>
|
|
500
|
+
</progressive_disclosure_pattern>
|
|
501
|
+
|
|
502
|
+
<validation_pattern>
|
|
503
|
+
<description>
|
|
504
|
+
For skills with validation steps, make validation scripts verbose and specific.
|
|
505
|
+
</description>
|
|
506
|
+
|
|
507
|
+
<implementation>
|
|
508
|
+
```xml
|
|
509
|
+
<validation>
|
|
510
|
+
After making changes, validate immediately:
|
|
511
|
+
|
|
512
|
+
```bash
|
|
513
|
+
python scripts/validate.py output_dir/
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
If validation fails, fix errors before continuing. Validation errors include:
|
|
517
|
+
|
|
518
|
+
- **Field not found**: "Field 'signature_date' not found. Available fields: customer_name, order_total, signature_date_signed"
|
|
519
|
+
- **Type mismatch**: "Field 'order_total' expects number, got string"
|
|
520
|
+
- **Missing required field**: "Required field 'customer_name' is missing"
|
|
521
|
+
|
|
522
|
+
Only proceed when validation passes with zero errors.
|
|
523
|
+
</validation>
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
**Why verbose errors help**:
|
|
527
|
+
- Claude can fix issues without guessing
|
|
528
|
+
- Specific error messages reduce iteration cycles
|
|
529
|
+
- Available options shown in error messages
|
|
530
|
+
</implementation>
|
|
531
|
+
</validation_pattern>
|
|
532
|
+
|
|
533
|
+
<checklist_pattern>
|
|
534
|
+
<description>
|
|
535
|
+
For complex multi-step workflows, provide a checklist Claude can copy and track progress.
|
|
536
|
+
</description>
|
|
537
|
+
|
|
538
|
+
<implementation>
|
|
539
|
+
```xml
|
|
540
|
+
<workflow>
|
|
541
|
+
Copy this checklist and check off items as you complete them:
|
|
542
|
+
|
|
543
|
+
```
|
|
544
|
+
Task Progress:
|
|
545
|
+
- [ ] Step 1: Analyze the form (run analyze_form.py)
|
|
546
|
+
- [ ] Step 2: Create field mapping (edit fields.json)
|
|
547
|
+
- [ ] Step 3: Validate mapping (run validate_fields.py)
|
|
548
|
+
- [ ] Step 4: Fill the form (run fill_form.py)
|
|
549
|
+
- [ ] Step 5: Verify output (run verify_output.py)
|
|
550
|
+
```
|
|
551
|
+
|
|
552
|
+
<step_1>
|
|
553
|
+
**Analyze the form**
|
|
554
|
+
|
|
555
|
+
Run: `python scripts/analyze_form.py input.pdf`
|
|
556
|
+
|
|
557
|
+
This extracts form fields and their locations, saving to `fields.json`.
|
|
558
|
+
</step_1>
|
|
559
|
+
|
|
560
|
+
<step_2>
|
|
561
|
+
**Create field mapping**
|
|
562
|
+
|
|
563
|
+
Edit `fields.json` to add values for each field.
|
|
564
|
+
</step_2>
|
|
565
|
+
|
|
566
|
+
<step_3>
|
|
567
|
+
**Validate mapping**
|
|
568
|
+
|
|
569
|
+
Run: `python scripts/validate_fields.py fields.json`
|
|
570
|
+
|
|
571
|
+
Fix any validation errors before continuing.
|
|
572
|
+
</step_3>
|
|
573
|
+
|
|
574
|
+
<step_4>
|
|
575
|
+
**Fill the form**
|
|
576
|
+
|
|
577
|
+
Run: `python scripts/fill_form.py input.pdf fields.json output.pdf`
|
|
578
|
+
</step_4>
|
|
579
|
+
|
|
580
|
+
<step_5>
|
|
581
|
+
**Verify output**
|
|
582
|
+
|
|
583
|
+
Run: `python scripts/verify_output.py output.pdf`
|
|
584
|
+
|
|
585
|
+
If verification fails, return to Step 2.
|
|
586
|
+
</step_5>
|
|
587
|
+
</workflow>
|
|
588
|
+
```
|
|
589
|
+
|
|
590
|
+
**Benefits**:
|
|
591
|
+
- Clear progress tracking
|
|
592
|
+
- Prevents skipping steps
|
|
593
|
+
- Easy to resume after interruption
|
|
594
|
+
</implementation>
|
|
595
|
+
</checklist_pattern>
|