Instagram API

Instagram API is a skill for Claude Code, Codex from CraftOS-dev/CraftBot. It costs 32 tokens per session (1,012 once invoked), scanned A, original, MIT.

An integration for publishing photos and videos to Instagram and Threads through Meta's official API. It uses Imgur to provide the public media URLs those uploads require.

In plain words
What is it for?
Publish feed posts, stories, reels, carousels, and Threads posts after the required Meta and Imgur accounts are configured.
Why use it?
It lets publishing happen from a development workflow instead of requiring each post to be created manually in the apps.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/craftos-dev/craftbot/instagram-api
Any agent
npx skills add CraftOS-dev/CraftBot --skill instagram-api
Clone the repo
git clone --depth 1 https://github.com/CraftOS-dev/CraftBot

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Instagram API

README.md
[![agentmods](https://agentmods.dev/badge/skills/craftos-dev/craftbot/instagram-api.svg)](https://agentmods.dev/skills/craftos-dev/craftbot/instagram-api)
Your own site
<a href="https://agentmods.dev/skills/craftos-dev/craftbot/instagram-api"><img src="https://agentmods.dev/badge/skills/craftos-dev/craftbot/instagram-api.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,012 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00032 $0.01012
Opus 5 $0.00016 $0.00506
Sonnet 5 $0.00006 $0.00202
Haiku 4.5 $0.00003 $0.00101

Measured yesterday against content hash ef590b25b183, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

Instagram API scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

The scan reads SKILL.md. This mod also ships 5 executable files (scripts/post-carousel.sh, scripts/post-feed.sh, scripts/post-reels.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl "https://graph.facebook.com/v21.0/me/accounts?access_token=YOUR_TOKEN"
skills/instagram-api/SKILL.md · 141 lines

How it starts

The opening of the file, as written. The whole thing — 141 lines — stays where its author put it; the contents beside it link to each section on GitHub.

instagram-api

Meta Graph API를 사용해 Instagram과 Threads에 직접 포스팅하는 스킬. 미디어 호스팅은 Imgur API를 사용 (이미지/영상 공개 URL 생성).


Imgur Client ID 발급

Instagram Graph API는 공개 URL로만 미디어를 업로드할 수 있어 Imgur가 필요합니다.

  1. https://api.imgur.com/oauth2/addclient 접속
  2. Application name: 원하는 이름 (예: raon-instagram)
  3. Authorization type: Anonymous usage without user authorization 선택
  4. Authorization callback URL: https://localhost (Anonymous이므로 형식만 맞추면 됨)
  5. 이메일 입력 후 제출 → Client ID 확인
  6. 환경변수 설정:
    export IMGUR_CLIENT_ID="your_client_id_here"
    

환경변수 설정

# ~/.openclaw/.env 또는 ~/.zshrc에 추가
export INSTAGRAM_ACCESS_TOKEN="your_token_here"
export INSTAGRAM_BUSINESS_ACCOUNT_ID="your_account_id_here"

# Threads (선택)
export THREADS_ACCESS_TOKEN="your_threads_token_here"
export THREADS_USER_ID="your_threads_user_id_here"

# Imgur (이미지 호스팅용 — 피드/릴스 업로드 시 필요)
export IMGUR_CLIENT_ID="your_imgur_client_id_here"

Meta Graph API 토큰 발급

  1. Meta for Developers 접속
  2. 앱 생성 → Business 유형 선택
  3. Instagram Graph API 제품 추가
  4. 권한 요청:
    • instagram_basic
    • instagram_content_publish
    • pages_read_engagement
  5. Access Token 발급:
  6. Business Account ID 확인:
    curl "https://graph.facebook.com/v21.0/me/accounts?access_token=YOUR_TOKEN"
    

💡 Imgur Client ID: https://api.imgur.com/oauth2/addclient (Anonymous usage 선택)


스크립트 사용법

피드 포스팅

bash scripts/post-feed.sh <이미지경로> <캡션파일>

# 예시
bash scripts/post-feed.sh ./photo.jpg ./caption.txt

스토리 포스팅

bash scripts/post-story.sh <이미지경로>

# 예시
bash scripts/post-story.sh ./story.jpg

릴스 포스팅

bash scripts/post-reels.sh <영상경로> <캡션파일>

# 예시
bash scripts/post-reels.sh ./reel.mp4 ./caption.txt

캐러셀 포스팅

bash scripts/post-carousel.sh <캡션파일> <이미지1> <이미지2> [이미지3...]

# 예시
bash scripts/post-carousel.sh ./caption.txt ./img1.jpg ./img2.jpg ./img3.jpg

Read the full file on GitHub · 141 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 141 lines · 32 tokens per session scan A ef590b25b183

Subscribe to this mod's changes

Instagram API is a skill published in the GitHub repository CraftOS-dev/CraftBot (378 stars, last pushed 2d ago), licensed MIT. It adds 32 tokens to every session and 1,012 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

turix-mac

Computer Use Agent (CUA) for macOS automation using TuriX. Use when you need to perform visual tasks on the desktop, such as opening apps, clicking buttons, or navigating UIs that don't have a CLI or API.

TurixAI/TuriX-CUA · 53 tokens

browser-control

Control web pages in an existing Chromium remote-debugging session with deterministic sagui commands or the browser-only AI Agent. Use when Claude Code needs to inspect tabs, observe semantic elements, navigate, click, type, send keys, scroll, or complete a browser goal through CDP without controlling native macOS UI…

NakaokaRei/SwiftAutoGUI · 72 tokens

agent-smoke-test

Run manual development checks for SwiftAutoGUI AI Agent actions through the local sagui CLI. Use when Claude or Codex needs to test app-control or Accessibility BasicAction generation on macOS.

NakaokaRei/SwiftAutoGUI · 43 tokens

macos-control

Control macOS GUI applications via mouse automation, keyboard input, screenshots, image recognition, and AppleScript execution. Use when you need to interact with macOS app UIs, take screenshots, click buttons, type text, scroll, drag, or locate images on screen.

NakaokaRei/SwiftAutoGUI · 58 tokens

open-record-replay

Record a user-demonstrated macOS workflow with the Open Record/Replay CLI, inspect the captured event stream, prepare a skill evidence package, and hand it to the host agent's native skill creator. Use when the user asks the agent to watch them perform a task, record a workflow, or create/refine a reusable Computer…

humblebanana/open-record-replay · 77 tokens

artifact-storage-policy

管理 Codex 交付物的專案識別、Google Drive/GitHub 路由、檔名、儲存位置與回讀驗證;凡工作報告、外部保存、交付成果或新 repository 選擇涉及遠端儲存時使用。.

a275618631/codex-antigravity-collaboration · 68 tokens