instagram-post-downloader
Download and save Instagram posts as high-resolution files. Use when asked to download, save, or archive an Instagram post, reel thumbnail, or carousel. Produces saved high-res images in a named folder, with carousel slides stitched into a single PDF; supports batch downloading of multiple URLs at once.
Profile →npx skills add mohitagw15856/pm-claude-skills --skill instagram-post-downloader --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Downloads Instagram posts at full resolution from Instagram's CDN — no screenshots, no compression. Handles single images, carousels (multi-slide posts), and Reel cover images. For carousels, produces individual slide files plus a single stitched PDF. Supports batch URLs in one run.
How it works
Follows a multi-step procedure:
- Collect inputs: accepts one or multiple Instagram URLs (comma-separated or line-separated), validates they match Instagram post/reel/tv patterns, determines an output directory (default: ./instagram-downloads/), and asks about PDF stitching preference (default yes).
- For each URL, fetch the post data using a priority sequence of endpoints: a JSON endpoint, an embed page, then oEmbed if needed. Extract data from the resulting JSON blob, particularly the media information and CDN image URLs.
- Extract CDN URLs: for carousels, iterate edge_sidecar_to_children.edges in order and pick the highest-resolution display_url per slide; for single images, pick the highest-resolution display_resources entry.
- Sanitize folder name from the caption: take first 40 chars, strip non-alphanumeric/space/hyphen, replace spaces/hyphens with underscores, lowercase, trim underscores, fallback to shortcode if empty.
- Create output folder structure under ./instagram-downloads and download each image file with a streaming GET, preserving file extensions. Name slides as slide_01.jpg, etc., and image as image.jpg or image.webp as appropriate.
- If carousel, stitch slides into a single PDF named carousel.pdf using Pillow (if Pillow is installed); otherwise skip PDF stitching.
- Write a metadata.txt file in each post folder containing post URL, shortcode, type, slide count (for carousels), caption, username, fetch timestamp, and a CDN URLs list with filename and URL.
- Print a completion summary showing URLs processed, posts saved, total files, and any skipped URLs with reasons.
- Handle errors gracefully with defined fallback behavior and clear skip messages.
When to use it
Use when you need to download, save, or archive an Instagram post, reel thumbnail, or carousel. Batch URLs are supported in one run.
What it can touch
Uses the following inputs and outputs:
- Input: Instagram post URL(s) (validation performed)
- Output: Output directory (default: ./instagram-downloads/)
- Files touched: image.jpg or slide_XX.jpg, carousel.pdf, metadata.txt
Caveats
Domain allowlist must include *.cdninstagram.com for media fetches; if Pillow is not installed, PDF stitching is skipped and a warning is emitted.
# Instagram Post Downloader Skill Downloads Instagram posts at full resolution from Instagram's CDN — no screenshots, no compression. Handles single images, carousels (multi-slide posts), and Reel cover images. For carousels, produces individual slide files plus a single stitched PDF. Supports batch URLs in one run. --- ## PREREQUISITE — Domain Allowlist Before this skill can fetch any media, you must add Instagram's CDN domain to Claude Code's allowlist: **Settings → Capabilities → Domain allowlist → Add:** ``` *.cdninstagram.com ``` Without this, all CDN fetch calls will be blocked. If you see a permission error when Claude attempts a fetch to `cdninstagram.com`, this is the fix. --- ## Required Inputs Claude will ask for these if not provided upfront: | Input | Required | Notes | |---|---|---| | Instagram post URL(s) | Yes | One per line, or comma-separated. `https://www.instagram.com/p/XXXX/` or `https://www.instagram.com/reel/XXXX/` format | | Output directory | No | Defaults to `./instagram-downloads/` in the current working directory | | PDF stitch for carousels | No | Defaults to **yes** — produces `carousel.pdf` alongside individual slides | | File naming prefix | No | Opt
- PREREQUISITE — Domain Allowlist
- Required Inputs
- Output Structure
- Single image post
- Carousel post
- Batch run (3 URLs)
- metadata.txt format
- Completion summary (printed to terminal)
- How Claude Should Execute This Skill
- Step 1 — Collect and validate inputs
- Step 2 — For each URL: fetch the post page
- Step 3 — Extract CDN image URLs
- Step 4 — Sanitise folder name
- Step 5 — Create output folder structure
Install pip install yt-dlp Download a Reel yt-dlp "https://www.instagram.com/reel/XXXX/" -o "%(title)s.%(ext)s" Download to a specific folder yt-dlp "https://www.instagram.com/reel/XXXX/" \ Download best quality yt-dlp -f "bestvideo+bestaudio" "https://www.instagram.com/reel/XXXX/"
What does the instagram-post-downloader skill do?
Download and save Instagram posts as high-resolution files. Use when asked to download, save, or archive an Instagram post, reel thumbnail, or carousel. Produces saved high-res images in a named folder, with carousel slides stitched into a single PDF; supports batch downloading of multiple URLs at once.
How do I install it?
Run `npx skills add mohitagw15856/pm-claude-skills --skill instagram-post-downloader --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From mohitagw15856/pm-claude-skills, a repository with 1,255 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.