Community影像github.com

publora/instagram-post

當使用者想要透過 Publora 在 Instagram 上發佈或排程貼文時使用:支援單張圖片、2-10 張圖片的輪播、Reels 或限時動態。需要商業帳號及圖片或影片;純文字貼文會被 API 拒絕。不適用於 Threads(請使用 threads-post)。

instagram-post 是什麼?

此技能讓 AI 代理程式(例如 Claude Code、Cursor、Codex)能透過 Publora MCP 伺服器直接在 Instagram 上發佈與排程內容。它支援多種格式:單張圖片、2 至 10 張圖片的輪播、Reels 以及限時動態,但要求使用 Instagram 商業帳號且每則貼文必須包含至少一張圖片或影片(純文字貼文會被 API 拒絕)。代理程式可以立即貼文、排程未來時間發佈或建立草稿,也能上傳媒體、管理現有貼文與列出已連結的帳號。此技能也提供了 REST API 備援方案,讓使用者在 MCP 伺服器無法使用時仍可操作;同時詳細說明了 Instagram Graph API 的限制,包括支援的格式(JPEG、PNG、WebP)、檔案大小上限(圖片 8 MB、影片 300 MB)、輪播圖片數量限制(2-10 張)以及每日發文速率限制(50 則貼文)。此外,它也解釋了如何透過 REST API 設定影片類型(Reels 或限時動態),並提供了常見錯誤的疑難排解指南。

相容平台✓Claude Code✓Codex CLI✓Cursor
npx skills add https://github.com/publora/skills/tree/main/skills/instagram-post

Installed? Explore more 影像 skills: steipete/songsee, affaan-m/frontend-design, mattpocock/improve-codebase-architecture · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Instagram 貼文

使用 Publora MCP 伺服器建立與排程 Instagram 貼文。支援圖片貼文、輪播(2-10 張圖片)、Reels 與限時動態。需要 Instagram 商業帳號。

先決條件

方案: 免費的 Starter 方案即可使用。目前的限制與定價請見:publora.com/pricing。

開始使用

  1. 建立帳號:前往 publora.com/register 註冊(免費)
  2. 轉換為商業帳號:在 Instagram 設定中轉換(API 不支援個人與創作者帳號)
  3. 連接 Instagram:在 Publora 控制台 透過 OAuth 連接
  4. 取得 API 金鑰:前往 app.publora.com/dashboard/api
  5. 將你的代理程式連接到 MCP 伺服器:伺服器位址為 https://mcp.publora.com,使用 Authorization: Bearer sk_YOUR_API_KEY 進行驗證。在 Claude Code 中:
claude mcp add publora --transport http https://mcp.publora.com \
  --header "Authorization: Bearer sk_YOUR_API_KEY"

Claude Desktop、Cursor、Codex、OpenClaw 以及 claude.ai 連接器需要不同的設定檔或流程:請參閱客戶端設定以取得確切路徑與程式碼片段。

REST API 備援方案

如果 MCP 伺服器無法使用或回傳錯誤,請直接使用 REST API:

基礎 URL: https://api.publora.com/api/v1

驗證: 使用 x-publora-key 標頭(非 Authorization: Bearer):

# 取得已連接的平台
curl -X GET "https://api.publora.com/api/v1/platform-connections" \
  -H "x-publora-key: sk_your_api_key"

# 建立貼文
curl -X POST "https://api.publora.com/api/v1/create-post" \
  -H "x-publora-key: sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "platforms": ["instagram-11223344"],
    "content": "Your caption here #hashtag",
    "scheduledTime": "2026-03-25T10:00:00Z"
  }'

平台 ID 格式: instagram-{id},其中 {id} 來自 /platform-connections 的回應。

範例 ID:instagram-11223344、instagram-55667788

📖 完整 API 文件: docs.publora.com

平台限制(API 與原生應用程式比較)

這些限制特定於 Instagram Graph API,與原生應用程式的限制不同:

圖片

功能API 限制
格式JPEG、PNG、WebP(WebP 會自動轉換)。不支援動態 GIF、BMP 與 TIFF。
最大檔案大小8 MB
輪播圖片數量2-10 張(原生應用程式允許 20 張)
長寬比4:5(直立)至 1.91:1(橫向)

影片

