social-image-prep
Skill7 starsChanged 4 months agoMITView on GitHub
Resize and format an image for a social platform: LinkedIn, Bluesky, Reddit, Hacker News and others. Use for "resize for LinkedIn", "image for social", "prepare this image for posting", or any request to fit an image to a specific platform's dimensions.
- Installs packages
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- beadsSkill
- azadvertizerSkill
- business-planSkill
- c7searchSkill
- clear-and-humanSkill
- convert-to-webpSkill
- cv-and-humanSkill
- cv-cover-letterSkill
- cv-evidence-baseSkill
- dev-fleetSkill
- excalidraw-diagramSkill
- frontier-roundsSkill
- ghost-publishSkill
- hook-and-humanSkill
- interview-panelSkill
- job-feedsSkill
- markdown-converterSkill
- nano-banana-pro-jsonSkill
- readabilitySkill
- report-builderSkill
- source-snapshotSkill
- terraform-registrySkill
- terragrunt-skillSkill
- transcribe-summarizeSkill
- travel-planningSkill
- trilium-captureSkill
- use-linearisSkill
- ux-auditSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
Check which image tool is available (run once per session):
- Distinctive: line 103
Check source dimensions and format
- Distinctive: line 105
Ask which platforms (or do all if user says "all")
- Distinctive: line 107
Verify file size (especially Bluesky 1MB limit -- lower quality to 80 if needed)
- Distinctive: line 113
If the user says "prep for all platforms", generate all applicable presets.
- Distinctive: line 117
Always output JPEG for social posts (smaller files, universal support).
- Very specific: line 122
Verify file size after conversion with ls -lh (or dir on Windows).
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Social image prep
Resize and format images for social media posting. One source image, multiple platform-ready outputs.
Platform specs
| Platform | Post image size | Aspect ratio | Max file size | Formats | Notes |
| 1200 x 627 | 1.91:1 | 5 MB | JPG, PNG | No WebP. Links in post body kill reach. | |
| Bluesky | 1000 x 563 | 16:9 | 1 MB | JPG, PNG | Longest side compressed to 1000px. No animated GIFs. Up to 4 images/post. |
| Bluesky (square) | 1000 x 1000 | 1:1 | 1 MB | JPG, PNG | Alternative for square crops. |
| Bluesky (portrait) | 800 x 1000 | 4:5 | 1 MB | JPG, PNG | For vertical images. |
| 1200 x 628 | 1.91:1 | 20 MB | JPG, PNG, GIF | Preview thumbnail crops to center. | |
| HN | N/A | N/A | N/A | N/A | Text only. Use og:image on linked page. |
| YouTube thumbnail | 1280 x 720 | 16:9 | 2 MB | JPG, PNG | Min width 640px. |
| og:image (generic) | 1200 x 630 | 1.91:1 | -- | JPG, PNG | For link previews across platforms. |
Tool detection
Check which image tool is available (run once per session):
sips-- macOS built-in. No install needed.magick(ImageMagick 7+) -- Linux, Windows, macOS. Install:brew install imagemagick,apt install imagemagick,choco install imagemagick.convert(ImageMagick 6) -- legacy Linux installs.- Python PIL -- fallback.
uv run --with Pillow python3 script.py
Pick the first one available. Prefer sips on macOS, magick elsewhere.
Resize commands by tool
sips (macOS)
# Check dimensions
sips -g pixelWidth -g pixelHeight -g format INPUT
# Resize (stretches to exact dimensions)
sips -z HEIGHT WIDTH INPUT --out OUTPUT.jpg -s format jpeg -s formatOptions 90
# Aspect-ratio-safe: resize width, then crop height
sips --resampleWidth 1200 INPUT --out /tmp/resized.jpg -s format jpeg
sips --cropToHeightWidth 627 1200 /tmp/resized.jpg --out OUTPUT.jpgNote: sips -z takes height then width (not width then height).
ImageMagick (magick / convert)
# Check dimensions
magick identify INPUT
# Resize and crop to exact dimensions (gravity center)
magick INPUT -resize 1200x627^ -gravity center -extent 1200x627 -quality 90 OUTPUT.jpg
# Simple resize (may distort)
magick INPUT -resize 1200x627! -quality 90 OUTPUT.jpgThe ^ suffix fills the target area (may overshoot one dimension), then -extent crops to exact size. This is aspect-ratio-safe in one command.
For ImageMagick 6, replace magick with convert.
Python PIL (fallback)
# uv run --with Pillow python3 script.py
from PIL import Image
img = Image.open("INPUT")
# Aspect-ratio-safe resize + crop
target = (1200, 627)
ratio = max(target[0] / img.width, target[1] / img.height)
resized = img.resize((int(img.width * ratio), int(img.height * ratio)), Image.LANCZOS)
left = (resized.width - target[0]) // 2
top = (resized.height - target[1]) // 2
cropped = resized.crop((left, top, left + target[0], top + target[1]))
cropped.save("OUTPUT.jpg", "JPEG", quality=90)Platform presets
| Preset name | Width | Height | Quality | Notes |
| 1200 | 627 | 90 | ||
| bluesky | 1000 | 563 | 85 | Keep under 1MB |
| bluesky-square | 1000 | 1000 | 85 | |
| bluesky-portrait | 800 | 1000 | 85 | |
| 1200 | 628 | 90 | ||
| youtube | 1280 | 720 | 90 | |
| og | 1200 | 630 | 90 |
Workflow
- Check source dimensions and format
- Detect available image tool
- Ask which platforms (or do all if user says "all")
- Resize for each target using aspect-ratio-safe crop
- Verify file size (especially Bluesky 1MB limit -- lower quality to 80 if needed)
- Report output paths and file sizes
- Name outputs with platform suffix:
image-linkedin.jpg,image-bluesky.jpg
Batch mode
If the user says "prep for all platforms", generate all applicable presets. Output to the same directory as the source, or to a user-specified directory.
Notes
- Always output JPEG for social posts (smaller files, universal support). PNG only if transparency is needed.
- WebP is not accepted by LinkedIn or most social platforms. Always convert to JPG or PNG.
- Bluesky has a 1MB hard limit. If output exceeds 1MB, reduce quality to 80, then 75.
- HN is text-only. If you need an image for HN, set it as og:image in the linked page's meta tags.
- LinkedIn penalizes posts edited within the first hour. Get the image right before posting.
- Verify file size after conversion with
ls -lh(ordiron Windows).
Provenance
This skill drives whichever image tool is already installed and bundles none of them:
sips— Apple's Scriptable Image Processing System, built into macOS.- ImageMagick (
magick/convert) — © ImageMagick Studio LLC, ImageMagick License (Apache-2.0-compatible). Installed separately viabrew/apt/choco. - Pillow (PIL) — © Jeffrey A. Clark and contributors, MIT-CMU license. Run on demand via
uv run --with Pillow.
The platform specs and presets are compiled from each platform's public guidance and may change over time. The skill is not affiliated with or endorsed by any of the platforms or tools above. The MIT license covers this skill's content, not the wrapped tools.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

