instagram

vm0-ai/vm0-skills · updated May 20, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/vm0-ai/vm0-skills --skill instagram
0 commentsdiscussion
summary

Use the Instagram Graph API by directly executing curl commands to read and publish Instagram content.

skill.md

Instagram API (Graph API)

Use the Instagram Graph API by directly executing curl commands to read and publish Instagram content.

Official docs: https://developers.facebook.com/docs/instagram-api


When to Use

Use this skill when you need to:

  • Fetch recent media (photos / videos / Reels) from an account
  • Get detailed information about a specific media item (caption, type, link, time, etc.)
  • Search recent media by hashtag
  • Publish image posts via API (with caption)

Prerequisites

  1. You must have an Instagram Business / Creator account linked to a Facebook Page
  2. Create an app in Facebook Developers and enable Instagram Basic Display / Instagram Graph API permissions
  3. Obtain:
  • INSTAGRAM_TOKEN: a long-lived user access token
  • INSTAGRAM_BUSINESS_ACCOUNT_ID: your Instagram Business account ID

Set the environment variables, for example:

export INSTAGRAM_TOKEN="EAAG..."
export INSTAGRAM_BUSINESS_ACCOUNT_ID="1784140xxxxxxx"

These examples use Graph API version v21.0. You can replace this with the latest version if needed.

Required permissions (scopes)

Depending on which endpoints you use, make sure your app has requested and been approved for (at least):

  • instagram_basic
  • pages_show_list
  • instagram_content_publish (for publishing media)
  • instagram_manage_insights and related permissions (for insights / some hashtag use cases)

How to Use

All examples below assume you have already set:

INSTAGRAM_TOKEN
INSTAGRAM_BUSINESS_ACCOUNT_ID

1. Fetch recent media for the account

Fetch the most recent media (photos / videos / Reels) for the account:

curl -s -X GET "https://graph.facebook.com/v21.0/$INSTAGRAM_BUSINESS_ACCOUNT_ID/media?fields=id,caption,media_type,media_url,permalink,timestamp" --header "Authorization: Bearer $INSTAGRAM_TOKEN"

Notes:

  • Each item in the returned JSON represents a media object
  • Common fields:
    • id: media ID (used for details / insights later)
    • caption: caption text
    • media_type: IMAGE / VIDEO / CAROUSEL_ALBUM
    • media_url: direct URL to the media
    • permalink: Instagram permalink
    • timestamp: creation time

2. Get details for a single media

If you already have a media id, you can fetch more complete information. Replace <your-media-id> with the id field from the "Get User Media" response (section 1 above):

curl -s -X GET "https://graph.facebook.com/v21.0/<your-media-id>?fields=id,caption,media_type,media_url,permalink,thumbnail_url,timestamp,username" --header "Authorization: Bearer $INSTAGRAM_TOKEN"

3. Search media by hashtag

Note: hashtag search requires proper business use cases and permissions as defined by Facebook/Instagram. Refer to the official docs.

This usually involves two steps:

3.1 Get the hashtag ID

Replace <hashtag-name> with any hashtag name you want to search for (without the # symbol), e.g., "travel", "food", "photography":

curl -s -X GET "https://graph.facebook.com/v21.0/ig_hashtag_search?user_id=$INSTAGRAM_BUSINESS_ACCOUNT_ID&q=<hashtag-name>" --header "Authorization: Bearer $INSTAGRAM_TOKEN"

Note the id field in the returned JSON for use in the next step.

3.2 Fetch recent media for the hashtag

Replace <hashtag-id> with the id field from the "Search Hashtag" response (section 3.1 above):

curl -s -X GET "https://graph.facebook.com/v21.0/<hashtag-id>/recent_media?user_id=$INSTAGRAM_BUSINESS_ACCOUNT_ID&fields=id,caption,media_type,media_url,permalink,timestamp" --header "Authorization: Bearer $INSTAGRAM_TOKEN"

4. Publish an image post

Publishing an image post via the Graph API usually requires two steps:

  1. Create a media container
  2. Publish the container to the feed

4.1 Create a media container

Write the request data to /tmp/request.json:

{
  "image_url": "https://example.com/image.jpg",
  "caption": "Hello from Instagram API 👋"
}

Replace https://example.com/image.jpg with any publicly accessible image URL and update the caption text as needed.

curl -s -X POST "https://graph.facebook.com/v21.0/$INSTAGRAM_BUSINESS_ACCOUNT_ID/media" -H "Content-Type: application/json" -d @/tmp/request.json --header "Authorization: Bearer $INSTAGRAM_TOKEN"

The response will contain an id (media container ID), for example:

{
  "id": "1790xxxxxxxxxxxx"
}

Note this ID for use in the next step.

4.2 Publish the media container to the feed

Write the request data to /tmp/request.json:

{
  "creation_id": "<your-creation-id>"
}

Replace <your-creation-id> with the id field from the "Create Media Container" response (section 4.1 above):

curl -s -X POST "https://graph.facebook.com/v21.0/$INSTAGRAM_BUSINESS_ACCOUNT_ID/media_publish" -H "Content-Type: application/json" -d @/tmp/request.json --header "Authorization: Bearer $INSTAGRAM_TOKEN"

If successful, the response will contain the final media id:

{
  "id": "1791yyyyyyyyyyyy"
}

You can then use the "Get details for a single media" command to fetch its permalink.


5. Common errors and troubleshooting

  1. Permissions / OAuth errors
  • Typical error message: (#10) Application does not have permission for this action
  • Check:
  • Whether the app has been reviewed / approved
  • Whether the required Instagram permissions are enabled
  • Whether INSTAGRAM_TOKEN is a valid long-lived token
  1. Unsupported account type
  • Most Graph API features require Business / Creator accounts
  • Make sure the Instagram account type is correct and linked to a Facebook Page
  1. Rate limits
  • Too many requests in a short period may hit rate limits; add delays for bulk operations

Guidelines

  1. Do not log tokens: INSTAGRAM_TOKEN is sensitive; avoid printing it in logs or chat transcripts
  2. Validate curl commands in a test environment first: confirm flows before wiring them into automation / agents
  3. Keep API version up to date: periodically check Facebook docs and update the v21.0 version in URLs to the latest
  4. Use placeholder text for IDs: all examples use placeholder text like <your-media-id> instead of shell variables in URLs to avoid dependencies and make examples self-contained
how to use instagram

How to use instagram on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add instagram
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/vm0-ai/vm0-skills --skill instagram

The skills CLI fetches instagram from GitHub repository vm0-ai/vm0-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/instagram

Reload or restart Cursor to activate instagram. Access the skill through slash commands (e.g., /instagram) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.841 reviews
  • Soo Brown· Dec 28, 2024

    instagram fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Chaitanya Patil· Dec 16, 2024

    instagram has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Advait Jain· Dec 16, 2024

    We added instagram from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Amelia Mensah· Dec 8, 2024

    instagram reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Amelia Torres· Nov 19, 2024

    I recommend instagram for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Ama Li· Nov 19, 2024

    Registry listing for instagram matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Piyush G· Nov 7, 2024

    Solid pick for teams standardizing on skills: instagram is focused, and the summary matches what you get after install.

  • Daniel Jain· Nov 7, 2024

    Useful defaults in instagram — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Shikha Mishra· Oct 26, 2024

    We added instagram from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Kwame Khan· Oct 26, 2024

    instagram has been reliable in day-to-day use. Documentation quality is above average for community skills.

showing 1-10 of 41

1 / 5