功能Reels限時動態輪播影片
最大長度15 分鐘(只有 5-90 秒的影片有資格顯示在 Reels 標籤頁)60 秒60 秒
最小長度3 秒3 秒3 秒
最大檔案大小300 MB100 MB300 MB
格式MP4、MOVMP4、MOVMP4、MOV

說明文字

功能限制
說明文字長度2,200 個字元
「更多」之前可見前 125 個字元
主題標籤每則貼文 30 個(包含在說明文字中)

速率限制

  • 每 24 小時 50 則貼文(部分帳號回報為 25 則)

可用工具

create_post

建立新的 Instagram 貼文。

參數:

  • platforms:包含你的 Instagram 連線 ID 的陣列(例如 ["instagram-11223344"])
  • content:說明文字(最多 2,200 個字元)
  • scheduledTime:ISO 8601 UTC 日期時間。可選:省略則貼文會以草稿形式建立。傳入未來時間以進行排程。如果時間是五分鐘(含)以前,將會被拒絕並回傳 SCHEDULED_TIME_IN_PAST,因此若要立即發佈,請使用當前時間再加一分鐘。
  • mediaUrls:最多 10 個公開的 https 圖片或影片 URL。Publora 會在伺服器端下載它們,並在驗證之前附加,因此媒體與排程可在一次呼叫中完成。這是替代「先建立草稿,再使用 get_upload_url,然後 complete_media」流程的一次性方案。擷取速率限制為每小時 60 個 URL。

get_upload_url

取得用於媒體上傳的預簽名 URL。

參數:

  • postGroupId:要附加媒體的貼文 ID
  • fileName:檔案名稱(例如 "photo.jpg")
  • contentType:圖片必須為 image/jpeg,影片必須為 video/mp4
  • type:"image" 或 "video"

complete_media

在預簽名的 PUT 請求成功後,完成透過 get_upload_url 上傳的檔案。這是可選的,因為排程也會完成待處理的媒體,但提前呼叫它可以讓格式與探測錯誤在發佈前就先顯現出來。對於使用 mediaUrls 附加的媒體則不需要。

參數:

  • mediaId:get_upload_url 回傳的 ID

list_connections

列出已連接的帳號及其平台 ID。請先呼叫此工具並完全按照原樣複製 ID;這些 ID 是無法猜測的。

list_posts / get_post / update_post / delete_post

管理已排程與草稿的貼文。update_post 也可以修改草稿或已排程貼文的 content 與 platforms,因此修正錯字或重新指定目標不再需要刪除後重建。delete_media 與 prune_media_reference 可用於清理已上傳的檔案。

影片類型設定(透過 REST API)

透過 platformSettings 控制影片的發佈方式:

{
  "platformSettings": {
    "instagram": {
      "videoType": "REELS"
    }
  }
}
設定值預設值說明
videoType"REELS"、"STORIES""REELS"決定影片的發佈方式

注意:platformSettings 可被 MCP 的 create_post 與 update_post 工具以及 REST API 接受。結構描述是嚴格的:打錯的平台或鍵值將會被拒絕並回傳驗證錯誤,而非被靜默忽略。

範例

單張圖片貼文

將此貼文發佈到 Instagram:
「早晨的咖啡與程式碼。開啟一天的最佳方式。 #devlife #coding」

[附加 JPEG 圖片]

格式: JPEG、PNG 與 WebP 皆可使用;WebP 會在發佈前自動轉換。

輪播貼文

使用這 5 張產品截圖建立一個 Instagram 輪播。
說明文字:「我們 App 在 6 個月內的演變。滑動看看這段旅程! #buildinpublic」

注意:需要 2-10 張 JPEG 圖片。輪播中不能混合圖片與影片。

Reel

將此影片作為 Reel 發佈:
「我們新功能的 60 秒教學。 #tutorial #app」

影片預設為 Reels。若要發佈為限時動態,請透過 REST API 設定 videoType: "STORIES"。

限時動態

將這個 30 秒的片段作為限時動態發佈(將在 24 小時後消失)。

需要透過 REST API 設定 platformSettings.instagram.videoType: "STORIES"。

排程貼文

將此貼文排程在明天上午 10 點發佈:
「新功能即將發布!敬請期待。」
[附加 JPEG 圖片]

