social-media-image-sizes
Validates and resizes images against specifications for nine social media platforms including Instagram, Facebook, X, LinkedIn, TikTok, YouTube, Pinterest…
Community author
- Agents
- Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode
- License
- MIT (permissive)
- Pin
- 76e1891pinned Oct 9, 2026
- Context cost
- about 880 tokenswhen the skill loads
- GitHub stars
- 7on branding5/social-media-image-sizes
- Scripts
- 3 scripts
What it does
“Check and resize images for social media platforms. Run scripts/check.js to validate any image against specs for Instagram, Facebook, X (Twitter), LinkedIn, TikTok, YouTube, Pinterest, Snapchat, and Threads — get a ranked match list with exact resize commands. Run scripts/resize.js to export a correctly-sized copy. Use when a user asks to validate image dimensions, resize an image for a platform, check if an image fits a spec, or prep assets for social media posting or ads.”
Generated summary from the skill's own text
Validates and resizes images against specifications for nine social media platforms including Instagram, Facebook, X, LinkedIn, TikTok, YouTube, Pinterest, Snapchat, and Threads. The skill runs Node.js scripts to check if an image matches platform specs, rank the matches from perfect to unusable, and output correctly-sized copies using center-crop or letterbox fitting.
When to use it
- User needs to validate image dimensions against platform specs
- Preparing assets for social media posting or ads
- Resizing a photo to fit a specific platform and content type
- Checking multiple images for carousel or multi-slide compatibility
When not to
- Manual image editing or artistic cropping is needed
- User lacks Node.js 18+ or cannot run npm scripts
- Subject needs frame adjustment beyond center-crop or letterbox
Install
These commands install from the publisher's repository and need no account.
skills CLI
npx skills add branding5/social-media-image-sizes --skill social-media-image-sizesInstalls from the repository's default branch, which may have changed since the commit we checked.
GitHub CLI 2.90 or later
gh skill install branding5/social-media-image-sizes social-media-image-sizes@76e18916020742bb7025f794b38156c964cac0faInstalls the commit we checked (76e1891).
Copy by hand
Download the folder at 76e1891 and put it in .claude/skills/social-media-image-sizes for Claude Code and in .agents/skills/social-media-image-sizes for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.
Copy for your agent
A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.
Prompt
Install the agent skill "social-media-image-sizes" by Branding5. Source, pinned to commit 76e18916020742bb7025f794b38156c964cac0fa: https://github.com/branding5/social-media-image-sizes/tree/76e18916020742bb7025f794b38156c964cac0fa 1. Download that folder at exactly this commit. Do not use the default branch. 2. Copy every file unchanged, keeping the folder structure, into .claude/skills/social-media-image-sizes/ for Claude Code and .agents/skills/social-media-image-sizes/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist. 3. Do not edit the files, and do not run any script in the folder unless I ask you to. 4. When you are done, list the files you copied and where you put them. Listing and checks: https://www.agentnative.dev/skills/branding5/social-media-image-sizes
SKILL.md at the pin
--- name: social-media-image-sizes description: Check and resize images for social media platforms. Run scripts/check.js to validate any image against specs for Instagram, Facebook, X (Twitter), LinkedIn, TikTok, YouTube, Pinterest, Snapchat, and Threads — get a ranked match list with exact resize commands. Run scripts/resize.js to export a correctly-sized copy. Use when a user asks to validate image dimensions, resize an image for a platform, check if an image fits a spec, or prep assets for social media posting or ads. license: MIT compatibility: Requires Node.js 18+ and npm (or pnpm). Run npm install once before first use. metadata: author: Branding5 version: "1.0.0" source: https://www.branding5.com/tools/social-media-cheat-sheet allowed-tools: Bash --- # Social Media Image Sizes Check and resize images for 9 platforms / 60+ specs. Scripts mirror the logic at [branding5.com/tools/social-media-cheat-sheet](https://www.branding5.com/tools/social-media-cheat-sheet). ## Setup Run once after install: ```bash cd <skill-dir> npm install ``` ## Check an image ```bash node scripts/check.js photo.jpg ``` Outputs a ranked match list — perfect → close → usable → too small — with an inline `node scripts/resize.js` command for every non-perfect match. Filter by platform or match level: ```bash node scripts/check.js photo.jpg --platform instagram node scripts/check.js photo.jpg --filter perfect node scripts/check.js photo.jpg --filter usable ``` Platform slugs: `instagram` `facebook` `twitter` `linkedin` `tiktok` `youtube` `pinterest` `snapchat` `threads` ## Resize an image ```bash node scripts/resize.js photo.jpg "Instagram Portrait Post" # → photo-instagram-portrait-post.jpg (1080×1350 px) node scripts/resize.js photo.jpg "YouTube Custom Thumbnail" # → photo-youtube-custom-thumbnail.jpg (1280×720 px) ``` Default fit is **cover** (center-crop). Use `--fit contain` to letterbox instead: ```bash node scripts/resize.js photo.jpg "LinkedIn Background Photo" --fit contain --bg f0f0f0 node scripts/resize.js photo.jpg "Instagram Portrait Post" --out ./exports/ig.jpg ``` List every available spec name: ```bash node scripts/resize.js photo.jpg --list ``` ## Workflow 1. Run `check.js` to see what a given image already matches 2. Copy the suggested `resize.js` command from the output 3. Run it — the output file is saved alongside the original by default ## Gotchas - **Sharp requires a native binary.** On first `npm install`, it downloads a prebuilt binary for your platform. If install fails behind a proxy, set `SHARP_IGNORE_GLOBAL_LIBVIPS=1` and retry. - **All slides in an Instagram carousel must share the same aspect ratio.** The first image sets the ratio for the whole carousel — check all slides, not just the first. - **Facebook cover photo has two safe zones.** Desktop shows 820×312; mobile crops to 640×360. Keep key content in the center 640×312. - **YouTube banner safe area is much smaller than the file.** The spec is 2560×1440 but only the center 1546×423 is guaranteed visible on all devices. check.js flags the full size; keep critical content in the safe area. - **`--fit cover` center-crops.** If the subject isn't centered, use `--out` to save, then manually crop, or use an image editor before running resize. ## References Full per-platform specs (load when you need detail for a specific platform): - `references/instagram.md` — profile, feed, stories, reels, carousel, ads - `references/facebook.md` — profile, cover, feed, stories, events, ads - `references/x-twitter.md` — profile, header, posts, ads - `references/linkedin.md` — profile, cover, feed, articles, ads - `references/tiktok.md` — profile, videos, ads - `references/youtube.md` — channel art, videos, thumbnails, shorts, ads - `references/pinterest.md` — profile, pins, idea pins, ads - `references/snapchat.md` — snaps, spotlight, stories, ads, filters - `references/threads.md` — profile, posts - `references/best-practices.md` — format, compression, safe zones, accessibility Full compiled reference (all platforms in one file): `AGENTS.md` --- *Need to generate on-brand images at these sizes? [Branding5](https://www.branding5.com) pairs your brand kit with AI to produce social content pre-sized for every platform.*
From branding5/social-media-image-sizes at 76e1891, shown as plain text under its license: MIT (permissive). The license text is in LICENSE.
View SKILL.md on GitHub at 76e1891Files
- SKILL.md4.3 KB · b33c1f8ad35e
- .gitignore384 B · 7cb4d952cf3a
- AGENTS.md13 KB · f84f167bbe24
- LICENSE1.1 KB · a3d55e411de2
- README.md2.8 KB · bcf4a3c0b0e3
- assets/
- check-output.png181 KB · ee8b293c8506
- resize-output.png70 KB · 259d1892da7e
- package.json609 B · 0be31ecf4a28
- references/
- best-practices.md3.1 KB · 1b84bbc72185
- facebook.md2.1 KB · 2ccb0646b3c9
- instagram.md2.6 KB · 85fdd5a7d3ee
- linkedin.md2.0 KB · 2359741ab2de
- pinterest.md1.5 KB · b43277236ca3
- snapchat.md1.4 KB · 68471fbe9746
- threads.md962 B · 682188895444
- tiktok.md1.5 KB · 1eed2cb659cc
- x-twitter.md1.8 KB · ad3a8a1cd4fd
- youtube.md1.9 KB · 701b084b9a7c
- scripts/
- check.js4.9 KB · a53587f1776e
- platform-data.js11 KB · 7bcc1e2a9b46
- resize.js6.4 KB · aca6f97605fb
21 files, 314 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.
Skill folder on GitHub at 76e1891Related in Media and creative
all-images-ai-automation
This skill automates All Images AI operations by discovering and executing tools through Composio's All Images AI toolkit via Rube MCP.
by ComposioOfficial publisher
Agents not labelled yet · about 710 tokens · pinned 6 days ago
remotion-best-practices
This skill routes the agent through Remotion's specialized knowledge bases for video creation, editing, and deployment.
by RemotionOfficial publisher
Contains scripts
Claude Code, Codex, Cursor +3 · about 920 tokens · pinned 6 days ago
remotion-best-practices
This skill routes the agent to specialized Remotion sub-skills based on the user's task, covering video creation, project setup, React markup, maps…
by RemotionOfficial publisher
Claude Code, Codex, Cursor +3 · about 1K tokens · pinned 6 days ago
remotion-captions
This skill enables video caption workflows including transcribing audio to generate captions, displaying captions in videos, and importing captions from SRT…
by RemotionOfficial publisher
Claude Code, Codex, Cursor +3 · about 220 tokens · pinned 6 days ago
remotion-captions
This skill enables the agent to work with captions in Remotion videos by transcribing audio to generate captions, displaying them in videos, and importing…
by RemotionOfficial publisher
Claude Code, Codex, Cursor +3 · about 270 tokens · pinned 6 days ago
remotion-create
This skill scaffolds a new Remotion video project, opens the browser-based Studio for live preview, and guides composition development using React markup.
by RemotionOfficial publisher
Claude Code, Codex, Cursor +3 · about 680 tokens · pinned 6 days ago