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.
Security Assessment
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 filesInstall social-media-image-sizes
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
branding5/social-media-image-sizes