image-batch

$npx mdskill add guia-matthieu/clawfu-skills/image-batch

Batch processes images for marketing by resizing, compressing, removing backgrounds, adding watermarks, converting to WebP, and optimizing for Core Web Vitals.

  • Automates repetitive image tasks like social media prep, website optimization, and product photo styling.
  • Integrates with Pillow and rembg libraries for image manipulation and background removal.
  • Executes commands based on user input for specific operations like resizing or format conversion.
  • Delivers results through processed image files saved to specified directories.

SKILL.md

.github/skills/image-batchView on GitHub ↗
---
name: image-batch
description: "Batch process images for marketing. Use when: resizing images for social media; compressing images for web; removing backgrounds; adding watermarks; converting formats to WebP; optimizing for Core Web Vitals"
license: MIT
metadata:
  author: ClawFu
  version: 1.0.0
  mcp-server: "@clawfu/mcp-skills"
---

# Image Batch Processing

> Automate repetitive image tasks using Pillow and rembg - resize, compress, remove backgrounds, and watermark hundreds of images in seconds.

## When to Use This Skill

- **Social media prep** - Resize images for multiple platforms at once
- **Website optimization** - Compress and convert to WebP for faster loading
- **Product photos** - Remove backgrounds, add consistent styling
- **Brand protection** - Add watermarks to marketing assets
- **Batch conversion** - Convert legacy formats to modern ones


## What Claude Does vs What You Decide

| Claude Does | You Decide |
|-------------|------------|
| Structures video workflow | Final creative vision |
| Suggests shot compositions | Equipment selection |
| Creates storyboard templates | Brand aesthetics |
| Generates script frameworks | Final approval |
| Identifies technical requirements | Budget allocation |

## Dependencies

```bash
pip install Pillow rembg click
# For GPU-accelerated background removal:
# pip install rembg[gpu]
```

## Commands

### Resize Images
```bash
python scripts/main.py resize ./images/ --width 1200
python scripts/main.py resize ./images/ --format instagram  # 1080x1080
python scripts/main.py resize ./images/ --format linkedin   # 1200x627
```

### Compress Images
```bash
python scripts/main.py compress ./images/ --quality 80
python scripts/main.py compress ./images/ --max-size 500  # Max 500KB
```

### Remove Background
```bash
python scripts/main.py remove-bg photo.jpg
python scripts/main.py remove-bg ./products/ --output ./transparent/
```

### Add Watermark
```bash
python scripts/main.py watermark ./images/ --logo logo.png --position bottom-right
python scripts/main.py watermark ./images/ --text "© 2024 Company" --opacity 0.3
```

### Convert Format
```bash
python scripts/main.py convert ./images/ --format webp
python scripts/main.py convert ./images/ --format avif --quality 80
```

## Examples

### Example 1: Prepare Product Images for E-commerce
```bash
# Remove backgrounds
python scripts/main.py remove-bg ./raw-products/ --output ./transparent/

# Resize to standard size
python scripts/main.py resize ./transparent/ --width 1000 --height 1000 --fit contain

# Compress for web
python scripts/main.py compress ./transparent/ --quality 85 --format webp

# Output: ./transparent/*.webp (optimized, transparent background)
```

### Example 2: Social Media Image Kit
```bash
# Create multiple sizes from one source
python scripts/main.py resize hero-image.jpg --format instagram --output hero_ig.jpg
python scripts/main.py resize hero-image.jpg --format linkedin --output hero_li.jpg
python scripts/main.py resize hero-image.jpg --format twitter --output hero_tw.jpg
python scripts/main.py resize hero-image.jpg --format facebook --output hero_fb.jpg

# Or batch process entire folder for one platform
python scripts/main.py resize ./campaign-images/ --format instagram --output ./instagram/
```

### Example 3: Website Image Optimization
```bash
# Convert all images to WebP
python scripts/main.py convert ./website-images/ --format webp --quality 80

# Ensure no image exceeds 200KB
python scripts/main.py compress ./website-images/ --max-size 200

# Results in 60-80% smaller file sizes
```

## Social Media Format Presets

| Format | Dimensions | Aspect Ratio | Use Case |
|--------|------------|--------------|----------|
| `instagram` | 1080x1080 | 1:1 | Feed posts |
| `instagram-story` | 1080x1920 | 9:16 | Stories/Reels |
| `linkedin` | 1200x627 | 1.91:1 | Link previews |
| `linkedin-post` | 1200x1200 | 1:1 | Feed posts |
| `twitter` | 1200x675 | 16:9 | Cards |
| `facebook` | 1200x630 | 1.91:1 | Link previews |
| `pinterest` | 1000x1500 | 2:3 | Pins |
| `youtube` | 1280x720 | 16:9 | Thumbnails |

## Fit Modes

| Mode | Behavior |
|------|----------|
| `cover` | Fill area, crop excess (default) |
| `contain` | Fit inside, add padding |
| `stretch` | Distort to fit exactly |
| `crop` | Smart crop focusing on subject |

## Output Formats

| Format | Best For | Compression |
|--------|----------|-------------|
| `webp` | Web images | 25-35% smaller than JPEG |
| `avif` | Modern browsers | 50% smaller than JPEG |
| `jpg` | Photos, gradients | Lossy, universal |
| `png` | Transparency, graphics | Lossless |

## Skill Boundaries

### What This Skill Does Well
- Structuring video production workflows
- Creating storyboard frameworks
- Suggesting technical approaches
- Providing creative direction templates

### What This Skill Cannot Do
- Replace professional videography
- Edit video files directly
- Make final creative judgments
- Guarantee audience engagement

## Related Skills

- [video-processing](../video-processing/) - Process video thumbnails
- [lighthouse-audit](../../seo-tools/lighthouse-audit/) - Check image impact on LCP

## Skill Metadata


- **Mode**: cyborg
```yaml
category: automation
subcategory: image-processing
dependencies: [Pillow, rembg]
difficulty: beginner
time_saved: 5+ hours/week
```

More from guia-matthieu/clawfu-skills

SkillDescription
aarrr-metricsMeasure and optimize growth using the AARRR (Pirate Metrics) framework with stage-specific KPIs and funnel analysis
ab-test-stats"Calculate A/B test statistical significance. Use when: determining if test results are significant; calculating required sample size; estimating test duration; analyzing conversion experiments; making data-driven decisions"
account-healthAssess customer account health using product usage, support sentiment, payment status, and relationship signals
ad-spend-optimizer"Analyze paid advertising performance across channels and recommend budget reallocation to maximize ROAS and minimize CAC. Use when: planning quarterly ad budget allocation, diagnosing underperforming ad channels, deciding whether to scale spend on a channel, calculating marginal ROI across Google Ads, Meta, LinkedIn, or TikTok, rebalancing media mix after performance shifts, or setting up a test-and-scale framework for new channels."
ai-bot-log-auditUse when analyzing server logs to understand how AI crawlers (GPTBot, ClaudeBot, PerplexityBot) interact with your site. Use when optimizing content placement for LLM retrieval, diagnosing why AI search isn't citing your content, or auditing crawl patterns to find optimization gaps.
ai-storyboard-2x2"Créez des storyboards visuellement cohérents en utilisant la technique des 2x2 Grid Shots de PJ Ace, garantissant éclairage, personnages et décors uniformes entre les plans. Use when: **Après avoir finalisé un script vidéo** - Transformer le concept en visuels; **Besoin de cohérence visuelle** - Personnages et éclairage constants entre les plans; **Préparer des assets pour animation** - Frames prêtes pour Veo, Runway, Kling; **Présenter un storyboard client** - Visualisation avant production;..."
ai-video-concept"Développez une idée créative et structurez un script vidéo optimisé pour la génération IA, en suivant la méthode des scènes de 8 secondes de PJ Ace. Use when: **Démarrer une publicité vidéo IA** - Transformer une idée brute en script structuré; **Créer du contenu vidéo pour les réseaux sociaux** - TikTok, Reels, YouTube Shorts; **Développer un concept de campagne** - Avant de passer au storyboard; **Pitcher une idée vidéo** - Présenter un concept à un client ou une équipe; **Adapter un messag..."
ai-video-prompting"Générez des prompts optimisés pour chaque modèle de génération vidéo IA (Veo 3, Runway Gen-3, Kling 2.6, Pika), en exploitant leurs forces spécifiques. Use when: **Animer des frames de storyboard** - Transformer des images fixes en vidéo; **Choisir le bon modèle** - Sélectionner Veo, Runway, Kling ou Pika selon le besoin; **Optimiser la qualité de génération** - Prompts structurés pour meilleurs résultats; **Créer des transitions fluides** - Scene extension, first/last frame; **Utiliser le mo..."
ai-video-qa"Validez la qualité de vos vidéos IA avant publication avec une checklist complète couvrant technique, créatif, et positionnement marque. Use when: **Avant publication** - Dernière validation avant mise en ligne; **Revue client** - Préparer les points de feedback anticipés; **Itération qualité** - Identifier les problèmes à corriger; **Go/No-Go decision** - Décider si la vidéo est prête; **Post-mortem** - Analyser pourquoi une vidéo a (ou n'a pas) performé"
ai-voice-design"Concevez et générez des voix IA pour vos vidéos en utilisant ElevenLabs ou Qwen3-TTS, avec clonage vocal, design par description, et synchronisation lip-sync. Use when: **Créer une voix de marque** - Définir le ton vocal pour une campagne; **Cloner une voix existante** - Reproduire une voix avec autorisation; **Designer une voix originale** - Créer une voix à partir d'une description; **Multi-personnages** - Gérer plusieurs voix dans une même vidéo; **Lip-sync vidéo IA** - Synchroniser voix e..."