Community研究與資料分析github.com

publora/linkedin-analytics

分析 LinkedIn 表現並透過 Publora 管理互動。當使用者詢問 LinkedIn 貼文或帳號的表現(曝光、觸及、反應、留言、分享、粉絲成長)或想要進行反應、留言、分享、處理 @提及時使用。統計數據透過 REST API 取得,互動則透過 MCP 工具處理。不適用於建立貼文(請使用 linkedin-post)。

linkedin-analytics 是什麼?

此技能(publora/linkedin-analytics)整合了 Publora 平台,讓 AI 代理能全面分析 LinkedIn 貼文與個人檔案表現,並直接互動。它透過 REST API 提供詳細的數據分析,包含貼文層級的曝光、觸及人數、反應、留言、分享等指標,以及帳號層級的彙總數據和粉絲成長趨勢。此外,它利用 MCP 工具實現自動化互動,例如對貼文按讚、表達支持、發送留言、進行分享,以及查詢 @提及對應的 URN,從而節省手動操作時間。此技能支援 Claude Code、Claude Desktop、Cursor、Codex 等主流開發工具,使用前需在 Publora 進行免費註冊、透過 OAuth 連結 LinkedIn 帳號,並取得 API 金鑰進行 MCP 伺服器設定。若 MCP 伺服器無法使用,可直接使用 REST API 作為備援方案,所有請求均需透過專屬的 x-publora-key 標頭進行驗證。

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

Installed? Explore more 研究與資料分析 skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

在你喜歡的 AI 中提問

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

說明文件

LinkedIn Analytics

追蹤您的 LinkedIn 貼文與個人檔案的曝光、互動與粉絲成長,並透過反應、留言與分享與貼文互動。統計數據來自 REST API;反應、留言、分享與提及查詢則為 MCP 工具。

先決條件

方案: 適用於免費的 Starter 方案。目前限制與定價:publora.com/pricing

開始使用

  1. 建立帳戶:前往 publora.com/register(免費)
  2. 連結 LinkedIn:在 Publora Dashboard 透過 OAuth 連結
  3. 取得 API 金鑰:前往 app.publora.com/dashboard/api
  4. 將您的代理連接到 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 連接器各自需要不同的設定檔或流程:請參閱 client setup 以取得確切路徑與程式碼片段。

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/linkedin-post-statistics" \
  -H "x-publora-key: sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "platformId": "linkedin-abc123",
    "postedId": "urn:li:share:7123456789012345678",
    "queryTypes": "ALL"
  }'

# 取得帳號統計資料
curl -X POST "https://api.publora.com/api/v1/linkedin-account-statistics" \
  -H "x-publora-key: sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "platformId": "linkedin-abc123",
    "queryTypes": "ALL"
  }'

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

範例 ID:linkedin-Tz9W5i6ZYG、linkedin-abc123xyz

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

分析工具(僅限 REST)

LinkedIn 分析數據並非以 MCP 工具的形式提供。MCP 伺服器負責發文、媒體及 LinkedIn 互動工具;統計數據僅存於 REST API,因此請直接使用 x-publora-key 標頭呼叫這些端點。向代理要求 linkedin_post_stats MCP 工具將會失敗:沒有此工具。

POST /linkedin-post-statistics

單一貼文的互動指標。

請求主體:

  • platformId:平台連線 ID(例如 linkedin-abc123),來自 list_connections
  • postedId:貼文 URN(urn:li:share:... 或 urn:li:ugcPost:...)
  • queryTypes(可選):IMPRESSION、MEMBERS_REACHED、RESHARE、REACTION、COMMENT 或 ALL

回傳: 曝光數、不重複曝光數(觸及的會員數)、反應數、留言數、分享數,以及一個 cached 標記,用於指示數字是否來自快取。

POST /linkedin-account-statistics

帳號的彙總統計資料。

請求主體: platformId、可選的 queryTypes、可選的 aggregation(DAILY 或 TOTAL,預設為 TOTAL)。

POST /linkedin-followers

粉絲數或隨時間的成長趨勢。

請求主體: platformId、可選的 period(lifetime 或 daily)、可選的 dateRange({start: {year, month, day}, end: {year, month, day}})。

POST /linkedin-profile-summary

整合的個人檔案概覽:粉絲數加上統計資料。

請求主體: platformId、可選的 dateRange。

curl -X POST "https://api.publora.com/api/v1/linkedin-post-statistics" \
  -H "x-publora-key: sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"platformId": "linkedin-abc123", "postedId": "urn:li:share:7123456789012345678", "queryTypes": "ALL"}'