重要限制

  1. 不支援動態 GIF、BMP 與 TIFF。 接受 JPEG、PNG 與 WebP,其中 WebP 會自動轉換。

  2. 需要商業帳號:個人與創作者帳號無法透過 API 發文。僅有商業帳號可行。

  3. 每則貼文都需要媒體:Instagram 不支援純文字貼文。每則貼文至少需要一張圖片或一部影片。

  4. 輪播中不能混合媒體類型:輪播必須全部是圖片或全部是影片(透過不同的貼文),不能兩者混合。

  5. 限時動態會消失:限時動態是暫時的,會在 24 小時後消失。

  6. Reel 為預設類型:影片預設以 Reels 形式發佈。若要發佈限時動態,請使用 REST API 並設定 videoType: "STORIES"。

最佳實務

內容

  1. 前 125 個字元很重要:這是使用者在點擊「更多」之前看到的內容
  2. 主題標籤策略:使用 5-15 個相關的主題標籤(最多 30 個)
  3. 圖片品質:使用高品質 JPEG 圖片以獲得最佳效果
  4. 輪播互動率:輪播的互動率高於單張圖片

時機

  • 最佳時間:目標時區的上午 11 點至下午 1 點、晚上 7 點至 9 點
  • 頻率:每天 1-2 則貼文以促進成長
  • Reels 加成:Reels 在演算法上比靜態圖片更受青睞

互動

  • 在第一小時內回覆留言
  • 在適當時機使用地點標籤
  • 從限時動態交叉推廣到動態消息

疑難排解

錯誤原因解決方案
「需要商業帳號」使用個人/創作者帳號在 Instagram 設定中轉換為商業帳號
「無效的圖片格式」PNG 或其他非 JPEG 格式上傳前將圖片轉換為 JPEG
「媒體上傳失敗」檔案太大或格式錯誤檢查:圖片 < 8 MB JPEG,影片 < 300 MB MP4
「輪播需要 2-10 個項目」圖片數量錯誤確保輪播有 2-10 張圖片
「帳號未連接」OAuth 過期透過 Publora 控制台重新連接
速率限制 (429)超過每日 50 則貼文等待 24 小時

Individual skills in this repo

This repo contains 8 individual skills — each has its own dedicated page.

publora/bluesky-post

Use when the user wants to post or schedule to Bluesky through Publora. Handles the 300-character cap, auto-detected hashtags and links, up to 4 images, and videos. Alt text cannot be set through the API. Needs a Bluesky app password, never the main password. Not for Mastodon (use social-post).

publora/linkedin-analytics

Analyze LinkedIn performance and manage engagement through Publora. Use when the user asks how a LinkedIn post or account performed (impressions, reach, reactions, comments, reshares, follower growth) or wants to react, comment, reshare or resolve an @mention. Statistics run over the REST API, engagement over MCP tools. Not for creating posts (use linkedin-post).

publora/linkedin-post

Use when the user wants to publish or schedule a LinkedIn post through Publora: text, a multi-image grid, a video, a PDF document, or @mentions. Not for analytics, reactions, comments or reshares (use linkedin-analytics), and not for other platforms.

publora/social-post

Use when the user wants to post or schedule to YouTube, a Facebook Page or Mastodon through Publora. YouTube needs a video on every post, Facebook publishes to Pages only, Mastodon caps at 500 characters. Not for the platforms that have their own skill.

publora/telegram-post

Use when the user wants to post or schedule to a Telegram channel or group through Publora, using a bot. Covers Telegram markdown, silent delivery, link previews and forward protection. Bot API caps media captions at 1,024 characters and videos at 50 MB. Not for other platforms (each has its own skill).

publora/threads-post

Create and schedule Threads posts with image carousels and reply control via Publora MCP. Use when the user wants to post to Meta's Threads. Multi-part threading is currently disabled by the platform, so long content stays a single post. Not for Instagram (use instagram-post) or X threads (use x-post).

publora/tiktok-post

Use when the user wants to upload or schedule a TikTok video through Publora, with privacy, comment, duet, stitch and commercial-disclosure settings. Video runs 3 seconds to 10 minutes at 23+ FPS; carousels take up to 35 images. Unaudited apps can publish private videos only. Not for Reels (use instagram-post).

publora/x-post

Use when the user wants to post or schedule to X (Twitter) through Publora, including threads auto-split past 280 characters, up to 4 images, or a video up to 140 seconds. X needs a paid Publora plan. Not for Threads or Bluesky (each has its own skill).

相關技能