Zerox Ins Photo Downloader logo

Zerox Ins Photo Downloader

Community
ZeroxZhang
zerox-ins-photo-downloader

Download ALL photos from an Instagram profile page to local disk, sorted by publish time. Trigger whenever the user shares an Instagram profile URL (instagram.com/<username>/) and asks to download/save/backup the photos or images from that account, mentions wanting an account's pictures saved locally, or asks to scrape an Instagram profile's media. This skill handles cookie extraction from the logged-in Chrome, browser-based scrolling to collect every post, and time-ordered downloading. Use it even if the user only says "download this account's photos" without naming Instagram — if the link is instagram.com it should trigger.

Add to TypingMind

Overview

PublisherZeroxZhang
Repositoryzerox-skills
Skill namezerox-ins-photo-downloader
Stars
40
Forks
5
Bundled files
3
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by ZeroxZhang on GitHub. Read the source before you install it.

Installation

Install the Zerox Ins Photo Downloader AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ZeroxZhang/zerox-skills/tree/main/zerox-ins-photo-downloader
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ZeroxZhang/zerox-skills.git /tmp/zerox-skills
mkdir -p .claude/skills
cp -r /tmp/zerox-skills/zerox-ins-photo-downloader .claude/skills/zerox-ins-photo-downloader
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Zerox Ins Photo Downloader in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Zerox Ins Photo Downloader on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Zerox Ins Photo Downloader is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Instagram Photo Downloader

Downloads every photo from an Instagram profile into a local folder, with filenames prefixed by publish time so that sorting by name equals sorting by publish time.

When to use

  • User shares an https://www.instagram.com/<username>/ link and wants the photos.
  • User wants to back up / save / download an account's images locally.
  • User wants photos ordered by publish date.

Prerequisites (host machine)

  • macOS with Google Chrome installed and the user logged into Instagram in Chrome (any profile that has visited instagram.com works; the Default profile is tried first).
  • Python 3 with pycryptodome and requests (install once: python3 -m venv .venv && .venv/bin/pip install pycryptodome requests pillow).
  • Node.js ≥ 18 with the playwright package resolvable, and a Playwright Chromium build cached (see the collect script's auto-detection; if missing, npx playwright install chromium).

Workflow

Run these three scripts in order from the skill's scripts/ directory. The scripts are self-contained: each takes explicit paths via CLI flags, so you can keep intermediate files anywhere (e.g. the user's workspace).

Step 1 — Extract the login cookies

bash
python extract_cookies.py --domain instagram.com --out cookies.json

This decrypts Chrome's cookie DB (Keychain key + PBKDF2 + AES-CBC) and writes a flat JSON map. It strips the shared 32-byte prefix that new Chrome versions add to every cookie value — do not remove that logic; without it the sessionid comes out as garbage and Instagram rejects the session.

Expect output like OK: 6 cookies extracted and a sessionid line. If it fails with "no cookies found", the user is not logged in — ask them to log in and retry. Never ask the user to paste a sessionid; extracting from Chrome is the whole point.

Step 2 — Collect all post metadata by scrolling

bash
node collect_posts.js <username> --cookies cookies.json --out posts_meta.json

The script launches headless Chromium with the extracted cookies, opens the profile page, scrolls to the bottom repeatedly, and intercepts the /graphql/query POST responses carrying xdt_api__v1__feed__user_timeline_graphql_connection. Each edge's node has everything needed: code (shortcode), taken_at (unix seconds), and image_versions2.candidates (image URLs) or carousel_media (multi-image posts). The script dedupes by shortcode and stops when has_next_page is false and the page height stops growing.

Why the browser approach is required: Instagram's lightweight API endpoints are locked down — web_profile_info returns only the post count with empty edges, feed/user returns empty items, and the old GraphQL query hashes return HTTP 400. Scrolling a real browser is the reliable path. Do not waste time trying the blocked endpoints.

The script prints a running count (e.g. captured 12 posts, has_next: true) and finishes with FINAL: collected N posts. Verify N is positive before downloading.

Optional flags: --chromium <path> to point at a specific browser binary, --max-scrolls <n> for very large accounts.

Step 3 — Download and sort by publish time

bash
python download_photos.py --meta posts_meta.json --cookies cookies.json --out instagram_photos

For each post it picks the largest image candidate, expands carousels into individual files, skips videos (media_type == 2), and names files:

20140618_214538_pYzdmAqFNU.jpg     <- single photo
20190502_032203_Bw7nVQVFZwC_2.jpg  <- 2nd image of a carousel

Because the filename begins with YYYYMMDD_HHMMSS, sorting the folder by filename sorts by publish time (verified ascending). The script reuses files that already exist, so re-running is safe.

Verification (always do this)

After Step 3 completes, verify before reporting success:

  1. Count check — expected images = posts without carousels + sum of carousel children (videos excluded). Compare to files downloaded. If the profile said 72 posts and you have 82 jpgs with 6 carousels, that's right.
  2. File validity — confirm every file is a real image:
    bash
    file instagram_photos/*.jpg | grep -cv "JPEG image data"   # expect 0
  3. Ordering — confirm timestamps are non-decreasing when sorted by name.
  4. Spot check — open the first, middle, and last image to make sure they aren't placeholders or error pages.

Troubleshooting

  • "no cookies found" — user isn't logged into Instagram in Chrome.
  • FINAL collected 0 posts — session expired or Instagram served a challenge/login wall; re-extract cookies (Step 1) and retry. If the account is private, only followers can see posts.
  • Playwright can't find a browser — the script auto-detects ~/Library/Caches/ms-playwright/chromium-*; if none, run npx playwright install chromium.
  • Some downloads fail (FAIL lines) — CDN links can 404 if stale; re-run the download script; existing files are skipped, only missing ones retry.
  • macOS permission prompts — the Keychain read may pop a dialog the first time; the user should click "Allow".

Security note

The extracted cookies.json contains the user's login session. It is sensitive — tell the user they may delete it after the download finishes. Never share it, and don't write it into chat output.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Zerox Ins Photo Downloader AI skill do?

Download ALL photos from an Instagram profile page to local disk, sorted by publish time. Trigger whenever the user shares an Instagram profile URL (instagram.com/<username>/) and asks to download/save/backup the photos or images from that account, mentions wanting an account's pictures saved locally, or asks to scrape an Instagram profile's media. This skill handles cookie extraction from the logged-in Chrome, browser-based scrolling to collect every post, and time-ordered downloading. Use it even if the user only says "download this account's photos" without naming Instagram — if the link...

Why use Zerox Ins Photo Downloader on TypingMind?

Because you install it once and use it with any model. Zerox Ins Photo Downloader is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Zerox Ins Photo Downloader in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ZeroxZhang/zerox-skills/tree/main/zerox-ins-photo-downloader. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Zerox Ins Photo Downloader?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Zerox Ins Photo Downloader?

As many as you like. As long as a model supports skills, you can use Zerox Ins Photo Downloader with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Zerox Ins Photo Downloader AI skill free?

It is published on GitHub by ZeroxZhang. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