clinstagram
Full Instagram CLI — posting, DMs, stories, analytics, followers, hashtags, likes, comments. Supports Meta Graph API (official, safe) and private API (full features). Three compliance modes: official-only, hybrid-safe, private-enabled.
About this skill
clinstagram provides a comprehensive command-line interface for AI agents to interact with Instagram. It encompasses a wide range of functionalities, including managing posts (photos, videos, reels, carousels), handling direct messages, updating stories, accessing user analytics, managing followers, and facilitating interactions like likes, comments, and hashtags. A core feature of clinstagram is its flexible compliance model, which allows agents to select between using the official Meta Graph API (for enhanced safety and compliance), a hybrid approach that prioritizes Graph API while using private API for read-only features (the default), or enabling full private API access for complete feature utilization at the user's discretion and risk. AI agents can leverage this skill to automate various Instagram-related tasks, such as content publishing workflows, community management, automated responses to DMs, or in-depth data analysis directly from their operational scripts or codebases. This includes scenarios like automatically publishing daily content, engaging with user queries, analyzing follower growth and engagement metrics, or executing specific social media marketing strategies. This skill is designed to streamline Instagram operations for AI agents by abstracting the complexities of API interactions and providing a clear choice of compliance levels. It empowers developers and AI users to integrate sophisticated Instagram functionalities into their automated workflows, saving significant time and enabling scalable social media management without the need for manual intervention.
Best use case
The primary use case for clinstagram is to enable AI agents to programmatically automate and manage all facets of an Instagram account. This capability is invaluable for tasks such as automated content scheduling, efficient direct message handling, dynamic story updates, proactive follower engagement, and comprehensive performance analytics. It particularly benefits social media managers, digital marketers, and developers who require robust integration of Instagram functionalities into broader automation platforms, data analysis pipelines, or customer relationship management systems, ensuring consistent and scalable interaction with the platform.
Full Instagram CLI — posting, DMs, stories, analytics, followers, hashtags, likes, comments. Supports Meta Graph API (official, safe) and private API (full features). Three compliance modes: official-only, hybrid-safe, private-enabled.
Users should expect programmatic control over a comprehensive set of Instagram functionalities, enabling automation of posting, messaging, analytics, and user interactions directly via command-line interface commands executed by an AI agent.
Practical example
Example input
Use the `clinstagram` tool to post the image located at `/home/user/my_photo.jpg` with the caption 'Hello from my AI agent! #automation #instagram'. Then check the latest direct messages in the inbox.
Example output
Successfully posted image /home/user/my_photo.jpg to Instagram. Post ID: 1234567890. DM inbox retrieved:
[{"id": "msg1", "sender": "@friend", "text": "Hey, how are you?"}, {"id": "msg2", "sender": "@client", "text": "Interested in your services."}]When to use this skill
- Automating Instagram content publishing (photos, videos, reels, carousels) via an AI agent.
- Managing Instagram direct messages and stories programmatically.
- Performing Instagram analytics or follower management using AI.
- Integrating Instagram interactions into larger automated marketing or social media workflows.
When not to use this skill
- For casual, manual Instagram usage directly by a human user.
- When an agent only needs a very limited, specific Instagram API call that might be simpler to implement directly without a full CLI tool.
- If strict compliance is paramount and the only way to achieve a desired feature is through the private API, which carries inherent risks.
- If you do not want to risk potential Instagram account issues associated with using private APIs.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/clinstagram/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How clinstagram Compares
| Feature / Agent | clinstagram | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | easy | N/A |
Frequently Asked Questions
What does this skill do?
Full Instagram CLI — posting, DMs, stories, analytics, followers, hashtags, likes, comments. Supports Meta Graph API (official, safe) and private API (full features). Three compliance modes: official-only, hybrid-safe, private-enabled.
How difficult is it to install?
The installation complexity is rated as easy. You can find the installation instructions above.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Marketing
Discover AI agents for marketing workflows, from SEO and content production to campaign research, outreach, and analytics.
Best AI Agents for Marketing
A curated list of the best AI agents and skills for marketing teams focused on SEO, content systems, outreach, and campaign execution.
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
SKILL.md Source
# clinstagram
Hybrid Instagram CLI for AI agents. Routes between Meta Graph API and instagrapi private API based on compliance policy.
## Install
```bash
pip install clinstagram
```
## Critical: Global Flags Before Subcommand
```bash
clinstagram --json --account main dm inbox # CORRECT
clinstagram dm inbox --json # WRONG — Typer limitation
```
Global flags: `--json`, `--account NAME`, `--backend auto|graph_ig|graph_fb|private`, `--proxy URL`, `--dry-run`, `--enable-growth-actions`
## Quick Start
```bash
# Check status
clinstagram --json auth status
# Set compliance mode
clinstagram config mode official-only # Graph API only, zero risk
clinstagram config mode hybrid-safe # Graph primary, private read-only (default)
clinstagram config mode private-enabled # Full access, user accepts risk
# Connect backends
clinstagram auth connect-ig # Instagram Login (posting, comments, analytics)
clinstagram auth connect-fb # Facebook Login (adds DMs, stories, webhooks)
clinstagram auth login # Private API (username/password/2FA via instagrapi)
```
## Commands
| Group | Commands | Notes |
|-------|----------|-------|
| `auth` | `status`, `login`, `connect-ig`, `connect-fb`, `probe`, `logout` | Start with `auth status --json` |
| `post` | `photo`, `video`, `reel`, `carousel` | Accepts local paths or URLs |
| `dm` | `inbox`, `thread ID`, `send @user "text"`, `send-media`, `search` | Cold DMs = private API only |
| `story` | `list [@user]`, `post-photo`, `post-video`, `viewers ID` | |
| `comments` | `list MEDIA_ID`, `add`, `reply`, `delete` | add/reply need `--enable-growth-actions` |
| `analytics` | `profile`, `post ID\|latest`, `hashtag TAG` | |
| `followers` | `list`, `following`, `follow @user`, `unfollow @user` | follow/unfollow need `--enable-growth-actions` |
| `user` | `info @user`, `search QUERY`, `posts @user` | |
| `hashtag` | `top TAG`, `recent TAG` | |
| `like` | `post MEDIA_ID`, `undo MEDIA_ID` | Needs `--enable-growth-actions` |
| `config` | `show`, `mode MODE`, `set KEY VAL` | Modes: `official-only`, `hybrid-safe`, `private-enabled` |
## JSON Output
Success:
```json
{"exit_code": 0, "data": {}, "backend_used": "graph_fb"}
```
Error:
```json
{"exit_code": 2, "error": "session_expired", "remediation": "Run: clinstagram auth login", "retry_after": null}
```
## Exit Codes
| Code | Meaning | Action |
|------|---------|--------|
| 0 | Success | Parse `data` |
| 1 | Bad arguments | Fix syntax |
| 2 | Auth error | Run `remediation` command |
| 3 | Rate limited | Wait `retry_after` seconds |
| 4 | API error | Retry |
| 5 | Challenge required | Check `challenge_type`, prompt user |
| 6 | Policy blocked | Change compliance mode |
| 7 | Capability unavailable | Connect another backend |
## Agent Workflow
```bash
# 1. Check what's available
clinstagram --json auth status
# 2. Probe capabilities
clinstagram --json auth probe
# 3. Preview before acting
clinstagram --dry-run --json post photo img.jpg --caption "test"
# 4. Execute
clinstagram --json dm inbox --unread --limit 20
# 5. On error, read remediation field and execute it
```
## Growth Actions (Disabled by Default)
Follow, unfollow, like, unlike, comment add/reply require `--enable-growth-actions`. This is a safety gate — confirm with user before enabling.
## Backend Capability Matrix
| Feature | graph_ig | graph_fb | private |
|---------|:--------:|:--------:|:-------:|
| Post | Y | Y | Y |
| DM inbox | - | Y | Y |
| Cold DM | - | - | Y |
| Stories | - | Y | Y |
| Comments | Y | Y | Y |
| Analytics | Y | Y | Y |
| Follow/Unfollow | - | - | Y |
| Hashtag | Y | Y | Y |
Preference order: `graph_ig` > `graph_fb` > `private`. Override with `--backend`.
## Examples
```bash
# Check DMs
clinstagram --json dm inbox --unread
# Reply to a message
clinstagram --json dm send @alice "Thanks!"
# Post a photo
clinstagram --json post photo /path/to/img.jpg --caption "Hello world"
# Get analytics
clinstagram --json analytics post latest
# Search users
clinstagram --json user search "coffee shops"
# Browse hashtag
clinstagram --json hashtag top photography --limit 10
```
## Config
File: `~/.clinstagram/config.toml`. Override dir with `CLINSTAGRAM_CONFIG_DIR` env var.Related Skills
Twitter Command Center (Search + Post)
Searches and reads X (Twitter): profiles, timelines, mentions, followers, tweet search, trends, lists, communities, and Spaces. Publishes posts after the user completes OAuth in the browser. Use when the user asks about Twitter/X data, social listening, or posting without sharing account passwords.
Arena Social Skill
**Name:** arena-social
doppel-social-outreach
Promote Doppel world builds across social platforms. Use when the agent wants to share builds on Twitter/X, Farcaster, Telegram, or Moltbook to drive observers, grow reputation, and recruit collaborators.
x-api
X/Twitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.
Integracao completa com Instagram via Graph API. Publicacao, analytics, comentarios, DMs, hashtags, agendamento, templates e gestao de contas Business/Creator.
---
name: article-factory-wechat
humanizer
Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases.
find-skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
tavily-search
Use Tavily API for real-time web search and content extraction. Use when: user needs real-time web search results, research, or current information from the web. Requires Tavily API key.
baidu-search
Search the web using Baidu AI Search Engine (BDSE). Use for live information, documentation, or research topics.
agent-autonomy-kit
Stop waiting for prompts. Keep working.
Meeting Prep
Never walk into a meeting unprepared again. Your agent researches all attendees before calendar events—pulling LinkedIn profiles, recent company news, mutual connections, and conversation starters. Generates a briefing doc with talking points, icebreakers, and context so you show up informed and confident. Triggered automatically before meetings or on-demand. Configure research depth, advance timing, and output format. Walking into meetings blind is amateur hour—missed connections, generic small talk, zero leverage. Use when setting up meeting intelligence, researching specific attendees, generating pre-meeting briefs, or automating your prep workflow.