Community寫作與編輯github.com

publora/linkedin-post

當使用者想要透過 Publora 發佈或排程 LinkedIn 貼文時使用:純文字、多圖片網格、影片、PDF 文件或 @提及。不適用於分析、反應、留言或轉發(請使用 linkedin-analytics),也不適用於其他平台。

linkedin-post 是什麼?

這是一個專為 AI Agent(如 Claude Code、Cursor、Codex)設計的技能,讓您能透過 Publora MCP 伺服器直接建立和排程 LinkedIn 貼文。它支援純文字、單張圖片、多圖片網格(最多 10 張)、影片(MP4,最長 30 分鐘)以及 PDF 文件,並可處理 @提及(person 或 organization)。技能文件詳細說明了如何設定 MCP 客戶端、使用 REST API 作為備援方案,以及透過 `create_post` 等工具進行一鍵貼文或先上傳媒體再排程。同時也列出了 LinkedIn API 的重要限制,例如不支援輪播式多圖(僅網格)、不支援混合媒體、以及不支援粗體或斜體等 Rich Text 格式。此外,文件提供了最佳實踐(如前 210 字元的關鍵性)、常見的疑難排解(如授權過期、媒體處理失敗),並引導使用者先呼叫 `list_connections` 取得正確的平台 ID,以及使用 `linkedin_list_mentionables` 工具來解析 @提及的正確 URN。

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

Installed? Explore more 寫作與編輯 skills: steipete/notion, langchain-ai/langchain, bytedance/podcast-generation · View all 6 →

在你喜歡的 AI 中提問

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

說明文件

LinkedIn 貼文

使用 Publora MCP 伺服器建立和排程 LinkedIn 貼文。支援純文字貼文、單張圖片、多圖片貼文(網格版面)、影片和 PDF 文件。

前置需求

方案: 可在免費的 Starter 方案上使用。目前的限制和定價:publora.com/pricing。

開始使用

  1. 建立帳戶 於 publora.com/register(免費)
  2. 連接 LinkedIn 透過 Publora 控制台中的 OAuth:Publora Dashboard
  3. 取得 API 金鑰 於 app.publora.com/dashboard/api
  4. 將您的 Agent 連接到 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:

Base 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": ["linkedin-Tz9W5i6ZYG"],
    "content": "您的貼文內容",
    "scheduledTime": "2026-03-25T10:00:00Z"
  }'

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

範例 ID:linkedin-Tz9W5i6ZYG、linkedin-abc123xyz

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

平台限制

功能限制
字元數最多 3,000 字元
「查看更多」前顯示前 210 字元
圖片最多 10 張(網格版面,非可滑動輪播)
圖片大小主要限制為 36,152,320 像素;上限 50 MB
圖片格式JPEG、PNG、GIF、WebP(WebP 會自動轉換)
影片長度30 分鐘
影片大小最多 500 MB
影片格式僅限 MP4

可用工具

create_post

建立新的 LinkedIn 貼文或排程稍後發佈。

參數:

  • platforms:陣列,包含您的 LinkedIn 連線 ID(例如 ["linkedin-abc123"])
  • content:貼文內文(最多 3,000 字元)
  • 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:檔案名稱(例如 "chart.png")
  • contentType:MIME 類型(例如 "image/jpeg"、"video/mp4"、"application/pdf")
  • type:"image" 或 "video"

complete_media

在透過 get_upload_url 上傳檔案(預先簽署的 PUT 成功後)時,完成媒體檔案。選用,因為排程也會自動完成待處理的媒體,但提前呼叫它可以在發佈前提早顯示格式和探測錯誤。對於使用 mediaUrls 附加的媒體則不需要。

參數:

  • mediaId:get_upload_url 回傳的 id

list_connections

列出您已連線的帳戶及其平台 ID。請先呼叫此工具並逐字複製 ID;它們是不可猜測的。

list_posts / get_post / update_post / delete_post

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

提及個人與公司

LinkedIn 貼文支援使用 URN 語法的 @提及:

@{urn:li:person:MEMBER_ID|顯示名稱}       # 提及個人
@{urn:li:organization:ORG_ID|公司名稱}    # 提及公司

範例:

非常感謝 @{urn:li:person:4986615|Serge Bulaev} 在 @{urn:li:organization:107107343|Creative Content Crafts Inc} 的深刻見解!

重要: 顯示名稱必須與 LinkedIn 個人檔案名稱完全相符(區分大小寫),包括公司後綴如 "Inc"、"LLC" 等。

請勿手寫成員 id。 linkedin_list_mentionables MCP 工具可以將名稱解析為正確的 URN;請參閱 linkedin-analytics 技能。

重要 API 限制

  1. 無有機輪播:API 不支援可滑動的多圖輪播(僅限贊助內容)。多圖貼文會以網格版面顯示。

  2. 無混合媒體:無法在同一貼文中組合圖片與影片或文件。

  3. 無 Rich Text:LinkedIn API 不支援粗體、斜體或其他格式。請使用純文字或 Unicode 字元來強調。

  4. 輪播的 PDF 替代方案:若要分享多頁可滑動內容,請改為上傳 PDF 文件。

範例

純文字貼文

排程明天早上 9 點的 LinkedIn 貼文:
「我們很興奮地宣布推出我們的 AI 寫作助手。經過 18 個月的開發,我們已準備好協助團隊更快速地創作出更好的內容。」

含提及的貼文

建立一則提及我們執行長的 LinkedIn 貼文:
「很高興能分享 @{urn:li:person:4986615|Serge Bulaev} 關於 AI 在內容創作未來的深刻見解。」

多圖貼文

建立一則包含 4 張產品截圖的 LinkedIn 貼文,展示我們新的儀表板功能。

注意:圖片將以網格版面顯示,而非可滑動輪播。

PDF 文件貼文

在 LinkedIn 上分享我們的 Q4 報表 PDF,並附上摘要說明。

這是分享多頁輪播式內容的最佳方式。

最佳實踐

  1. 第一行很重要:前 210 字元會顯示在「查看更多」之前,請讓它們引人注目
  2. 最佳長度:少於 1,300 字元的貼文通常表現更好
  3. 發文時間:目標受眾時區的週二至週四早上 8-10 點
  4. 主題標籤:使用 3-5 個相關的主題標籤,它們以純文字形式支援
  5. 互動性:以問句結尾,鼓勵留言

疑難排解

錯誤原因解決方案
「Account not connected」LinkedIn OAuth 已過期在 Publora 控制台中重新連線
「MEDIA_ASSET_PROCESSING_FAILED」檔案過大或格式錯誤檢查:圖片 < 5 MB,影片 < 500 MB MP4
「Rate limited」(429)太多 API 呼叫等待並使用退避方式重試
「Cannot mix media types」同一貼文中包含圖片和影片每個貼文僅使用一種媒體類型
MCP 無法使用伺服器問題使用 REST API 備援方案(見上方)

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/instagram-post

Use when the user wants to post or schedule to Instagram through Publora: a single image, a 2-10 image carousel, a Reel or a Story. Requires a Business account and an image or video; text-only posts are rejected by the API. Not for Threads (use threads-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/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).

相關技能