social-media-poster
4
总安装量
4
周安装量
#53850
全站排名
安装命令
npx skills add https://github.com/agentiveau/myagentive --skill social-media-poster
Agent 安装分布
mcpjam
4
iflow-cli
4
replit
4
junie
4
windsurf
4
zencoder
4
Skill 文档
Social Media Poster
Post content to LinkedIn and Twitter/X from the command line. Supports posting to individual platforms or all platforms simultaneously.
When to Use This Skill
Use this skill when the user requests:
- Posting content to LinkedIn
- Posting content to Twitter/X
- Sharing updates on social media
- Creating posts with images or videos
- Cross-posting to multiple platforms
Supported Platforms
| Platform | Script | Features |
|---|---|---|
linkedin_poster.py |
Text, images (up to 9), videos, links with previews | |
| Twitter/X | twitter_poster.py |
Text, images (up to 4), videos, threads |
| All | post_all.py |
Post to all platforms in parallel |
Quick Usage
Post to All Platforms
cd ~/.claude/skills/social-media-poster
source venv/bin/activate
python scripts/post_all.py -t "Your post content" -i "./image.jpg" -u "https://example.com"
Post with Video
python scripts/post_all.py -t "Check out this video!" -v "./video.mp4"
Post with Multiple Images
python scripts/post_all.py -t "Photo gallery!" -i "./img1.jpg" -i "./img2.jpg" -i "./img3.jpg"
Post to LinkedIn Only
python scripts/linkedin_poster.py -t "Post text" -i "./image.jpg" -u "https://link.com" --title "Link Title"
Post to Twitter/X Only
python scripts/twitter_poster.py -t "Tweet text" -i "./image.jpg"
Note: Long-form posts are supported by default (for premium accounts). Use --truncate flag for non-premium accounts (280 char limit).
Creating Posts Workflow
When creating posts for the user:
-
Craft platform-appropriate content
- LinkedIn: Professional tone, longer form, more hashtags acceptable
- Twitter: Same content works for premium accounts (long-form supported)
-
Handle media attachments
- Images: Use
-iflag (can be used multiple times for multiple images) - Videos: Use
-vflag (supports MP4, MOV, AVI, WebM) - LinkedIn supports up to 9 images per post
- Twitter supports up to 4 images per tweet
- Images: Use
-
Include relevant elements
- Hashtags for discoverability
- Links to referenced content
- Images/videos for engagement
-
Post to platforms
- Use
post_all.pyfor simultaneous posting - Use individual scripts when content differs significantly between platforms
- Use
Command Reference
post_all.py
--text, -t Post content (required)
--image, -i Path to image file (can use multiple times)
--video, -v Path to video file
--url, -u URL to include
--title Title for link/image/video
--platforms, -p Specific platforms: linkedin twitter
--sequential Post one at a time instead of parallel
linkedin_poster.py
--text, -t Post content (required)
--image, -i Path to image file (can use multiple times)
--video, -v Path to video file
--url, -u URL for link preview
--title Title for link/image/video
--description Description for link/image/video
twitter_poster.py
--text, -t Tweet content (required)
--image, -i Path to image (can use multiple times, max 4)
--video, -v Path to video file
--truncate Truncate to 280 chars (for non-premium accounts)
Video Upload Details
LinkedIn Video Requirements
- Format: MP4 only
- Size: 75 KB to 500 MB
- Length: 3 seconds to 30 minutes
- Process: Chunked upload with automatic processing
Twitter Video Requirements
- Format: MP4, MOV, AVI, WebM
- Size: Up to 512 MB
- Length: Up to 2 minutes 20 seconds (140 seconds)
- Process: Chunked upload with async processing
Video Upload Process
The scripts handle video uploads automatically:
- Initialize upload with file size
- Upload in chunks (4MB for LinkedIn, 1MB for Twitter)
- Finalize and wait for processing
- Create post with processed video
First-Time Setup
For initial setup, refer to references/setup.md for detailed instructions on:
- Creating LinkedIn Developer App
- Creating Twitter/X Developer Account
- Obtaining API credentials
- Configuring the
.envfile
Environment Variables
The scripts require these environment variables in a .env file:
# LinkedIn
LINKEDIN_CLIENT_ID=
LINKEDIN_CLIENT_SECRET=
LINKEDIN_ACCESS_TOKEN=
# Twitter/X
TWITTER_API_KEY=
TWITTER_API_SECRET=
TWITTER_ACCESS_TOKEN=
TWITTER_ACCESS_TOKEN_SECRET=
TWITTER_BEARER_TOKEN=
Platform Limitations
- Access token expires in ~60 days (run
get_token.pyto refresh) - Requires “Share on LinkedIn” product approval
- Video processing may take 1-5 minutes
Twitter/X
- Free tier: 1,500 tweets/month limit
- Basic tier ($100/mo): 3,000 tweets/month
- Requires OAuth 1.0a with Read+Write permissions
- Video processing is async (longer videos take more time)
Resources
scripts/
linkedin_poster.py– Post to LinkedIn (text, images, videos, links)twitter_poster.py– Post to Twitter/X (text, images, videos)post_all.py– Post to all platformsget_token.py– LinkedIn OAuth token helperrequirements.txt– Python dependencies
references/
setup.md– Detailed setup instructions for both platforms