screenshot-beautifier
Beautify screenshots using ImageMagick - add rounded corners, drop shadows, gradient backgrounds, padding. Use when preparing screenshots for blog posts, documentation, or presentations. Transforms raw Playwright/browser screenshots into polished images.
What this skill does
# Screenshot Beautifier (ImageMagick)
Transform raw screenshots into polished, professional images with rounded corners, shadows, and backgrounds.
## Prerequisites
ImageMagick 7 must be installed:
```bash
# macOS
brew install imagemagick
# Ubuntu/Debian
apt-get install imagemagick
# Check installation
magick --version
```
## Quick Beautification Commands
### Default: macOS Window Style (RECOMMENDED)
This matches native macOS Cmd+Shift+4+Space window captures - rounded corners, soft shadow, transparent background:
```bash
INPUT="screenshot.png"
OUTPUT="screenshot_polished.png"
RADIUS=10
WIDTH=$(magick identify -format '%w' "$INPUT")
HEIGHT=$(magick identify -format '%h' "$INPUT")
# Step 1: Create rounded corner mask
magick -size ${WIDTH}x${HEIGHT} xc:black \
-fill white -draw "roundrectangle 0,0,$((WIDTH-1)),$((HEIGHT-1)),$RADIUS,$RADIUS" \
/tmp/mask.png
# Step 2: Apply mask to get rounded corners
magick "$INPUT" /tmp/mask.png -alpha off -compose CopyOpacity -composite /tmp/rounded.png
# Step 3: Create shadow from rounded image
magick /tmp/rounded.png -background 'rgba(0,0,0,0.35)' -shadow 100x24+0+12 /tmp/shadow.png
# Step 4: Composite on transparent background (shadow + image)
magick -size $((WIDTH+80))x$((HEIGHT+80)) xc:none \
/tmp/shadow.png -gravity center -composite \
/tmp/rounded.png -gravity center -composite \
"$OUTPUT"
# Cleanup
rm /tmp/mask.png /tmp/rounded.png /tmp/shadow.png
```
For a solid background instead of transparent, change `xc:none` to `xc:'#f0f0f0'` in Step 4.
Or use the helper script:
```bash
./scripts/beautify.sh screenshot.png macos screenshot_polished.png
```
### Alternative: Rounded Corners + Shadow + White Background
```bash
INPUT="screenshot.png"
OUTPUT="screenshot_polished.png"
RADIUS=12
WIDTH=$(magick identify -format '%w' "$INPUT")
HEIGHT=$(magick identify -format '%h' "$INPUT")
# Step 1: Create mask
magick -size ${WIDTH}x${HEIGHT} xc:black \
-fill white -draw "roundrectangle 0,0,$((WIDTH-1)),$((HEIGHT-1)),$RADIUS,$RADIUS" \
/tmp/mask.png
# Step 2: Apply mask
magick "$INPUT" /tmp/mask.png -alpha off -compose CopyOpacity -composite /tmp/rounded.png
# Step 3: Create shadow
magick /tmp/rounded.png -background black -shadow 60x8+0+4 /tmp/shadow.png
# Step 4: Composite on white background
magick -size $((WIDTH+60))x$((HEIGHT+60)) xc:white \
/tmp/shadow.png -gravity center -composite \
/tmp/rounded.png -gravity center -composite \
"$OUTPUT"
rm /tmp/mask.png /tmp/rounded.png /tmp/shadow.png
```
### Modern: Gradient Background (Purple/Blue)
```bash
INPUT="screenshot.png"
OUTPUT="screenshot_gradient.png"
RADIUS=12
WIDTH=$(magick identify -format '%w' "$INPUT")
HEIGHT=$(magick identify -format '%h' "$INPUT")
BG_WIDTH=$((WIDTH + 120))
BG_HEIGHT=$((HEIGHT + 120))
# Step 1: Create mask
magick -size ${WIDTH}x${HEIGHT} xc:black \
-fill white -draw "roundrectangle 0,0,$((WIDTH-1)),$((HEIGHT-1)),$RADIUS,$RADIUS" \
/tmp/mask.png
# Step 2: Apply mask
magick "$INPUT" /tmp/mask.png -alpha off -compose CopyOpacity -composite /tmp/rounded.png
# Step 3: Create shadow
magick /tmp/rounded.png -background black -shadow 80x12+0+8 /tmp/shadow.png
# Step 4: Composite on gradient background
magick -size ${BG_WIDTH}x${BG_HEIGHT} gradient:'#667eea'-'#764ba2' \
/tmp/shadow.png -gravity center -composite \
/tmp/rounded.png -gravity center -composite \
"$OUTPUT"
rm /tmp/mask.png /tmp/rounded.png /tmp/shadow.png
```
### Minimal: Light Gray Background + Subtle Shadow (No Rounded Corners)
```bash
INPUT="screenshot.png"
OUTPUT="screenshot_minimal.png"
WIDTH=$(magick identify -format '%w' "$INPUT")
HEIGHT=$(magick identify -format '%h' "$INPUT")
# Step 1: Create shadow
magick "$INPUT" -background 'rgba(0,0,0,0.15)' -shadow 40x6+0+3 /tmp/shadow.png
# Step 2: Composite on light gray background
magick -size $((WIDTH+80))x$((HEIGHT+80)) xc:'#f5f5f5' \
/tmp/shadow.png -gravity center -composite \
"$INPUT" -gravity center -composite \
"$OUTPUT"
rm /tmp/shadow.png
```
### Dark Mode: Dark Background + Glow
```bash
INPUT="screenshot.png"
OUTPUT="screenshot_dark.png"
RADIUS=10
WIDTH=$(magick identify -format '%w' "$INPUT")
HEIGHT=$(magick identify -format '%h' "$INPUT")
BG_WIDTH=$((WIDTH + 100))
BG_HEIGHT=$((HEIGHT + 100))
# Step 1: Create mask
magick -size ${WIDTH}x${HEIGHT} xc:black \
-fill white -draw "roundrectangle 0,0,$((WIDTH-1)),$((HEIGHT-1)),$RADIUS,$RADIUS" \
/tmp/mask.png
# Step 2: Apply mask
magick "$INPUT" /tmp/mask.png -alpha off -compose CopyOpacity -composite /tmp/rounded.png
# Step 3: Create purple glow shadow
magick /tmp/rounded.png -background '#4a00e0' -shadow 100x20+0+0 /tmp/shadow.png
# Step 4: Composite on dark background
magick -size ${BG_WIDTH}x${BG_HEIGHT} xc:'#1a1a2e' \
/tmp/shadow.png -gravity center -composite \
/tmp/rounded.png -gravity center -composite \
"$OUTPUT"
rm /tmp/mask.png /tmp/rounded.png /tmp/shadow.png
```
## Batch Processing
Process all screenshots in a directory (shadow only, no rounded corners):
```bash
for img in screenshots/*.png; do
OUTPUT="${img%.png}_polished.png"
WIDTH=$(magick identify -format '%w' "$img")
HEIGHT=$(magick identify -format '%h' "$img")
magick "$img" -background black -shadow 60x8+0+4 /tmp/shadow.png
magick -size $((WIDTH+60))x$((HEIGHT+60)) xc:white \
/tmp/shadow.png -gravity center -composite \
"$img" -gravity center -composite \
"$OUTPUT"
echo "Processed: $OUTPUT"
done
rm /tmp/shadow.png
```
## Parameters Explained
- **Rounded corners**: Create a black canvas with `-size WxH xc:black`, draw a white `roundrectangle` mask (format: `x1,y1,x2,y2,rx,ry`), save to temp file, then apply as alpha with `-compose CopyOpacity -composite`
- **Shadow**: `-shadow 60x8+0+4` = opacity 60%, blur 8px, offset x+0 y+4. Must be created as separate step due to ImageMagick 7 alpha channel issues
- **Multi-step approach**: ImageMagick 7 has issues with inline `\( +clone -shadow \) +swap -layers merge` when the source has transparency. Use separate temp files instead
- **Background**: Use `xc:none` for transparent, `xc:white` for solid white, `xc:'#f0f0f0'` for light gray, or `gradient:'#color1'-'#color2'` for gradients
## Common Adjustments
| Want | Change |
|------|--------|
| Larger shadow | Increase blur: `-shadow 80x12+0+8` |
| More padding | Increase extent values (e.g., `+120` instead of `+80`) |
| Sharper corners | Reduce `RADIUS` value (e.g., `8` instead of `12`) |
| Rounder corners | Increase `RADIUS` value (e.g., `20` instead of `12`) |
| Different gradient | Change colors: `gradient:'#ff6b6b'-'#feca57'` |
## Integration with Playwright Screenshots
After taking a screenshot with Playwright:
```bash
# 1. Screenshot is saved by Playwright to screenshots/raw/
# 2. Beautify it
INPUT="screenshots/raw/mlflow-traces.png"
OUTPUT="screenshots/mlflow-traces.png"
RADIUS=10
WIDTH=$(magick identify -format '%w' "$INPUT")
HEIGHT=$(magick identify -format '%h' "$INPUT")
# Create mask, apply rounded corners, create shadow, composite
magick -size ${WIDTH}x${HEIGHT} xc:black \
-fill white -draw "roundrectangle 0,0,$((WIDTH-1)),$((HEIGHT-1)),$RADIUS,$RADIUS" \
/tmp/mask.png
magick "$INPUT" /tmp/mask.png -alpha off -compose CopyOpacity -composite /tmp/rounded.png
magick /tmp/rounded.png -background 'rgba(0,0,0,0.35)' -shadow 100x24+0+12 /tmp/shadow.png
magick -size $((WIDTH+80))x$((HEIGHT+80)) xc:none \
/tmp/shadow.png -gravity center -composite \
/tmp/rounded.png -gravity center -composite \
"$OUTPUT"
rm /tmp/mask.png /tmp/rounded.png /tmp/shadow.png
# 3. Reference the beautified version in blog posts
# 
```
## Troubleshooting
**"magick: command not found"**
→ Install ImageMagick: `brew install imagemagick`
**Transparency not preserved**
→ Use `xc:none` for background, save as PNG
**Image too large/small after processing**
→ Adjust the canvas size in the final composite step, or add explicit resize: `-resize 1200x`
**Shadow appears wRelated in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.