Back to Skills

social-media-image-sizes

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.

4stars2forksUpdated 7/31/2026

Security Assessment

Safe(95/100)
Security Score95/100

About social-media-image-sizes

social-media-image-sizes is a utility skill that checks and resizes images against the specifications of nine social platforms (Instagram, Facebook, X/Twitter, LinkedIn, TikTok, YouTube, Pinterest, Snapchat, and Threads), covering 60+ named specs. It solves the everyday problem of not knowing whether an image fits a platform slot, or how to export a correctly sized copy, by providing two Node scripts plus detailed per-platform reference documents.

The check script validates an image and outputs a ranked match list (perfect, close, usable, too small) with an inline resize command for every non-perfect match, and supports filtering by platform or match level. The resize script exports a correctly sized copy using the sharp image library, defaulting to a center-crop cover fit with an option to letterbox via contain and a custom background color, and can list all available spec names. The skill bundles reference markdown for each platform plus a compiled AGENTS.md, and documents practical gotchas such as sharp's native binary download, Instagram carousel aspect-ratio consistency, and platform-specific safe zones for Facebook covers and YouTube banners.

It targets social media managers, designers, and marketers preparing assets for posts or ads. Prerequisites are Node.js 18+ and npm (or pnpm) with a one-time install. The scripts operate on local image files using a well-known imaging library and perform only safe, local read/convert operations, with the allowed tool scoped to Bash for running the two scripts.

FAQ

What are the prerequisites?

Node.js 18+ and npm or pnpm, plus a one-time npm install (which downloads a prebuilt sharp native binary).

How do I check and resize an image?

Run node scripts/check.js on the image to get a ranked match list, then run the suggested node scripts/resize.js command with a spec name to export a correctly sized copy.

What platforms and specs are covered?

Nine platforms (Instagram, Facebook, X/Twitter, LinkedIn, TikTok, YouTube, Pinterest, Snapchat, Threads) across 60+ named size specs, with per-platform reference files for detail.

How does resizing handle aspect ratio?

The default fit is cover (center-crop); use --fit contain to letterbox with an optional background color, and --out to choose the output path.

What if sharp fails to install behind a proxy?

The skill notes setting SHARP_IGNORE_GLOBAL_LIBVIPS=1 and retrying the install.

All Files

20 files
LICENSE1.0 KB
View
AGENTS.md12.7 KB
View
references/linkedin.md1.9 KB
View
references/threads.md0.9 KB
View
scripts/platform-data.js10.2 KB
View
SKILL.md4.2 KB
View
.gitignore0.4 KB
View
references/facebook.md2.1 KB
View
references/x-twitter.md1.7 KB
View
scripts/check.js4.3 KB
View
README.md2.7 KB
View
package.json0.6 KB
View
references/snapchat.md1.3 KB
View
social-media-image-sizes/SKILL.md4.2 KB
View
references/instagram.md2.5 KB
View
references/best-practices.md3.0 KB
View
references/pinterest.md1.5 KB
View
references/youtube.md1.8 KB
View
references/tiktok.md1.4 KB
View
scripts/resize.js5.9 KB
View

Install social-media-image-sizes

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill