Instagram Publish Skill
This skill enables publishing content to Instagram via the MyBrandMetrics API.
Usage
Use the provided Python script scripts/publish_instagram.py to publish content.
Arguments
--api-key: MyBrandMetrics API Key (checkTOOLS.mdfor current key)--connection-id: Instagram Connection ID--account-id: MyBrandMetrics Account ID--type: Media type (IMAGE,REELS,CAROUSEL)--caption: Text for the post--url: URL for single Image/Reel--path: Local path for single Image/Reel--items: Space-separated list of URLs or paths for Carousel items--thumb-offset: Thumbnail offset in ms (default:1000)--no-feed: Flag to disable sharing to feed (Reels only)--no-wait: Flag to disable waiting for completion (polls automatically by default)--check-id: Check status of a specific publish ID
Reliability Checklist (Mandatory)
Before running the publish command, verify:
- Item Count: Count every single attachment and URL the user provided. Ensure
--itemsincludes all of them. - Item Type: The script auto-detects type based on extension, but double-check if a file has no extension.
- Caption: Ensure the exact caption is captured.
- Local vs URL: The skill handles mixed local/URL carousels by downloading URLs first for reliability.
Examples
Publish a single Image (URL)
python3 scripts/publish_instagram.py --api-key YOUR_KEY --connection-id YOUR_CONN_ID --account-id YOUR_ACC_ID --type IMAGE --url "https://example.com/image.jpg" --caption "Hello World!"
Publish a Reel (Local File)
python3 scripts/publish_instagram.py --api-key YOUR_KEY --connection-id YOUR_CONN_ID --account-id YOUR_ACC_ID --type REELS --path /path/to/video.mp4 --caption "Check this out!" --thumb-offset 1000
Publish a Carousel (Mix of local and URL)
python3 scripts/publish_instagram.py --api-key YOUR_KEY --connection-id YOUR_CONN_ID --account-id YOUR_ACC_ID --type CAROUSEL --items "/path/to/img1.jpg" "https://example.com/vid2.mp4" --caption "My Carousel"
Check Status
python3 scripts/publish_instagram.py --api-key YOUR_KEY --connection-id YOUR_CONN_ID --account-id YOUR_ACC_ID --check-id v_pub_file~...
Security
- Always refer to
TOOLS.mdfor the current API key. - If no key is found in
TOOLS.md, ask the user for it. - Do not expose the connection ID or account ID in logs if possible, though they are often provided in prompts.