aiblueprint-cli 1.4.23 → 1.4.25
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-code-config/skills/git-commit/SKILL.md +42 -0
- package/claude-code-config/{commands/git/create-pr.md → skills/git-create-pr/SKILL.md} +12 -18
- package/claude-code-config/skills/git-fix-pr-comments/SKILL.md +51 -0
- package/claude-code-config/skills/git-merge/SKILL.md +68 -0
- package/claude-code-config/skills/{claude-memory → meta-claude-memory}/SKILL.md +7 -2
- package/claude-code-config/skills/meta-claude-memory/references/rules-directory-guide.md +298 -0
- package/claude-code-config/skills/meta-prompt-creator/SKILL.md +285 -0
- package/claude-code-config/skills/meta-prompt-creator/references/anthropic-best-practices.md +126 -0
- package/claude-code-config/skills/meta-prompt-creator/references/anti-patterns.md +57 -0
- package/claude-code-config/skills/meta-prompt-creator/references/clarity-principles.md +54 -0
- package/claude-code-config/skills/meta-prompt-creator/references/context-management.md +389 -0
- package/claude-code-config/skills/meta-prompt-creator/references/few-shot-patterns.md +47 -0
- package/claude-code-config/skills/meta-prompt-creator/references/openai-best-practices.md +50 -0
- package/claude-code-config/skills/meta-prompt-creator/references/prompt-templates.md +110 -0
- package/claude-code-config/skills/meta-prompt-creator/references/reasoning-techniques.md +52 -0
- package/claude-code-config/skills/meta-prompt-creator/references/system-prompt-patterns.md +48 -0
- package/claude-code-config/skills/meta-prompt-creator/references/xml-structure.md +36 -0
- package/claude-code-config/skills/meta-skill-creator/LICENSE.txt +202 -0
- package/claude-code-config/skills/meta-skill-creator/SKILL.md +421 -0
- package/claude-code-config/skills/meta-skill-creator/package.json +5 -0
- package/claude-code-config/skills/meta-skill-creator/references/output-patterns.md +82 -0
- package/claude-code-config/skills/meta-skill-creator/references/progressive-disclosure-patterns.md +374 -0
- package/claude-code-config/skills/meta-skill-creator/references/prompting-integration.md +363 -0
- package/claude-code-config/skills/meta-skill-creator/references/real-world-examples.md +513 -0
- package/claude-code-config/skills/meta-skill-creator/references/script-patterns.md +385 -0
- package/claude-code-config/skills/meta-skill-creator/references/workflows.md +28 -0
- package/claude-code-config/skills/meta-skill-creator/references/xml-tag-guide.md +606 -0
- package/claude-code-config/skills/meta-skill-creator/scripts/init-skill.ts +214 -0
- package/claude-code-config/skills/meta-skill-creator/scripts/package-skill.ts +146 -0
- package/claude-code-config/skills/meta-skill-creator/scripts/validate.ts +138 -0
- package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/SKILL.md +41 -15
- package/claude-code-config/skills/{setup-ralph → ralph-loop}/steps/step-00-init.md +2 -3
- package/claude-code-config/skills/utils-fix-errors/SKILL.md +61 -0
- package/claude-code-config/skills/utils-fix-grammar/SKILL.md +59 -0
- package/claude-code-config/skills/utils-oneshot/SKILL.md +56 -0
- package/claude-code-config/skills/workflow-apex/SKILL.md +303 -0
- package/claude-code-config/skills/workflow-apex/scripts/setup-templates.sh +134 -0
- package/claude-code-config/skills/workflow-apex/scripts/update-progress.sh +80 -0
- package/claude-code-config/skills/workflow-apex/steps/step-00-init.md +288 -0
- package/claude-code-config/skills/workflow-apex/steps/step-00b-branch.md +126 -0
- package/claude-code-config/skills/workflow-apex/steps/step-00b-economy.md +244 -0
- package/claude-code-config/skills/workflow-apex/steps/step-00b-interactive.md +153 -0
- package/claude-code-config/skills/workflow-apex/steps/step-01-analyze.md +361 -0
- package/claude-code-config/skills/workflow-apex/steps/step-02-plan.md +264 -0
- package/claude-code-config/skills/workflow-apex/steps/step-03-execute.md +239 -0
- package/claude-code-config/skills/workflow-apex/steps/step-04-validate.md +264 -0
- package/claude-code-config/skills/workflow-apex/steps/step-05-examine.md +294 -0
- package/claude-code-config/skills/workflow-apex/steps/step-06-resolve.md +237 -0
- package/claude-code-config/skills/workflow-apex/steps/step-07-tests.md +250 -0
- package/claude-code-config/skills/workflow-apex/steps/step-08-run-tests.md +308 -0
- package/claude-code-config/skills/workflow-apex/steps/step-09-finish.md +193 -0
- package/claude-code-config/skills/workflow-apex/templates/00-context.md +51 -0
- package/claude-code-config/skills/workflow-apex/templates/01-analyze.md +10 -0
- package/claude-code-config/skills/workflow-apex/templates/02-plan.md +10 -0
- package/claude-code-config/skills/workflow-apex/templates/03-execute.md +10 -0
- package/claude-code-config/skills/workflow-apex/templates/04-validate.md +10 -0
- package/claude-code-config/skills/workflow-apex/templates/05-examine.md +10 -0
- package/claude-code-config/skills/workflow-apex/templates/06-resolve.md +10 -0
- package/claude-code-config/skills/workflow-apex/templates/07-tests.md +10 -0
- package/claude-code-config/skills/workflow-apex/templates/08-run-tests.md +10 -0
- package/claude-code-config/skills/workflow-apex/templates/09-finish.md +10 -0
- package/claude-code-config/skills/workflow-apex/templates/README.md +195 -0
- package/claude-code-config/skills/workflow-apex/templates/step-complete.md +7 -0
- package/claude-code-config/skills/workflow-apex-free/SKILL.md +261 -0
- package/claude-code-config/skills/workflow-apex-free/scripts/setup-templates.sh +100 -0
- package/claude-code-config/skills/workflow-apex-free/scripts/update-progress.sh +80 -0
- package/claude-code-config/skills/workflow-apex-free/steps/step-00-init.md +267 -0
- package/claude-code-config/skills/workflow-apex-free/steps/step-00b-branch.md +126 -0
- package/claude-code-config/skills/workflow-apex-free/steps/step-00b-economy.md +244 -0
- package/claude-code-config/skills/workflow-apex-free/steps/step-00b-interactive.md +153 -0
- package/claude-code-config/skills/workflow-apex-free/steps/step-01-analyze.md +361 -0
- package/claude-code-config/skills/workflow-apex-free/steps/step-02-plan.md +264 -0
- package/claude-code-config/skills/workflow-apex-free/steps/step-03-execute.md +239 -0
- package/claude-code-config/skills/workflow-apex-free/steps/step-04-validate.md +251 -0
- package/claude-code-config/skills/workflow-apex-free/templates/00-context.md +43 -0
- package/claude-code-config/skills/workflow-apex-free/templates/01-analyze.md +10 -0
- package/claude-code-config/skills/workflow-apex-free/templates/02-plan.md +10 -0
- package/claude-code-config/skills/workflow-apex-free/templates/03-execute.md +10 -0
- package/claude-code-config/skills/workflow-apex-free/templates/04-validate.md +10 -0
- package/claude-code-config/skills/workflow-apex-free/templates/README.md +176 -0
- package/claude-code-config/skills/workflow-apex-free/templates/step-complete.md +7 -0
- package/dist/cli.js +146 -9
- package/package.json +1 -1
- package/claude-code-config/commands/explore.md +0 -90
- package/claude-code-config/commands/git/commit.md +0 -60
- package/claude-code-config/commands/git/fix-pr-comments.md +0 -59
- package/claude-code-config/commands/oneshot.md +0 -57
- package/claude-code-config/skills/create-slash-commands/SKILL.md +0 -1110
- package/claude-code-config/skills/create-slash-commands/references/arguments.md +0 -273
- package/claude-code-config/skills/create-slash-commands/references/patterns.md +0 -947
- package/claude-code-config/skills/create-slash-commands/references/prompt-examples.md +0 -656
- package/claude-code-config/skills/create-slash-commands/references/tool-restrictions.md +0 -389
- /package/claude-code-config/skills/{claude-memory → meta-claude-memory}/references/comprehensive-example.md +0 -0
- /package/claude-code-config/skills/{claude-memory → meta-claude-memory}/references/project-patterns.md +0 -0
- /package/claude-code-config/skills/{claude-memory → meta-claude-memory}/references/prompting-techniques.md +0 -0
- /package/claude-code-config/skills/{claude-memory → meta-claude-memory}/references/section-templates.md +0 -0
- /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/context-management.md +0 -0
- /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/debugging-agents.md +0 -0
- /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/error-handling-and-recovery.md +0 -0
- /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/evaluation-and-testing.md +0 -0
- /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/orchestration-patterns.md +0 -0
- /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/subagents.md +0 -0
- /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/writing-subagent-prompts.md +0 -0
- /package/claude-code-config/skills/{setup-ralph → ralph-loop}/SKILL.md +0 -0
- /package/claude-code-config/skills/{setup-ralph → ralph-loop}/scripts/setup.sh +0 -0
- /package/claude-code-config/skills/{setup-ralph → ralph-loop}/steps/step-01-interactive-prd.md +0 -0
- /package/claude-code-config/skills/{setup-ralph → ralph-loop}/steps/step-02-create-stories.md +0 -0
- /package/claude-code-config/skills/{setup-ralph → ralph-loop}/steps/step-03-finish.md +0 -0
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
<overview>
|
|
2
|
+
How to integrate expert prompting techniques from the create-prompt skill into skill creation. Every skill should apply proven prompting principles for maximum effectiveness.
|
|
3
|
+
</overview>
|
|
4
|
+
|
|
5
|
+
<core_principle>
|
|
6
|
+
Skills are specialized prompts that get loaded on-demand. All prompting best practices from create-prompt apply to skill creation, with emphasis on:
|
|
7
|
+
|
|
8
|
+
- Clear, specific instructions
|
|
9
|
+
- XML tags for structure
|
|
10
|
+
- Examples when format matters
|
|
11
|
+
- Success criteria defined
|
|
12
|
+
- Context management for long-running tasks
|
|
13
|
+
</core_principle>
|
|
14
|
+
|
|
15
|
+
<prompting_techniques_for_skills>
|
|
16
|
+
<technique name="be_clear_and_direct">
|
|
17
|
+
**Apply to skills by**:
|
|
18
|
+
|
|
19
|
+
- State exactly what Claude should do
|
|
20
|
+
- Avoid ambiguous language ("try to", "maybe", "generally")
|
|
21
|
+
- Use "Always..." or "Never..." instead of "Should probably..."
|
|
22
|
+
- Provide specific output format requirements
|
|
23
|
+
|
|
24
|
+
**Example in SKILL.md**:
|
|
25
|
+
|
|
26
|
+
❌ **Vague**:
|
|
27
|
+
```xml
|
|
28
|
+
<workflow>
|
|
29
|
+
Try to extract the data from the PDF. If it works, save it somewhere.
|
|
30
|
+
</workflow>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
✅ **Clear**:
|
|
34
|
+
```xml
|
|
35
|
+
<workflow>
|
|
36
|
+
1. **Extract data**: Use `pdfplumber.open()` to read PDF
|
|
37
|
+
2. **Parse content**: Call `extract_text()` on each page
|
|
38
|
+
3. **Save output**: Write to JSON file with UTF-8 encoding
|
|
39
|
+
</workflow>
|
|
40
|
+
```
|
|
41
|
+
</technique>
|
|
42
|
+
|
|
43
|
+
<technique name="use_xml_tags">
|
|
44
|
+
**Apply to skills by**:
|
|
45
|
+
|
|
46
|
+
- Use pure XML structure (no markdown headings)
|
|
47
|
+
- Separate sections with semantic tags
|
|
48
|
+
- Wrap data in descriptive tags
|
|
49
|
+
- Define clear boundaries
|
|
50
|
+
|
|
51
|
+
Skills already enforce this through required structure. See [xml-tag-guide.md](xml-tag-guide.md).
|
|
52
|
+
</technique>
|
|
53
|
+
|
|
54
|
+
<technique name="few_shot_examples">
|
|
55
|
+
**Apply to skills by**:
|
|
56
|
+
|
|
57
|
+
Provide 2-4 input/output pairs when output format matters:
|
|
58
|
+
|
|
59
|
+
**Example in SKILL.md**:
|
|
60
|
+
```xml
|
|
61
|
+
<examples>
|
|
62
|
+
<example number="1">
|
|
63
|
+
<task>Extract product names from invoice PDF</task>
|
|
64
|
+
<code>
|
|
65
|
+
```python
|
|
66
|
+
with pdfplumber.open("invoice.pdf") as pdf:
|
|
67
|
+
text = pdf.pages[0].extract_text()
|
|
68
|
+
products = re.findall(r'Product: (.+)', text)
|
|
69
|
+
```
|
|
70
|
+
</code>
|
|
71
|
+
<output>
|
|
72
|
+
['Widget A', 'Gadget B', 'Tool C']
|
|
73
|
+
</output>
|
|
74
|
+
</example>
|
|
75
|
+
|
|
76
|
+
<example number="2">
|
|
77
|
+
<task>Extract table from financial report</task>
|
|
78
|
+
<code>
|
|
79
|
+
```python
|
|
80
|
+
with pdfplumber.open("report.pdf") as pdf:
|
|
81
|
+
table = pdf.pages[1].extract_table()
|
|
82
|
+
```
|
|
83
|
+
</code>
|
|
84
|
+
<output>
|
|
85
|
+
[['Quarter', 'Revenue'],
|
|
86
|
+
['Q1', '$1.2M'],
|
|
87
|
+
['Q2', '$1.5M']]
|
|
88
|
+
</output>
|
|
89
|
+
</example>
|
|
90
|
+
</examples>
|
|
91
|
+
```
|
|
92
|
+
</technique>
|
|
93
|
+
|
|
94
|
+
<technique name="chain_of_thought">
|
|
95
|
+
**Apply to skills by**:
|
|
96
|
+
|
|
97
|
+
For complex tasks, add explicit reasoning steps:
|
|
98
|
+
|
|
99
|
+
**Example in SKILL.md**:
|
|
100
|
+
```xml
|
|
101
|
+
<workflow>
|
|
102
|
+
<step_1>
|
|
103
|
+
**Analyze PDF structure**: First, inspect the PDF to understand layout and content type. Use `pdfplumber.open()` to examine pages.
|
|
104
|
+
</step_1>
|
|
105
|
+
|
|
106
|
+
<step_2>
|
|
107
|
+
**Determine extraction method**: Based on structure, choose between:
|
|
108
|
+
- `extract_text()` for plain text
|
|
109
|
+
- `extract_table()` for tabular data
|
|
110
|
+
- Custom parsing for complex layouts
|
|
111
|
+
</step_2>
|
|
112
|
+
|
|
113
|
+
<step_3>
|
|
114
|
+
**Extract content**: Apply chosen method to each page, handling errors gracefully.
|
|
115
|
+
</step_3>
|
|
116
|
+
|
|
117
|
+
<step_4>
|
|
118
|
+
**Validate output**: Check for encoding issues, missing data, or formatting problems before saving.
|
|
119
|
+
</step_4>
|
|
120
|
+
</workflow>
|
|
121
|
+
```
|
|
122
|
+
</technique>
|
|
123
|
+
|
|
124
|
+
<technique name="success_criteria">
|
|
125
|
+
**Apply to skills by**:
|
|
126
|
+
|
|
127
|
+
Always include `<success_criteria>` tag with specific, measurable criteria:
|
|
128
|
+
|
|
129
|
+
**Example in SKILL.md**:
|
|
130
|
+
```xml
|
|
131
|
+
<success_criteria>
|
|
132
|
+
The extraction is successful when:
|
|
133
|
+
|
|
134
|
+
- All pages processed without errors
|
|
135
|
+
- Text encoding is correct (no mojibake)
|
|
136
|
+
- Output file created with expected structure
|
|
137
|
+
- Data completeness verified (no missing sections)
|
|
138
|
+
- File size is reasonable (not empty or corrupted)
|
|
139
|
+
</success_criteria>
|
|
140
|
+
```
|
|
141
|
+
</technique>
|
|
142
|
+
|
|
143
|
+
<technique name="context_management">
|
|
144
|
+
**Apply to skills by**:
|
|
145
|
+
|
|
146
|
+
For long-running tasks, add state tracking guidance:
|
|
147
|
+
|
|
148
|
+
**Example in SKILL.md**:
|
|
149
|
+
```xml
|
|
150
|
+
<workflow>
|
|
151
|
+
<state_tracking>
|
|
152
|
+
For large batches, track progress:
|
|
153
|
+
|
|
154
|
+
```python
|
|
155
|
+
import json
|
|
156
|
+
from pathlib import Path
|
|
157
|
+
|
|
158
|
+
progress_file = Path("progress.json")
|
|
159
|
+
|
|
160
|
+
# Load previous progress
|
|
161
|
+
if progress_file.exists():
|
|
162
|
+
progress = json.loads(progress_file.read_text())
|
|
163
|
+
else:
|
|
164
|
+
progress = {"processed": [], "failed": []}
|
|
165
|
+
|
|
166
|
+
# Process files
|
|
167
|
+
for pdf_file in pdf_files:
|
|
168
|
+
if str(pdf_file) in progress["processed"]:
|
|
169
|
+
continue # Skip already processed
|
|
170
|
+
|
|
171
|
+
try:
|
|
172
|
+
extract_pdf(pdf_file)
|
|
173
|
+
progress["processed"].append(str(pdf_file))
|
|
174
|
+
except Exception as e:
|
|
175
|
+
progress["failed"].append({"file": str(pdf_file), "error": str(e)})
|
|
176
|
+
|
|
177
|
+
# Save progress after each file
|
|
178
|
+
progress_file.write_text(json.dumps(progress, indent=2))
|
|
179
|
+
```
|
|
180
|
+
</state_tracking>
|
|
181
|
+
</workflow>
|
|
182
|
+
```
|
|
183
|
+
</technique>
|
|
184
|
+
</prompting_techniques_for_skills>
|
|
185
|
+
|
|
186
|
+
<skill_specific_patterns>
|
|
187
|
+
<pattern name="explicit_workflow">
|
|
188
|
+
**When to use**: Multi-step processes
|
|
189
|
+
|
|
190
|
+
Instead of vague instructions, provide explicit numbered steps:
|
|
191
|
+
|
|
192
|
+
❌ **Vague**:
|
|
193
|
+
```xml
|
|
194
|
+
<objective>
|
|
195
|
+
Process PDFs to extract data and save results.
|
|
196
|
+
</objective>
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
✅ **Explicit**:
|
|
200
|
+
```xml
|
|
201
|
+
<objective>
|
|
202
|
+
Extract structured data from PDF files through a 4-step process: analyze, extract, validate, save.
|
|
203
|
+
</objective>
|
|
204
|
+
|
|
205
|
+
<workflow>
|
|
206
|
+
1. **Analyze PDF structure**: Inspect layout and content type
|
|
207
|
+
2. **Extract content**: Apply appropriate extraction method
|
|
208
|
+
3. **Validate output**: Check completeness and encoding
|
|
209
|
+
4. **Save results**: Write to structured format (JSON/CSV)
|
|
210
|
+
</workflow>
|
|
211
|
+
```
|
|
212
|
+
</pattern>
|
|
213
|
+
|
|
214
|
+
<pattern name="anti_patterns_section">
|
|
215
|
+
**When to use**: Common mistakes exist
|
|
216
|
+
|
|
217
|
+
Help Claude avoid mistakes by showing bad vs good examples:
|
|
218
|
+
|
|
219
|
+
```xml
|
|
220
|
+
<anti_patterns>
|
|
221
|
+
<pitfall name="incorrect_encoding">
|
|
222
|
+
❌ **Bad**: Assuming UTF-8 encoding
|
|
223
|
+
|
|
224
|
+
```python
|
|
225
|
+
text = pdf.pages[0].extract_text()
|
|
226
|
+
file.write(text) # May fail with encoding errors
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
**Why bad**: PDFs may use various encodings
|
|
230
|
+
|
|
231
|
+
✅ **Good**: Specify encoding explicitly
|
|
232
|
+
|
|
233
|
+
```python
|
|
234
|
+
text = pdf.pages[0].extract_text()
|
|
235
|
+
file.write(text, encoding='utf-8', errors='replace')
|
|
236
|
+
```
|
|
237
|
+
</pitfall>
|
|
238
|
+
</anti_patterns>
|
|
239
|
+
```
|
|
240
|
+
</pattern>
|
|
241
|
+
|
|
242
|
+
<pattern name="validation_guidance">
|
|
243
|
+
**When to use**: Output verification is important
|
|
244
|
+
|
|
245
|
+
Provide specific validation steps:
|
|
246
|
+
|
|
247
|
+
```xml
|
|
248
|
+
<validation>
|
|
249
|
+
<output_verification>
|
|
250
|
+
Verify extracted data quality:
|
|
251
|
+
|
|
252
|
+
1. **Completeness**: Check all expected sections present
|
|
253
|
+
2. **Accuracy**: Sample-check values against PDF
|
|
254
|
+
3. **Encoding**: Verify special characters preserved
|
|
255
|
+
4. **Structure**: Confirm JSON/CSV structure valid
|
|
256
|
+
</output_verification>
|
|
257
|
+
|
|
258
|
+
<automated_checks>
|
|
259
|
+
```python
|
|
260
|
+
def validate_output(output_file):
|
|
261
|
+
"""Validate extracted data."""
|
|
262
|
+
with open(output_file) as f:
|
|
263
|
+
data = json.load(f)
|
|
264
|
+
|
|
265
|
+
assert "text" in data, "Missing text field"
|
|
266
|
+
assert len(data["text"]) > 0, "Empty text"
|
|
267
|
+
assert data["page_count"] > 0, "Invalid page count"
|
|
268
|
+
|
|
269
|
+
return True
|
|
270
|
+
```
|
|
271
|
+
</automated_checks>
|
|
272
|
+
</validation>
|
|
273
|
+
```
|
|
274
|
+
</pattern>
|
|
275
|
+
|
|
276
|
+
<pattern name="progressive_examples">
|
|
277
|
+
**When to use**: Skills have multiple complexity levels
|
|
278
|
+
|
|
279
|
+
Start simple, build complexity:
|
|
280
|
+
|
|
281
|
+
```xml
|
|
282
|
+
<examples>
|
|
283
|
+
<example number="1" difficulty="beginner">
|
|
284
|
+
<task>Extract text from single page</task>
|
|
285
|
+
<code>
|
|
286
|
+
```python
|
|
287
|
+
import pdfplumber
|
|
288
|
+
with pdfplumber.open("simple.pdf") as pdf:
|
|
289
|
+
text = pdf.pages[0].extract_text()
|
|
290
|
+
print(text)
|
|
291
|
+
```
|
|
292
|
+
</code>
|
|
293
|
+
</example>
|
|
294
|
+
|
|
295
|
+
<example number="2" difficulty="intermediate">
|
|
296
|
+
<task>Extract all pages and save to file</task>
|
|
297
|
+
<code>
|
|
298
|
+
```python
|
|
299
|
+
with pdfplumber.open("document.pdf") as pdf:
|
|
300
|
+
all_text = []
|
|
301
|
+
for page in pdf.pages:
|
|
302
|
+
all_text.append(page.extract_text())
|
|
303
|
+
|
|
304
|
+
with open("output.txt", "w") as f:
|
|
305
|
+
f.write("\n\n".join(all_text))
|
|
306
|
+
```
|
|
307
|
+
</code>
|
|
308
|
+
</example>
|
|
309
|
+
|
|
310
|
+
<example number="3" difficulty="advanced">
|
|
311
|
+
<task>Extract tables with custom settings and error handling</task>
|
|
312
|
+
<code>
|
|
313
|
+
```python
|
|
314
|
+
with pdfplumber.open("report.pdf") as pdf:
|
|
315
|
+
tables = []
|
|
316
|
+
for i, page in enumerate(pdf.pages):
|
|
317
|
+
try:
|
|
318
|
+
table = page.extract_table({
|
|
319
|
+
"vertical_strategy": "lines",
|
|
320
|
+
"horizontal_strategy": "text"
|
|
321
|
+
})
|
|
322
|
+
if table:
|
|
323
|
+
tables.append({"page": i+1, "data": table})
|
|
324
|
+
except Exception as e:
|
|
325
|
+
print(f"Page {i+1} failed: {e}")
|
|
326
|
+
|
|
327
|
+
with open("tables.json", "w") as f:
|
|
328
|
+
json.dump(tables, f, indent=2)
|
|
329
|
+
```
|
|
330
|
+
</code>
|
|
331
|
+
</example>
|
|
332
|
+
</examples>
|
|
333
|
+
```
|
|
334
|
+
</pattern>
|
|
335
|
+
</skill_specific_patterns>
|
|
336
|
+
|
|
337
|
+
<integration_checklist>
|
|
338
|
+
When creating a skill, ensure you've applied these prompting techniques:
|
|
339
|
+
|
|
340
|
+
- [ ] **Clarity**: Instructions are specific and unambiguous
|
|
341
|
+
- [ ] **Structure**: Pure XML structure used throughout
|
|
342
|
+
- [ ] **Examples**: Included when output format matters
|
|
343
|
+
- [ ] **Success criteria**: Specific, measurable criteria defined
|
|
344
|
+
- [ ] **Workflow**: Multi-step processes broken down explicitly
|
|
345
|
+
- [ ] **Anti-patterns**: Common mistakes shown and avoided
|
|
346
|
+
- [ ] **Validation**: Output verification guidance provided
|
|
347
|
+
- [ ] **Context management**: State tracking for long-running tasks
|
|
348
|
+
- [ ] **Progressive complexity**: Examples range from simple to advanced
|
|
349
|
+
- [ ] **Error handling**: Edge cases and failures addressed
|
|
350
|
+
</integration_checklist>
|
|
351
|
+
|
|
352
|
+
<reference_create_prompt>
|
|
353
|
+
For detailed prompting techniques, consult the create-prompt skill:
|
|
354
|
+
|
|
355
|
+
- Clarity principles
|
|
356
|
+
- XML structure patterns
|
|
357
|
+
- Few-shot examples
|
|
358
|
+
- Chain of thought reasoning
|
|
359
|
+
- Context management strategies
|
|
360
|
+
- Anti-patterns to avoid
|
|
361
|
+
|
|
362
|
+
Use create-prompt when writing SKILL.md content to ensure expert-level prompting quality.
|
|
363
|
+
</reference_create_prompt>
|