互動工具

linkedin_create_reaction

對 LinkedIn 貼文做出反應。

參數:

  • postedId:LinkedIn 貼文 URN
  • platformId:平台連線 ID
  • reactionType:下列其中一種:
類型說明
LIKE標準的讚
PRAISE鼓掌 / 讚賞
EMPATHY愛心 / 關懷
INTEREST燈泡 / 有見地
APPRECIATION支持
ENTERTAINMENT有趣 / 大笑

linkedin_delete_reaction

移除您對貼文的反應。

參數:

  • postedId:LinkedIn 貼文 URN
  • platformId:平台連線 ID

linkedin_create_comment

在 LinkedIn 貼文上留言(最多 1,250 個字元)。

參數:

  • postedId:LinkedIn 貼文 URN
  • platformId:平台連線 ID
  • message:留言內容(最多 1,250 個字元)
  • parentComment(可選):用於回覆的留言 URN

linkedin_delete_comment

移除您發佈的留言。

參數:

  • postedId:LinkedIn 貼文 URN
  • commentId:留言 URN 或數字 ID
  • platformId:平台連線 ID

linkedin_create_reshare

分享現有的貼文,可選擇加上評論。

參數:

  • platformId:平台連線 ID
  • parent:要分享的貼文,格式為分享 URN(urn:li:share:... 或 urn:li:ugcPost:...)。請注意名稱:此工具使用 parent,而不是如反應和留言工具那樣的 postedId。
  • commentary(可選):分享時附加的文字,最多 3,000 個字元
  • visibility(可選):PUBLIC 或 CONNECTIONS,預設為 PUBLIC。CONNECTIONS 適用於個人帳號。

注意:LinkedIn 動態消息網址中包含 activity 編號,這通常與分享編號不同。請使用 get_post 回傳的 postedId,而不是自行轉換的 activity 編號。

linkedin_list_mentionables

將名稱解析為 @提及所需的 URN,讓您無需手動查找成員 ID。

參數:

  • q(可選):要搜尋的名稱
  • limit(可選):回傳的結果數量

兩個參數皆為選填,且此工具不需要 platformId:它會搜尋整個帳號,而非單一連線。

範例提示

每週表現回顧

分析我過去 7 天的 LinkedIn 表現。
請告訴我:
1. 哪些貼文表現最佳
2. 我的互動率趨勢
3. 粉絲成長情況
4. 改善建議

貼文分析

取得我最近 5 篇 LinkedIn 貼文的詳細統計資料,並找出哪些內容能引起觀眾共鳴的模式。

互動活動

對我同事關於晉升的貼文(urn:li:share:123456)給予 PRAISE 反應,並加上一段祝賀留言。

粉絲追蹤

顯示我過去 30 天的 LinkedIn 粉絲成長情況。我每週增加了多少新粉絲?

指標參考

指標說明
IMPRESSION內容在動態消息中出現的總次數
MEMBERS_REACHED看到貼文的不重複 LinkedIn 會員數
RESHARE轉發/分享的次數
REACTION反應總數(所有類型合計)
COMMENT留言數

互動率基準

按粉絲數分類的平均 LinkedIn 互動率:

粉絲數良好互動率
< 5K3-5%
5K-50K2-3%
50K+1-2%

表現良好的貼文通常具有:

  • 平均曝光數的 2 倍
  • 留言對反應比例高於 10%
  • 互動率高於您的基準線

重要注意事項

  1. 分析延遲:LinkedIn 分析數據可能需要最多 24 小時才能完全產生。發文後立即查詢只會得到部分資料。

  2. URN 格式:LinkedIn 網址使用 urn:li:activity:xxx,但 API 要求使用 urn:li:share:xxx 或 urn:li:ugcPost:xxx。請使用 Publora 的 get_post 回應中的 postedId 以取得準確的 URN。

  3. 快取:分析回應可能會被快取。回應中包含一個 cached 欄位,用來指示資料是否來自快取。

  4. 速率限制:LinkedIn 每小時約有 200 多次 API 呼叫。遇到 429 錯誤時請實施指數退避策略。

故障排除

錯誤原因解決方案
"Platform ID not found"無效的連線 ID執行 list_connections 以取得有效的 ID
"Post not found"錯誤的 URN 格式使用 urn:li:share: 或 urn:li:ugcPost: 格式
429 Too Many Requests達到速率限制等待後並使用指數退避重試
"message cannot exceed 1250 characters"留言過長將留言縮短至 1,250 個字元以內

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-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).

相關技能