360 Secure SkillHub
360 安全技能中心

Linkedin AI Post Builder and Publisher

通过命令行脚本向 LinkedIn 发布动态(默认仅预览,需确认后发布),读取本地历史记录并获取帖子统计数据,还可调用 Gemini 将草稿与热门内容对比给出优化建议。需配置 OAuth 凭据、访问令牌和 API 密钥。

yadavabhijeet4
yadavabhijeet4
热度 55.29
最近更新 2026-05-11 17:30:39
分类:营销依赖:代码执行 / 第三方 API / 读写文件 / 内部调用大模型应用场景:社交媒体 / 文案创作 / 报告撰写 / 市场分析

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add linkedin-ai-optimizer
Metadata
name
linkedin
description
Post updates to LinkedIn, track analytics, and optimize content.

LinkedIn Skill

Post updates, track performance, and optimize your content for maximum reach.

Setup & Authentication

  1. Create an App: Go to LinkedIn Developers, create an app, and add the "Sign In with LinkedIn" and "Share on LinkedIn" products.
  2. Generate Token: Use the included helper script to generate an OAuth 2.0 Access Token.
    # Set your credentials
    export LINKEDIN_CLIENT_ID="your_client_id"
    export LINKEDIN_CLIENT_SECRET="your_client_secret"
    export LINKEDIN_REDIRECT_URI="http://localhost:8000/callback"
    
    # Run the auth helper
    uv run /opt/homebrew/lib/node_modules/openclaw/skills/linkedin/scripts/linkedin_auth.py
    
  3. Save Token: Save the generated token as LINKEDIN_ACCESS_TOKEN in your environment.

Usage

1. Optimize & Feedback Loop (New!)

Analyze your draft against top-performing posts before you publish. Requires GEMINI_API_KEY.

uv run /opt/homebrew/lib/node_modules/openclaw/skills/linkedin/scripts/linkedin_feedback.py "Your draft text here..."

2. Posting

Preview (Default):

uv run /opt/homebrew/lib/node_modules/openclaw/skills/linkedin/scripts/linkedin.py "Your post text"

Publish:

uv run /opt/homebrew/lib/node_modules/openclaw/skills/linkedin/scripts/linkedin.py "Your post text" --confirm

3. Analytics

View Stats: Reads from linkedin_history.jsonl and fetches current stats (Requires r_member_social).

uv run /opt/homebrew/lib/node_modules/openclaw/skills/linkedin/scripts/linkedin_analytics.py

Configuration

  • LINKEDIN_ACCESS_TOKEN: Valid OAuth 2.0 Access Token.
  • GEMINI_API_KEY: Required for the Feedback Loop/Optimizer.