Post, comment, and react on LinkedIn profiles and company pages...
Create posts, add comments, and react to content on LinkedIn personal profiles and company pages.
Before posting, commenting, or reacting on LinkedIn, you MUST get explicit user confirmation.
When the user asks to post/comment/react:
This applies even when:
Always confirm first. No exceptions.
On first run, the script will guide you through setup. You need to create a LinkedIn OAuth app:
http://localhost (any port is fine)credentials.json in the skill directory:{
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET"
}
Save to: ~/.claude/skills/linkedin-skill/credentials.jsonThen run any command - browser opens, you approve, done.
Note: For posting as an organization, you need Marketing Platform approval for the w_organization_social scope.
# List authenticated accounts
python3 ~/.claude/skills/linkedin-skill/linkedin_skill.py accounts
# Authenticate new account (opens browser)
python3 ~/.claude/skills/linkedin-skill/linkedin_skill.py login [--account LABEL]
# Remove account
python3 ~/.claude/skills/linkedin-skill/linkedin_skill.py logout [--account EMAIL]
# Get your profile info
python3 ~/.claude/skills/linkedin-skill/linkedin_skill.py me [--account LABEL]
# List organizations where you're admin
python3 ~/.claude/skills/linkedin-skill/linkedin_skill.py organizations [--account LABEL]
# Create a post (PUBLIC or CONNECTIONS visibility)
python3 ~/.claude/skills/linkedin-skill/linkedin_skill.py post --text "Your post content" [--visibility PUBLIC|CONNECTIONS] [--author ORG_URN] [--account LABEL]
# List your posts
python3 ~/.claude/skills/linkedin-skill/linkedin_skill.py list-posts [--author URN] [--count N] [--account LABEL]
# Get a specific post
python3 ~/.claude/skills/linkedin-skill/linkedin_skill.py get-post POST_URN [--account LABEL]
# Edit a post's text
python3 ~/.claude/skills/linkedin-skill/linkedin_skill.py edit-post POST_URN --text "New content" [--account LABEL]
# Delete a post
python3 ~/.claude/skills/linkedin-skill/linkedin_skill.py delete-post POST_URN [--account LABEL]
Post visibility options:
PUBLIC - Visible to anyone (default)CONNECTIONS - Visible to connections onlyPosting as organization:
Use --author ORG_URN where ORG_URN is from the organizations command (requires Marketing Platform approval).
# List comments on a post
python3 ~/.claude/skills/linkedin-skill/linkedin_skill.py comments POST_URN [--account LABEL]
# Add a comment to a post
python3 ~/.claude/skills/linkedin-skill/linkedin_skill.py comment POST_URN --text "Your comment" [--account LABEL]
# Reply to a comment
python3 ~/.claude/skills/linkedin-skill/linkedin_skill.py reply COMMENT_URN --text "Your reply" [--account LABEL]
# Delete a comment
python3 ~/.claude/skills/linkedin-skill/linkedin_skill.py delete-comment COMMENT_URN [--account LABEL]
# Add a reaction to a post
python3 ~/.claude/skills/linkedin-skill/linkedin_skill.py react POST_URN --type LIKE [--account LABEL]
# Remove your reaction from a post
python3 ~/.claude/skills/linkedin-skill/linkedin_skill.py unreact POST_URN [--account LABEL]
# List reactions on a post
python3 ~/.claude/skills/linkedin-skill/linkedin_skill.py reactions POST_URN [--account LABEL]
Reaction types:
LIKE - Standard likePRAISE - CelebrateEMPATHY - SupportINTEREST - CuriousAPPRECIATION - InsightfulAdd accounts by using --account flag with a label:
# Authenticate with a label
python3 ~/.claude/skills/linkedin-skill/linkedin_skill.py login --account personal
# Use the labeled account
python3 ~/.claude/skills/linkedin-skill/linkedin_skill.py me --account personal
python3 ~/.claude/skills/linkedin-skill/linkedin_skill.py post --text "Hello!" --account personal
# List all accounts
python3 ~/.claude/skills/linkedin-skill/linkedin_skill.py accounts
Tokens are stored per-account in ~/.claude/skills/linkedin-skill/tokens/
python3 ~/.claude/skills/linkedin-skill/linkedin_skill.py post \
--text "Excited to share our latest research on distributed ML systems. Thread below..." \
--visibility PUBLIC
python3 ~/.claude/skills/linkedin-skill/linkedin_skill.py list-posts --count 5
python3 ~/.claude/skills/linkedin-skill/linkedin_skill.py comment \
"urn:li:share:1234567890" \
--text "Great insights! This aligns with what we've seen at Zerg."
python3 ~/.claude/skills/linkedin-skill/linkedin_skill.py react \
"urn:li:share:1234567890" \
--type LIKE
All commands output JSON for easy parsing.
pip install requestsLinkedIn uses URNs (Uniform Resource Names) to identify entities:
urn:li:person:ABC123urn:li:organization:12345678urn:li:share:1234567890urn:li:comment:(urn:li:activity:1234567890,123456)w_organization_social scope.~/.claude/skills/linkedin-skill/tokens/credentials.json secure - it contains your app secret