← Back to Skills Marketplace
115
Downloads
0
Stars
1
Active Installs
2
Versions
Install in OpenClaw
/install instagram-downloader
Description
交互式下载 Instagram 用户内容(帖子/Reels/头像)。首次使用时会依次询问用户名、下载目录、Cookie路径、代理地址。
README (SKILL.md)
Instagram Downloader Skill
使用流程
第一次使用:必须先询问用户以下 4 个参数
按顺序询问,不要跳步:
1️⃣ Instagram 用户名是什么?(不含 @)
2️⃣ 下载到哪个目录?(完整路径,如 D:\Downloads\Instagram)
3️⃣ Cookie 文件路径?(Netscape 格式,如 C:\Users\xxx\cookies_instagram.txt)
4️⃣ 代理地址?(可选,格式 http://host:port,留空则不使用代理)
收集完所有参数后,执行下载命令。
执行命令模板
gallery-dl --proxy "\x3C代理地址>" --cookies "\x3Ccookie文件路径>" -D "\x3C目标目录>" "https://www.instagram.com/\x3C用户名>/"
注意:代理地址如果用户留空,则去掉
--proxy参数
参数获取方式
1. Instagram 用户名
- 用户输入即可,例如:
fafa.0816 - 主页链接可能是
https://www.instagram.com/fafa.0816/
2. 下载目录
- 必须是完整绝对路径
- Windows 示例:
D:\Instagram\fafa.0816 - Linux/Mac 示例:
/home/user/downloads/instagram - gallery-dl 会在此目录下创建
instagram/\x3C用户名>/子目录
3. Cookie 文件路径(Netscape 格式)
方法 A:用 yt-dlp 从 Chrome 导出
yt-dlp --cookies-from-browser chrome --cookies "cookies_instagram.txt" "https://www.instagram.com/"
然后把 cookies_instagram.txt 路径告诉 agent。
方法 B:手动获取 sessionid
- 浏览器登录 Instagram
- F12 → Application → Cookies → 找
sessionid - 写成
cookies_instagram.txt:
# Netscape HTTP Cookie File
.instagram.com TRUE / FALSE 1800000000 sessionid 你的sessionid值
.instagram.com TRUE / TRUE 1800000000 csrftoken 你的csrftoken值
4. 代理地址(可选)
- 格式:
http://127.0.0.1:7890 - 如果用户不需要代理,直接留空
下载类型说明
| URL 类型 | 下载内容 | 命令后缀 |
|---|---|---|
https://www.instagram.com/\x3C用户>/ |
全部(帖子+reels+头像) | 不加后缀 |
https://www.instagram.com/\x3C用户>/posts/ |
仅图片帖子 | /posts/ |
https://www.instagram.com/\x3C用户>/reels/ |
仅视频 | /reels/ |
https://www.instagram.com/\x3C用户>/avatar/ |
头像 | /avatar/ |
https://www.instagram.com/p/\x3C帖子ID>/ |
单个帖子 | 直接链接 |
完整执行示例
假设用户回答:
- 用户名:
fafa.0816 - 下载目录:
D:\Downloads - Cookie:
C:\Users\栗子\cookies_instagram.txt - 代理:
http://127.0.0.1:7890
执行:
gallery-dl --proxy "http://127.0.0.1:7890" --cookies "C:\Users\栗子\cookies_instagram.txt" -D "D:\Downloads" "https://www.instagram.com/fafa.0816/"
输出会写入 D:\Downloads\instagram\fafa.0816\
工具对比
| 工具 | 适用场景 | 注意 |
|---|---|---|
| gallery-dl | 首选,稳定支持 Instagram 全部类型 | 首选 |
| yt-dlp | 备选 | Instagram 支持已标为 broken |
常见错误处理
| 错误 | 原因 | 解决 |
|---|---|---|
401 Unauthorized |
Cookie 过期 | 重新获取 sessionid |
404 Not Found |
用户不存在或私密 | 确认用户名正确 |
HttpError 无权限 |
Cookie 缺少必要字段 | 确保有 sessionid 和 csrftoken 两行 |
| SSL 警告 | 代理证书问题 | 加 --no-check-certificate(不推荐) |
隐私占位符清单
发布前检查:
- 代理地址 → 用
\x3C代理地址>占位 - Cookie 路径 → 用
\x3Ccookie文件路径>占位 - 下载目录 → 用
\x3C目标目录>占位 - 用户名 → 用
\x3C用户名>占位
Usage Guidance
This instruction-only skill is coherent for downloading Instagram content, but take these precautions before installing or running it: 1) Ensure gallery-dl (and yt-dlp if you plan to use the cookie-export method) are installed on the host — the skill expects those binaries but does not declare them. 2) The cookie file (sessionid and csrftoken) grants access to your Instagram session; never paste raw session tokens into chat or share them with untrusted parties. Prefer pointing the agent to a local cookie file path rather than typing token values. 3) Review the exact gallery-dl command the agent will run before execution (especially any --no-check-certificate advice). 4) If possible, use a throwaway/limited Instagram account for bulk downloads. 5) If you do not trust the environment or the skill author, do not provide session cookies or run the command. If you want a more conservative setup, install and run gallery-dl yourself locally following the skill's instructions rather than letting the agent execute commands.
Capability Analysis
Type: OpenClaw Skill
Name: instagram-downloader
Version: 1.0.1
The skill facilitates downloading Instagram content via 'gallery-dl' by instructing the agent to collect sensitive session cookies and execute shell commands. While the behavior is aligned with the stated purpose, the use of shell execution with user-provided parameters in SKILL.md creates a risk of command injection if inputs are not properly sanitized. No evidence of intentional malice, such as data exfiltration or backdoors, was found.
Capability Assessment
Purpose & Capability
The skill's name and description match the instructions: it asks for username, download path, cookie file and proxy and runs gallery-dl. Minor inconsistency: SKILL.md expects gallery-dl (and optionally yt-dlp) to be available, but the registry metadata lists no required binaries — the runtime will fail or produce confusing errors if those tools are not installed.
Instruction Scope
Instructions stay within the stated purpose: collect parameters and run gallery-dl with user-supplied cookie file and proxy. The skill also gives methods to obtain Netscape-format cookies (including using yt-dlp or copying sessionid from browser). These instruct the user to surface sensitive session tokens, which is functionally necessary but privacy-sensitive.
Install Mechanism
This is an instruction-only skill with no install spec or code files — lowest install risk. Nothing is downloaded or written by the skill itself according to the manifest.
Credentials
No environment variables or credentials are requested, which is consistent. However, the skill explicitly asks for a cookie file (containing sessionid and csrftoken) or for the user to export sessionid values — these are effectively account credentials and should be treated as sensitive. Requesting them is proportionate to the described functionality but presents privacy/security risk if mishandled.
Persistence & Privilege
always is false and there is no install-time persistence or modification of other skills/config. The skill will run commands when invoked; autonomous invocation is allowed by platform default but is not combined with other concerning privileges here.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install instagram-downloader - After installation, invoke the skill by name or use
/instagram-downloader - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
添加下载目录询问、交互式参数收集流程
v1.0.0
First release: download Instagram user posts, reels, avatars with gallery-dl
Metadata
Frequently Asked Questions
What is Instagram Downloader?
交互式下载 Instagram 用户内容(帖子/Reels/头像)。首次使用时会依次询问用户名、下载目录、Cookie路径、代理地址。 It is an AI Agent Skill for Claude Code / OpenClaw, with 115 downloads so far.
How do I install Instagram Downloader?
Run "/install instagram-downloader" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Instagram Downloader free?
Yes, Instagram Downloader is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Instagram Downloader support?
Instagram Downloader is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Instagram Downloader?
It is built and maintained by zitao666 (@zitao666); the current version is v1.0.1.
More Skills