@clawpify/skills 1.0.6 → 1.0.9
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/clawpify/SKILL.md +1 -0
- package/clawpify/references/docx.md +471 -0
- package/clawpify/references/pdf-forms.md +294 -0
- package/clawpify/references/pdf-reference.md +612 -0
- package/clawpify/references/pdf.md +308 -0
- package/clawpify/references/pptx-creating.md +420 -0
- package/clawpify/references/pptx-editing.md +205 -0
- package/clawpify/references/pptx.md +219 -0
- package/clawpify/references/xlsx.md +286 -0
- package/dist/agent.d.ts +13 -1
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +45 -3
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +51 -3
- package/dist/memory.d.ts +8 -0
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +3 -0
- package/dist/prompt-utils.d.ts +7 -0
- package/dist/prompt-utils.d.ts.map +1 -0
- package/package.json +1 -4
- package/src/agent.test.ts +132 -1
- package/src/agent.ts +56 -5
- package/src/index.ts +5 -1
- package/src/memory.ts +13 -0
- package/src/prompt-utils.ts +12 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
# PPTX Skill
|
|
2
|
+
|
|
3
|
+
## Quick Reference
|
|
4
|
+
|
|
5
|
+
| Task | Guide |
|
|
6
|
+
|------|-------|
|
|
7
|
+
| Read/analyze content | `python -m markitdown presentation.pptx` |
|
|
8
|
+
| Edit or create from template | Read [editing.md](editing.md) |
|
|
9
|
+
| Create from scratch | Read [pptxgenjs.md](pptxgenjs.md) |
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Reading Content
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
# Text extraction
|
|
16
|
+
python -m markitdown presentation.pptx
|
|
17
|
+
|
|
18
|
+
# Visual overview
|
|
19
|
+
python scripts/thumbnail.py presentation.pptx
|
|
20
|
+
|
|
21
|
+
# Raw XML
|
|
22
|
+
python scripts/office/unpack.py presentation.pptx unpacked/
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## Editing Workflow
|
|
27
|
+
|
|
28
|
+
**Read [editing.md](editing.md) for full details.**
|
|
29
|
+
|
|
30
|
+
1. Analyze template with `thumbnail.py`
|
|
31
|
+
2. Unpack → manipulate slides → edit content → clean → pack
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## Creating from Scratch
|
|
35
|
+
|
|
36
|
+
**Read [pptxgenjs.md](pptxgenjs.md) for full details.**
|
|
37
|
+
|
|
38
|
+
Use when no template or reference presentation is available.
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## Design Ideas
|
|
42
|
+
|
|
43
|
+
**Don't create boring slides.** Plain bullets on a white background won't impress anyone. Consider ideas from this list for each slide.
|
|
44
|
+
|
|
45
|
+
### Before Starting
|
|
46
|
+
|
|
47
|
+
- **Pick a bold, content-informed color palette**: The palette should feel designed for THIS topic. If swapping your colors into a completely different presentation would still "work," you haven't made specific enough choices.
|
|
48
|
+
- **Dominance over equality**: One color should dominate (60-70% visual weight), with 1-2 supporting tones and one sharp accent. Never give all colors equal weight.
|
|
49
|
+
- **Dark/light contrast**: Dark backgrounds for title + conclusion slides, light for content ("sandwich" structure). Or commit to dark throughout for a premium feel.
|
|
50
|
+
- **Commit to a visual motif**: Pick ONE distinctive element and repeat it — rounded image frames, icons in colored circles, thick single-side borders. Carry it across every slide.
|
|
51
|
+
|
|
52
|
+
### Color Palettes
|
|
53
|
+
|
|
54
|
+
Choose colors that match your topic — don't default to generic blue. Use these palettes as inspiration:
|
|
55
|
+
|
|
56
|
+
| Theme | Primary | Secondary | Accent |
|
|
57
|
+
|-------|---------|-----------|--------|
|
|
58
|
+
| **Midnight Executive** | `1E2761` (navy) | `CADCFC` (ice blue) | `FFFFFF` (white) |
|
|
59
|
+
| **Forest & Moss** | `2C5F2D` (forest) | `97BC62` (moss) | `F5F5F5` (cream) |
|
|
60
|
+
| **Coral Energy** | `F96167` (coral) | `F9E795` (gold) | `2F3C7E` (navy) |
|
|
61
|
+
| **Warm Terracotta** | `B85042` (terracotta) | `E7E8D1` (sand) | `A7BEAE` (sage) |
|
|
62
|
+
| **Ocean Gradient** | `065A82` (deep blue) | `1C7293` (teal) | `21295C` (midnight) |
|
|
63
|
+
| **Charcoal Minimal** | `36454F` (charcoal) | `F2F2F2` (off-white) | `212121` (black) |
|
|
64
|
+
| **Teal Trust** | `028090` (teal) | `00A896` (seafoam) | `02C39A` (mint) |
|
|
65
|
+
| **Berry & Cream** | `6D2E46` (berry) | `A26769` (dusty rose) | `ECE2D0` (cream) |
|
|
66
|
+
| **Sage Calm** | `84B59F` (sage) | `69A297` (eucalyptus) | `50808E` (slate) |
|
|
67
|
+
| **Cherry Bold** | `990011` (cherry) | `FCF6F5` (off-white) | `2F3C7E` (navy) |
|
|
68
|
+
|
|
69
|
+
### For Each Slide
|
|
70
|
+
|
|
71
|
+
**Every slide needs a visual element** — image, chart, icon, or shape. Text-only slides are forgettable.
|
|
72
|
+
|
|
73
|
+
**Layout options:**
|
|
74
|
+
- Two-column (text left, illustration on right)
|
|
75
|
+
- Icon + text rows (icon in colored circle, bold header, description below)
|
|
76
|
+
- 2x2 or 2x3 grid (image on one side, grid of content blocks on other)
|
|
77
|
+
- Half-bleed image (full left or right side) with content overlay
|
|
78
|
+
|
|
79
|
+
**Data display:**
|
|
80
|
+
- Large stat callouts (big numbers 60-72pt with small labels below)
|
|
81
|
+
- Comparison columns (before/after, pros/cons, side-by-side options)
|
|
82
|
+
- Timeline or process flow (numbered steps, arrows)
|
|
83
|
+
|
|
84
|
+
**Visual polish:**
|
|
85
|
+
- Icons in small colored circles next to section headers
|
|
86
|
+
- Italic accent text for key stats or taglines
|
|
87
|
+
|
|
88
|
+
### Typography
|
|
89
|
+
|
|
90
|
+
**Choose an interesting font pairing** — don't default to Arial. Pick a header font with personality and pair it with a clean body font.
|
|
91
|
+
|
|
92
|
+
| Header Font | Body Font |
|
|
93
|
+
|-------------|-----------|
|
|
94
|
+
| Georgia | Calibri |
|
|
95
|
+
| Arial Black | Arial |
|
|
96
|
+
| Calibri | Calibri Light |
|
|
97
|
+
| Cambria | Calibri |
|
|
98
|
+
| Trebuchet MS | Calibri |
|
|
99
|
+
| Impact | Arial |
|
|
100
|
+
| Palatino | Garamond |
|
|
101
|
+
| Consolas | Calibri |
|
|
102
|
+
|
|
103
|
+
| Element | Size |
|
|
104
|
+
|---------|------|
|
|
105
|
+
| Slide title | 36-44pt bold |
|
|
106
|
+
| Section header | 20-24pt bold |
|
|
107
|
+
| Body text | 14-16pt |
|
|
108
|
+
| Captions | 10-12pt muted |
|
|
109
|
+
|
|
110
|
+
### Spacing
|
|
111
|
+
|
|
112
|
+
- 0.5" minimum margins
|
|
113
|
+
- 0.3-0.5" between content blocks
|
|
114
|
+
- Leave breathing room—don't fill every inch
|
|
115
|
+
|
|
116
|
+
### Avoid (Common Mistakes)
|
|
117
|
+
|
|
118
|
+
- **Don't repeat the same layout** — vary columns, cards, and callouts across slides
|
|
119
|
+
- **Don't center body text** — left-align paragraphs and lists; center only titles
|
|
120
|
+
- **Don't skimp on size contrast** — titles need 36pt+ to stand out from 14-16pt body
|
|
121
|
+
- **Don't default to blue** — pick colors that reflect the specific topic
|
|
122
|
+
- **Don't mix spacing randomly** — choose 0.3" or 0.5" gaps and use consistently
|
|
123
|
+
- **Don't style one slide and leave the rest plain** — commit fully or keep it simple throughout
|
|
124
|
+
- **Don't create text-only slides** — add images, icons, charts, or visual elements; avoid plain title + bullets
|
|
125
|
+
- **Don't forget text box padding** — when aligning lines or shapes with text edges, set `margin: 0` on the text box or offset the shape to account for padding
|
|
126
|
+
- **Don't use low-contrast elements** — icons AND text need strong contrast against the background; avoid light text on light backgrounds or dark text on dark backgrounds
|
|
127
|
+
- **NEVER use accent lines under titles** — these are a hallmark of AI-generated slides; use whitespace or background color instead
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
## QA (Required)
|
|
131
|
+
|
|
132
|
+
**Assume there are problems. Your job is to find them.**
|
|
133
|
+
|
|
134
|
+
Your first render is almost never correct. Approach QA as a bug hunt, not a confirmation step. If you found zero issues on first inspection, you weren't looking hard enough.
|
|
135
|
+
|
|
136
|
+
### Content QA
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
python -m markitdown output.pptx
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Check for missing content, typos, wrong order.
|
|
143
|
+
|
|
144
|
+
**When using templates, check for leftover placeholder text:**
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
python -m markitdown output.pptx | grep -iE "xxxx|lorem|ipsum|this.*(page|slide).*layout"
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
If grep returns results, fix them before declaring success.
|
|
151
|
+
|
|
152
|
+
### Visual QA
|
|
153
|
+
|
|
154
|
+
**⚠️ USE SUBAGENTS** — even for 2-3 slides. You've been staring at the code and will see what you expect, not what's there. Subagents have fresh eyes.
|
|
155
|
+
|
|
156
|
+
Convert slides to images (see [Converting to Images](#converting-to-images)), then use this prompt:
|
|
157
|
+
|
|
158
|
+
```
|
|
159
|
+
Visually inspect these slides. Assume there are issues — find them.
|
|
160
|
+
|
|
161
|
+
Look for:
|
|
162
|
+
- Overlapping elements (text through shapes, lines through words, stacked elements)
|
|
163
|
+
- Text overflow or cut off at edges/box boundaries
|
|
164
|
+
- Decorative lines positioned for single-line text but title wrapped to two lines
|
|
165
|
+
- Source citations or footers colliding with content above
|
|
166
|
+
- Elements too close (< 0.3" gaps) or cards/sections nearly touching
|
|
167
|
+
- Uneven gaps (large empty area in one place, cramped in another)
|
|
168
|
+
- Insufficient margin from slide edges (< 0.5")
|
|
169
|
+
- Columns or similar elements not aligned consistently
|
|
170
|
+
- Low-contrast text (e.g., light gray text on cream-colored background)
|
|
171
|
+
- Low-contrast icons (e.g., dark icons on dark backgrounds without a contrasting circle)
|
|
172
|
+
- Text boxes too narrow causing excessive wrapping
|
|
173
|
+
- Leftover placeholder content
|
|
174
|
+
|
|
175
|
+
For each slide, list issues or areas of concern, even if minor.
|
|
176
|
+
|
|
177
|
+
Read and analyze these images:
|
|
178
|
+
1. /path/to/slide-01.jpg (Expected: [brief description])
|
|
179
|
+
2. /path/to/slide-02.jpg (Expected: [brief description])
|
|
180
|
+
|
|
181
|
+
Report ALL issues found, including minor ones.
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Verification Loop
|
|
185
|
+
|
|
186
|
+
1. Generate slides → Convert to images → Inspect
|
|
187
|
+
2. **List issues found** (if none found, look again more critically)
|
|
188
|
+
3. Fix issues
|
|
189
|
+
4. **Re-verify affected slides** — one fix often creates another problem
|
|
190
|
+
5. Repeat until a full pass reveals no new issues
|
|
191
|
+
|
|
192
|
+
**Do not declare success until you've completed at least one fix-and-verify cycle.**
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
## Converting to Images
|
|
196
|
+
|
|
197
|
+
Convert presentations to individual slide images for visual inspection:
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
python scripts/office/soffice.py --headless --convert-to pdf output.pptx
|
|
201
|
+
pdftoppm -jpeg -r 150 output.pdf slide
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
This creates `slide-01.jpg`, `slide-02.jpg`, etc.
|
|
205
|
+
|
|
206
|
+
To re-render specific slides after fixes:
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
pdftoppm -jpeg -r 150 -f N -l N output.pdf slide-fixed
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
## Dependencies
|
|
214
|
+
|
|
215
|
+
- `pip install "markitdown[pptx]"` - text extraction
|
|
216
|
+
- `pip install Pillow` - thumbnail grids
|
|
217
|
+
- `npm install -g pptxgenjs` - creating from scratch
|
|
218
|
+
- LibreOffice (`soffice`) - PDF conversion (auto-configured for sandboxed environments via `scripts/office/soffice.py`)
|
|
219
|
+
- Poppler (`pdftoppm`) - PDF to images
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
# Requirements for Outputs
|
|
2
|
+
|
|
3
|
+
## All Excel files
|
|
4
|
+
|
|
5
|
+
### Professional Font
|
|
6
|
+
- Use a consistent, professional font (e.g., Arial, Times New Roman) for all deliverables unless otherwise instructed by the user
|
|
7
|
+
|
|
8
|
+
### Zero Formula Errors
|
|
9
|
+
- Every Excel model MUST be delivered with ZERO formula errors (#REF!, #DIV/0!, #VALUE!, #N/A, #NAME?)
|
|
10
|
+
|
|
11
|
+
### Preserve Existing Templates (when updating templates)
|
|
12
|
+
- Study and EXACTLY match existing format, style, and conventions when modifying files
|
|
13
|
+
- Never impose standardized formatting on files with established patterns
|
|
14
|
+
- Existing template conventions ALWAYS override these guidelines
|
|
15
|
+
|
|
16
|
+
## Financial models
|
|
17
|
+
|
|
18
|
+
### Color Coding Standards
|
|
19
|
+
Unless otherwise stated by the user or existing template
|
|
20
|
+
|
|
21
|
+
#### Industry-Standard Color Conventions
|
|
22
|
+
- **Blue text (RGB: 0,0,255)**: Hardcoded inputs, and numbers users will change for scenarios
|
|
23
|
+
- **Black text (RGB: 0,0,0)**: ALL formulas and calculations
|
|
24
|
+
- **Green text (RGB: 0,128,0)**: Links pulling from other worksheets within same workbook
|
|
25
|
+
- **Red text (RGB: 255,0,0)**: External links to other files
|
|
26
|
+
- **Yellow background (RGB: 255,255,0)**: Key assumptions needing attention or cells that need to be updated
|
|
27
|
+
|
|
28
|
+
### Number Formatting Standards
|
|
29
|
+
|
|
30
|
+
#### Required Format Rules
|
|
31
|
+
- **Years**: Format as text strings (e.g., "2024" not "2,024")
|
|
32
|
+
- **Currency**: Use $#,##0 format; ALWAYS specify units in headers ("Revenue ($mm)")
|
|
33
|
+
- **Zeros**: Use number formatting to make all zeros "-", including percentages (e.g., "$#,##0;($#,##0);-")
|
|
34
|
+
- **Percentages**: Default to 0.0% format (one decimal)
|
|
35
|
+
- **Multiples**: Format as 0.0x for valuation multiples (EV/EBITDA, P/E)
|
|
36
|
+
- **Negative numbers**: Use parentheses (123) not minus -123
|
|
37
|
+
|
|
38
|
+
### Formula Construction Rules
|
|
39
|
+
|
|
40
|
+
#### Assumptions Placement
|
|
41
|
+
- Place ALL assumptions (growth rates, margins, multiples, etc.) in separate assumption cells
|
|
42
|
+
- Use cell references instead of hardcoded values in formulas
|
|
43
|
+
- Example: Use =B5*(1+$B$6) instead of =B5*1.05
|
|
44
|
+
|
|
45
|
+
#### Formula Error Prevention
|
|
46
|
+
- Verify all cell references are correct
|
|
47
|
+
- Check for off-by-one errors in ranges
|
|
48
|
+
- Ensure consistent formulas across all projection periods
|
|
49
|
+
- Test with edge cases (zero values, negative numbers)
|
|
50
|
+
- Verify no unintended circular references
|
|
51
|
+
|
|
52
|
+
#### Documentation Requirements for Hardcodes
|
|
53
|
+
- Comment or in cells beside (if end of table). Format: "Source: [System/Document], [Date], [Specific Reference], [URL if applicable]"
|
|
54
|
+
- Examples:
|
|
55
|
+
- "Source: Company 10-K, FY2024, Page 45, Revenue Note, [SEC EDGAR URL]"
|
|
56
|
+
- "Source: Company 10-Q, Q2 2025, Exhibit 99.1, [SEC EDGAR URL]"
|
|
57
|
+
- "Source: Bloomberg Terminal, 8/15/2025, AAPL US Equity"
|
|
58
|
+
- "Source: FactSet, 8/20/2025, Consensus Estimates Screen"
|
|
59
|
+
|
|
60
|
+
# XLSX creation, editing, and analysis
|
|
61
|
+
|
|
62
|
+
## Overview
|
|
63
|
+
|
|
64
|
+
A user may ask you to create, edit, or analyze the contents of an .xlsx file. You have different tools and workflows available for different tasks.
|
|
65
|
+
|
|
66
|
+
## Important Requirements
|
|
67
|
+
|
|
68
|
+
**LibreOffice Required for Formula Recalculation**: You can assume LibreOffice is installed for recalculating formula values using the `scripts/recalc.py` script. The script automatically configures LibreOffice on first run, including in sandboxed environments where Unix sockets are restricted (handled by `scripts/office/soffice.py`)
|
|
69
|
+
|
|
70
|
+
## Reading and analyzing data
|
|
71
|
+
|
|
72
|
+
### Data analysis with pandas
|
|
73
|
+
For data analysis, visualization, and basic operations, use **pandas** which provides powerful data manipulation capabilities:
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
import pandas as pd
|
|
77
|
+
|
|
78
|
+
# Read Excel
|
|
79
|
+
df = pd.read_excel('file.xlsx') # Default: first sheet
|
|
80
|
+
all_sheets = pd.read_excel('file.xlsx', sheet_name=None) # All sheets as dict
|
|
81
|
+
|
|
82
|
+
# Analyze
|
|
83
|
+
df.head() # Preview data
|
|
84
|
+
df.info() # Column info
|
|
85
|
+
df.describe() # Statistics
|
|
86
|
+
|
|
87
|
+
# Write Excel
|
|
88
|
+
df.to_excel('output.xlsx', index=False)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Excel File Workflows
|
|
92
|
+
|
|
93
|
+
## CRITICAL: Use Formulas, Not Hardcoded Values
|
|
94
|
+
|
|
95
|
+
**Always use Excel formulas instead of calculating values in Python and hardcoding them.** This ensures the spreadsheet remains dynamic and updateable.
|
|
96
|
+
|
|
97
|
+
### ❌ WRONG - Hardcoding Calculated Values
|
|
98
|
+
```python
|
|
99
|
+
# Bad: Calculating in Python and hardcoding result
|
|
100
|
+
total = df['Sales'].sum()
|
|
101
|
+
sheet['B10'] = total # Hardcodes 5000
|
|
102
|
+
|
|
103
|
+
# Bad: Computing growth rate in Python
|
|
104
|
+
growth = (df.iloc[-1]['Revenue'] - df.iloc[0]['Revenue']) / df.iloc[0]['Revenue']
|
|
105
|
+
sheet['C5'] = growth # Hardcodes 0.15
|
|
106
|
+
|
|
107
|
+
# Bad: Python calculation for average
|
|
108
|
+
avg = sum(values) / len(values)
|
|
109
|
+
sheet['D20'] = avg # Hardcodes 42.5
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### ✅ CORRECT - Using Excel Formulas
|
|
113
|
+
```python
|
|
114
|
+
# Good: Let Excel calculate the sum
|
|
115
|
+
sheet['B10'] = '=SUM(B2:B9)'
|
|
116
|
+
|
|
117
|
+
# Good: Growth rate as Excel formula
|
|
118
|
+
sheet['C5'] = '=(C4-C2)/C2'
|
|
119
|
+
|
|
120
|
+
# Good: Average using Excel function
|
|
121
|
+
sheet['D20'] = '=AVERAGE(D2:D19)'
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
This applies to ALL calculations - totals, percentages, ratios, differences, etc. The spreadsheet should be able to recalculate when source data changes.
|
|
125
|
+
|
|
126
|
+
## Common Workflow
|
|
127
|
+
1. **Choose tool**: pandas for data, openpyxl for formulas/formatting
|
|
128
|
+
2. **Create/Load**: Create new workbook or load existing file
|
|
129
|
+
3. **Modify**: Add/edit data, formulas, and formatting
|
|
130
|
+
4. **Save**: Write to file
|
|
131
|
+
5. **Recalculate formulas (MANDATORY IF USING FORMULAS)**: Use the scripts/recalc.py script
|
|
132
|
+
```bash
|
|
133
|
+
python scripts/recalc.py output.xlsx
|
|
134
|
+
```
|
|
135
|
+
6. **Verify and fix any errors**:
|
|
136
|
+
- The script returns JSON with error details
|
|
137
|
+
- If `status` is `errors_found`, check `error_summary` for specific error types and locations
|
|
138
|
+
- Fix the identified errors and recalculate again
|
|
139
|
+
- Common errors to fix:
|
|
140
|
+
- `#REF!`: Invalid cell references
|
|
141
|
+
- `#DIV/0!`: Division by zero
|
|
142
|
+
- `#VALUE!`: Wrong data type in formula
|
|
143
|
+
- `#NAME?`: Unrecognized formula name
|
|
144
|
+
|
|
145
|
+
### Creating new Excel files
|
|
146
|
+
|
|
147
|
+
```python
|
|
148
|
+
# Using openpyxl for formulas and formatting
|
|
149
|
+
from openpyxl import Workbook
|
|
150
|
+
from openpyxl.styles import Font, PatternFill, Alignment
|
|
151
|
+
|
|
152
|
+
wb = Workbook()
|
|
153
|
+
sheet = wb.active
|
|
154
|
+
|
|
155
|
+
# Add data
|
|
156
|
+
sheet['A1'] = 'Hello'
|
|
157
|
+
sheet['B1'] = 'World'
|
|
158
|
+
sheet.append(['Row', 'of', 'data'])
|
|
159
|
+
|
|
160
|
+
# Add formula
|
|
161
|
+
sheet['B2'] = '=SUM(A1:A10)'
|
|
162
|
+
|
|
163
|
+
# Formatting
|
|
164
|
+
sheet['A1'].font = Font(bold=True, color='FF0000')
|
|
165
|
+
sheet['A1'].fill = PatternFill('solid', start_color='FFFF00')
|
|
166
|
+
sheet['A1'].alignment = Alignment(horizontal='center')
|
|
167
|
+
|
|
168
|
+
# Column width
|
|
169
|
+
sheet.column_dimensions['A'].width = 20
|
|
170
|
+
|
|
171
|
+
wb.save('output.xlsx')
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Editing existing Excel files
|
|
175
|
+
|
|
176
|
+
```python
|
|
177
|
+
# Using openpyxl to preserve formulas and formatting
|
|
178
|
+
from openpyxl import load_workbook
|
|
179
|
+
|
|
180
|
+
# Load existing file
|
|
181
|
+
wb = load_workbook('existing.xlsx')
|
|
182
|
+
sheet = wb.active # or wb['SheetName'] for specific sheet
|
|
183
|
+
|
|
184
|
+
# Working with multiple sheets
|
|
185
|
+
for sheet_name in wb.sheetnames:
|
|
186
|
+
sheet = wb[sheet_name]
|
|
187
|
+
print(f"Sheet: {sheet_name}")
|
|
188
|
+
|
|
189
|
+
# Modify cells
|
|
190
|
+
sheet['A1'] = 'New Value'
|
|
191
|
+
sheet.insert_rows(2) # Insert row at position 2
|
|
192
|
+
sheet.delete_cols(3) # Delete column 3
|
|
193
|
+
|
|
194
|
+
# Add new sheet
|
|
195
|
+
new_sheet = wb.create_sheet('NewSheet')
|
|
196
|
+
new_sheet['A1'] = 'Data'
|
|
197
|
+
|
|
198
|
+
wb.save('modified.xlsx')
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
## Recalculating formulas
|
|
202
|
+
|
|
203
|
+
Excel files created or modified by openpyxl contain formulas as strings but not calculated values. Use the provided `scripts/recalc.py` script to recalculate formulas:
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
python scripts/recalc.py <excel_file> [timeout_seconds]
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Example:
|
|
210
|
+
```bash
|
|
211
|
+
python scripts/recalc.py output.xlsx 30
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
The script:
|
|
215
|
+
- Automatically sets up LibreOffice macro on first run
|
|
216
|
+
- Recalculates all formulas in all sheets
|
|
217
|
+
- Scans ALL cells for Excel errors (#REF!, #DIV/0!, etc.)
|
|
218
|
+
- Returns JSON with detailed error locations and counts
|
|
219
|
+
- Works on both Linux and macOS
|
|
220
|
+
|
|
221
|
+
## Formula Verification Checklist
|
|
222
|
+
|
|
223
|
+
Quick checks to ensure formulas work correctly:
|
|
224
|
+
|
|
225
|
+
### Essential Verification
|
|
226
|
+
- [ ] **Test 2-3 sample references**: Verify they pull correct values before building full model
|
|
227
|
+
- [ ] **Column mapping**: Confirm Excel columns match (e.g., column 64 = BL, not BK)
|
|
228
|
+
- [ ] **Row offset**: Remember Excel rows are 1-indexed (DataFrame row 5 = Excel row 6)
|
|
229
|
+
|
|
230
|
+
### Common Pitfalls
|
|
231
|
+
- [ ] **NaN handling**: Check for null values with `pd.notna()`
|
|
232
|
+
- [ ] **Far-right columns**: FY data often in columns 50+
|
|
233
|
+
- [ ] **Multiple matches**: Search all occurrences, not just first
|
|
234
|
+
- [ ] **Division by zero**: Check denominators before using `/` in formulas (#DIV/0!)
|
|
235
|
+
- [ ] **Wrong references**: Verify all cell references point to intended cells (#REF!)
|
|
236
|
+
- [ ] **Cross-sheet references**: Use correct format (Sheet1!A1) for linking sheets
|
|
237
|
+
|
|
238
|
+
### Formula Testing Strategy
|
|
239
|
+
- [ ] **Start small**: Test formulas on 2-3 cells before applying broadly
|
|
240
|
+
- [ ] **Verify dependencies**: Check all cells referenced in formulas exist
|
|
241
|
+
- [ ] **Test edge cases**: Include zero, negative, and very large values
|
|
242
|
+
|
|
243
|
+
### Interpreting scripts/recalc.py Output
|
|
244
|
+
The script returns JSON with error details:
|
|
245
|
+
```json
|
|
246
|
+
{
|
|
247
|
+
"status": "success", // or "errors_found"
|
|
248
|
+
"total_errors": 0, // Total error count
|
|
249
|
+
"total_formulas": 42, // Number of formulas in file
|
|
250
|
+
"error_summary": { // Only present if errors found
|
|
251
|
+
"#REF!": {
|
|
252
|
+
"count": 2,
|
|
253
|
+
"locations": ["Sheet1!B5", "Sheet1!C10"]
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
## Best Practices
|
|
260
|
+
|
|
261
|
+
### Library Selection
|
|
262
|
+
- **pandas**: Best for data analysis, bulk operations, and simple data export
|
|
263
|
+
- **openpyxl**: Best for complex formatting, formulas, and Excel-specific features
|
|
264
|
+
|
|
265
|
+
### Working with openpyxl
|
|
266
|
+
- Cell indices are 1-based (row=1, column=1 refers to cell A1)
|
|
267
|
+
- Use `data_only=True` to read calculated values: `load_workbook('file.xlsx', data_only=True)`
|
|
268
|
+
- **Warning**: If opened with `data_only=True` and saved, formulas are replaced with values and permanently lost
|
|
269
|
+
- For large files: Use `read_only=True` for reading or `write_only=True` for writing
|
|
270
|
+
- Formulas are preserved but not evaluated - use scripts/recalc.py to update values
|
|
271
|
+
|
|
272
|
+
### Working with pandas
|
|
273
|
+
- Specify data types to avoid inference issues: `pd.read_excel('file.xlsx', dtype={'id': str})`
|
|
274
|
+
- For large files, read specific columns: `pd.read_excel('file.xlsx', usecols=['A', 'C', 'E'])`
|
|
275
|
+
- Handle dates properly: `pd.read_excel('file.xlsx', parse_dates=['date_column'])`
|
|
276
|
+
|
|
277
|
+
## Code Style Guidelines
|
|
278
|
+
**IMPORTANT**: When generating Python code for Excel operations:
|
|
279
|
+
- Write minimal, concise Python code without unnecessary comments
|
|
280
|
+
- Avoid verbose variable names and redundant operations
|
|
281
|
+
- Avoid unnecessary print statements
|
|
282
|
+
|
|
283
|
+
**For Excel files themselves**:
|
|
284
|
+
- Add comments to cells with complex formulas or important assumptions
|
|
285
|
+
- Document data sources for hardcoded values
|
|
286
|
+
- Include notes for key calculations and model sections
|
package/dist/agent.d.ts
CHANGED
|
@@ -46,13 +46,25 @@ export interface ThinkingConfig {
|
|
|
46
46
|
/** Token budget for thinking. Must be >= 1024. */
|
|
47
47
|
budgetTokens: number;
|
|
48
48
|
}
|
|
49
|
+
/** Structured context for prompt assembly. Used when systemInstruction is not provided. */
|
|
50
|
+
export interface AgentContextConfig {
|
|
51
|
+
/** Heartbeat content (only for new sessions). Injected at prompt start. */
|
|
52
|
+
heartbeatContent?: string;
|
|
53
|
+
/** Long-term memory content. Always included. */
|
|
54
|
+
memoryContent?: string;
|
|
55
|
+
/** Base system instruction override. Falls back to DEFAULT_SYSTEM_INSTRUCTION. */
|
|
56
|
+
baseInstruction?: string;
|
|
57
|
+
}
|
|
49
58
|
/** Full configuration accepted by the ShopifyAgent constructor. */
|
|
50
59
|
export interface AgentConfig {
|
|
51
60
|
shopify: ShopifyClient;
|
|
52
61
|
skillContent: string;
|
|
53
62
|
model?: string;
|
|
54
|
-
/** Override the default system instruction sent to the model. */
|
|
63
|
+
/** Override the default system instruction sent to the model (raw string). */
|
|
55
64
|
systemInstruction?: string;
|
|
65
|
+
/** Structured context assembled into a system instruction internally.
|
|
66
|
+
* Ignored when systemInstruction is provided. */
|
|
67
|
+
context?: AgentContextConfig;
|
|
56
68
|
/** Override default Claude Sonnet pricing. */
|
|
57
69
|
pricing?: ModelPricing;
|
|
58
70
|
/** Register plugins at construction time. */
|
package/dist/agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,WA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C9B,OAAO,CAAC,OAAO,CAAuC;IACtD,OAAO,CAAC,KAAK,CAAa;IAC1B,OAAO,CAAC,cAAc,CAA6B;IACnD,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,MAAM,CAA0B;gBAE5B,MAAM,EAAE,WAAW;IA4B/B,wFAAwF;IACxF,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IAiBzC,yDAAyD;IACzD,OAAO,CAAC,iBAAiB;IAWzB,gEAAgE;IAChE,OAAO,CAAC,UAAU;IAelB,yDAAyD;IACzD,OAAO,CAAC,YAAY;IAMpB,sDAAsD;IACtD,OAAO,CAAC,gBAAgB;IAYxB,0EAA0E;YAC5D,WAAW;IAkDzB,2EAA2E;YAC7D,gBAAgB;IAyB9B;;;OAGG;IACG,IAAI,CACR,WAAW,EAAE,MAAM,EACnB,mBAAmB,GAAE,SAAS,CAAC,YAAY,EAAO,GACjD,OAAO,CAAC,UAAU,CAAC;IA6GtB;;;OAGG;IACI,UAAU,CACf,WAAW,EAAE,MAAM,EACnB,mBAAmB,GAAE,SAAS,CAAC,YAAY,EAAO,GACjD,cAAc,CAAC,WAAW,CAAC;IAqI9B;;;;OAIG;IACG,cAAc,CAClB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,UAAU,CAAC;CAavB"}
|
package/dist/agent.js
CHANGED
|
@@ -48,6 +48,19 @@ async function collectMarkdown(dir, parts) {
|
|
|
48
48
|
|
|
49
49
|
// src/agent.ts
|
|
50
50
|
import Anthropic from "@anthropic-ai/sdk";
|
|
51
|
+
|
|
52
|
+
// src/prompt-utils.ts
|
|
53
|
+
var MAX_HEARTBEAT_CHARS = 2000;
|
|
54
|
+
var MAX_MEMORY_CHARS = 4000;
|
|
55
|
+
function clampContent(content, maxChars) {
|
|
56
|
+
const trimmed = content.trim();
|
|
57
|
+
if (trimmed.length <= maxChars)
|
|
58
|
+
return trimmed;
|
|
59
|
+
return trimmed.slice(0, maxChars).trimEnd() + `
|
|
60
|
+
...[truncated]`;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// src/agent.ts
|
|
51
64
|
var DEFAULT_SYSTEM_INSTRUCTION = "You're Clawpify. You help run a Shopify store. The merchant texts you to get stuff done";
|
|
52
65
|
var SHOPIFY_GRAPHQL_TOOL = {
|
|
53
66
|
name: "shopify_graphql",
|
|
@@ -69,13 +82,13 @@ var SHOPIFY_GRAPHQL_TOOL = {
|
|
|
69
82
|
};
|
|
70
83
|
var LOAD_SKILL_REFERENCE_TOOL = {
|
|
71
84
|
name: "load_skill_reference",
|
|
72
|
-
description: "Load a
|
|
85
|
+
description: "Load a reference document for a specific domain. Available Shopify references: products, orders, customers, inventory, discounts, collections, fulfillments, refunds, draft-orders, gift-cards, webhooks, locations, marketing, markets, menus, metafields, pages, blogs, files, shipping, shop, subscriptions, translations, segments, bulk-operations. Available document references: docx, pdf, pdf-forms, pdf-reference, pptx, pptx-editing, pptx-creating, xlsx. Use this BEFORE writing queries or processing documents to get the correct syntax and workflow.",
|
|
73
86
|
input_schema: {
|
|
74
87
|
type: "object",
|
|
75
88
|
properties: {
|
|
76
89
|
reference: {
|
|
77
90
|
type: "string",
|
|
78
|
-
description: "Name of the reference to load (e.g. 'orders', 'products', '
|
|
91
|
+
description: "Name of the reference to load (e.g. 'orders', 'products', 'docx', 'pdf', 'xlsx')"
|
|
79
92
|
}
|
|
80
93
|
},
|
|
81
94
|
required: ["reference"]
|
|
@@ -128,6 +141,29 @@ function extractContent(response) {
|
|
|
128
141
|
}
|
|
129
142
|
return { text, thinking };
|
|
130
143
|
}
|
|
144
|
+
function buildSystemInstruction(ctx) {
|
|
145
|
+
const base = ctx.baseInstruction ?? DEFAULT_SYSTEM_INSTRUCTION;
|
|
146
|
+
let heartbeatBlock = "";
|
|
147
|
+
if (ctx.heartbeatContent?.trim()) {
|
|
148
|
+
heartbeatBlock = `
|
|
149
|
+
|
|
150
|
+
This is a NEW conversation (no recent chat history). ` + "Follow these instructions first, then respond to the merchant's message. " + `Keep the summary brief (1-2 sentences), then address what they asked.
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
` + clampContent(ctx.heartbeatContent, MAX_HEARTBEAT_CHARS) + `
|
|
154
|
+
---`;
|
|
155
|
+
}
|
|
156
|
+
let memoryBlock = "";
|
|
157
|
+
if (ctx.memoryContent?.trim()) {
|
|
158
|
+
memoryBlock = `
|
|
159
|
+
|
|
160
|
+
Things to remember about this merchant/store ` + `(use this context in your responses):
|
|
161
|
+
---
|
|
162
|
+
` + clampContent(ctx.memoryContent, MAX_MEMORY_CHARS) + `
|
|
163
|
+
---`;
|
|
164
|
+
}
|
|
165
|
+
return base + heartbeatBlock + memoryBlock;
|
|
166
|
+
}
|
|
131
167
|
|
|
132
168
|
class ShopifyAgent {
|
|
133
169
|
anthropic;
|
|
@@ -145,7 +181,13 @@ class ShopifyAgent {
|
|
|
145
181
|
this.anthropic = new Anthropic;
|
|
146
182
|
this.shopify = config.shopify;
|
|
147
183
|
this.skillContent = config.skillContent;
|
|
148
|
-
|
|
184
|
+
if (config.systemInstruction != null) {
|
|
185
|
+
this.systemInstruction = config.systemInstruction;
|
|
186
|
+
} else if (config.context) {
|
|
187
|
+
this.systemInstruction = buildSystemInstruction(config.context);
|
|
188
|
+
} else {
|
|
189
|
+
this.systemInstruction = DEFAULT_SYSTEM_INSTRUCTION;
|
|
190
|
+
}
|
|
149
191
|
this.model = config.model ?? "claude-sonnet-4-5";
|
|
150
192
|
this.pricing = config.pricing ?? DEFAULT_PRICING;
|
|
151
193
|
this.hooks = config.hooks ?? {};
|
package/dist/index.d.ts
CHANGED
|
@@ -36,9 +36,10 @@
|
|
|
36
36
|
export { ShopifyClient, createShopifyClient } from "./shopify";
|
|
37
37
|
export { createAuthenticatedConfig, getAccessToken, type AccessTokenResponse, type ClientCredentialsConfig, } from "./auth";
|
|
38
38
|
export { ShopifyAgent, DEFAULT_SYSTEM_INSTRUCTION } from "./agent";
|
|
39
|
-
export type { AgentConfig, AgentHooks, AgentPlugin, ChatResult, ModelPricing, StreamEvent, ThinkingConfig, TokenUsage, } from "./agent";
|
|
39
|
+
export type { AgentConfig, AgentContextConfig, AgentHooks, AgentPlugin, ChatResult, ModelPricing, StreamEvent, ThinkingConfig, TokenUsage, } from "./agent";
|
|
40
40
|
export { InMemoryStore } from "./memory";
|
|
41
|
-
export type { MemoryStore } from "./memory";
|
|
41
|
+
export type { MemoryStore, LoadResult } from "./memory";
|
|
42
|
+
export { clampContent, MAX_HEARTBEAT_CHARS, MAX_MEMORY_CHARS } from "./prompt-utils";
|
|
42
43
|
export { loadSkills, loadSkillMetadata, loadSkillReference, listSkillReferences, } from "./skills";
|
|
43
44
|
export type { ShopifyClientConfig, GraphQLResponse } from "./shopify";
|
|
44
45
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAGH,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAG/D,OAAO,EACL,yBAAyB,EACzB,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,GAC7B,MAAM,QAAQ,CAAC;AAGhB,OAAO,EAAE,YAAY,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AACnE,YAAY,EACV,WAAW,EACX,UAAU,EACV,WAAW,EACX,UAAU,EACV,YAAY,EACZ,WAAW,EACX,cAAc,EACd,UAAU,GACX,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;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