Skip to content

Commit 84e7069

Browse files
committed
fix(skills): address PR #16 review - move screenshot cleanup before capture step
1 parent 98fd12f commit 84e7069

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

skills/capture-pr-visuals/SKILL.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,16 @@ which ffmpeg 2>/dev/null
8888

8989
If ffmpeg is missing, warn: "ffmpeg not found — screenshots only (no GIFs). Install with `brew install ffmpeg` for GIF support."
9090

91-
### Step 5: Write and Execute Playwright Capture Script
91+
### Step 5: Clean Old Artifacts and Capture New Ones
9292

93-
Create a temporary capture script at `.chalk/local/capture-script.ts`:
93+
First, clean any previous screenshots to ensure a fresh capture:
94+
95+
```bash
96+
rm -rf .github/pr-screenshots/ 2>/dev/null
97+
mkdir -p .github/pr-screenshots/
98+
```
99+
100+
Then create a temporary capture script at `.chalk/local/capture-script.ts`:
94101

95102
```typescript
96103
import { chromium } from 'playwright';
@@ -179,11 +186,9 @@ rm -rf .github/pr-screenshots/videos
179186

180187
### Step 7: Commit Artifacts
181188

182-
Clean old screenshots first, then commit new ones:
189+
Commit the new visual artifacts:
183190

184191
```bash
185-
rm -rf .github/pr-screenshots/ 2>/dev/null
186-
# (capture runs in Step 5, producing new files)
187192
git add .github/pr-screenshots/
188193
git commit -m "chore: add PR visual artifacts"
189194
```

0 commit comments

Comments
 (0)