instagram-publish
БесплатноЗапускает вложенные скриптыНе проверенUse when publishing images to Instagram via the Graph API from a Creator or Business account. Triggers when the user wants to automate Instagram posting, push…
от mebusw219 установок в других каталогахОб этом скилле
Instagram Publish
Publish images to Instagram through Meta's Graph API. Part 1 is one-time manual setup (browser clicks); Part 2 is the repeatable automated publish (this skill does it for you).
When to use
- User wants to post an image to Instagram programmatically
- User has a public image URL and wants to attach a caption and publish
- User just registered a Meta App and needs the rest of the wiring done
- User is hitting "Media download has failed" or "Unsupported post request"
When NOT to use
- Posting Reels or Stories (single-image posts and multi-image Carousels are supported)
- Local files (image must be a public URL — see error #1 below)
- Account is still a personal account (must be Creator or Business first)
Quick Start (after Part 1 setup is done)
# 1. Put credentials in .env (one time)
cp .env.example .env
# edit .env with ACCESS_TOKEN (and optionally IG_USER_ID)
# 2a. Single image
python3 scripts/publish.py \
--image-urls "https://example.com/photo.jpg" \
--caption "Hello from Instagram API"
# 2b. Carousel (2-10 images, swipable in feed)
python3 scripts/publish.py \
--image-urls "https://example.com/1.jpg" "https://example.com/2.jpg" "https://example.com/3.jpg" \
--caption "Swipe → slide 1 / slide 2 / slide 3"
The script prints the new post ID on success. Done.
Part 1: One-time manual setup (browser only)
These steps cannot be automated — they require human logins, email verification, and Meta's UI. Do them once, save the resulting ACCESS_TOKEN, and you never need to touch Meta's dashboard again unless permissions change.
Step 1 — Switch Instagram to a Creator account
Visit https://www.instagram.com/accounts/professional_account_settings/ and follow:
Settings
↓
Account Type
↓
Switch to Professional Account
↓
Creator
Step 2 — Create a Meta Developer account
Visit https://developers.facebook.com/ and sign in with your Facebook account, then:
Get Started
↓
Verify Email
↓
Accept Terms
Step 3 — Create an App
Visit https://developers.facebook.com/apps/:
Create App
↓
Use cases: Manage messaging & content on Instagram
↓
Do NOT connect a Business portfolio
⚠️ Skipping the Business portfolio avoids the "insufficient developer permissions" error later.
Step 4 — Finish App settings
In App settings → Basic:
- Upload an app icon
- Fill in Privacy Policy URL and Data Deletion URL
- Pick an app category
- (Optional) In Use cases → Customize, configure account linking at https://accountscenter.instagram.com/connected_experiences/
- Click Publish to make the app live
Step 5 — Generate the Access Token
Use cases → Customize
↓
Left sidebar: API setup with Instagram login
↓
Add required messaging permissions
↓
Add account → authorize your Instagram account
↓
Generate token
↓
Check "I understand" → copy the token
The token starts with IGAA.... Save it to .env (next section).
Credentials you should have after Part 1
| Field | Example | Lives in |
|---|---|---|
ACCESS_TOKEN |
IGAAxxxxx... |
.env |
IG_USER_ID |
2700xxxxxx |
.env (optional — script can auto-fetch) |
USERNAME |
xxxxx |
reference only |
⚠️ Never commit
.envto git. The token is the only thing that authenticates posts on your behalf.
Part 2: Automated publishing (the skill does this)
The Graph API calls below are bundled in scripts/publish.py. You run one command; the script runs the whole flow. The path is chosen automatically from the number of URLs:
1 URL → single-image mode (3 calls):
[1] Validate token → GET /me?fields=id,username ↓ [2] Create container → POST /{ig_user_id}/media (image_url + caption) ↓ [3] Publish → POST /{ig_user_id}/media_publish (creation_id)2–10 URLs → Carousel mode (5+ calls):
[1] Validate token → GET /me?fields=id,username ↓ [2a] Create item → POST /{ig_user_id}/media (image_url + is_carousel_item=true) × N ↓ [2b] Create carousel → POST /{ig_user_id}/media (media_type=CAROUSEL + children=id1,id2,...) ↓ [3] Publish → POST /{ig_user_id}/media_publish (creation_id)
Setting up .env
cp .env.example .env
.env contents:
ACCESS_TOKEN=IGAAxxxxxxxxxxxxxxxxxxxx
IG_USER_ID=2700xxxxxxxx # optional — auto-detected if missing
The script reads .env from the skill directory. If you run it from elsewhere, pass --env /path/to/.env.
Publishing an image with public reachable url
可以调用可用的文生图模型或生图 SKILL来生图,通常会返回一个公网 CDN 临时 URL。无需下载图片后再上传到图床,直接用这个图片 URL 传入以下脚本即可用于发布 ins 帖子。
python3 scripts/publish.py \
--image-urls "https://example.com/photo.jpg" \
--caption "Hello from Instagram API"
Optional flags:
| Flag | Default | Notes |
|---|---|---|
--image-urls URL [URL ...] |
required | One or more public image URLs. 1 URL = single post, 2-10 |
Установить instagram-publish в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл instagram-publish?
Use when publishing images to Instagram via the Graph API from a Creator or Business account. Triggers when the user wants to automate Instagram posting, push an image with caption to their account, set up Instagram API access for the first time, or troubleshoot Instagram Graph API errors like "Media download has failed" or "Unsupported post request". Assumes one-time Meta App setup is complete and an Access Token is available.
Как установить скилл instagram-publish?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл instagram-publish запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic