Skill: mpbshhx/linkedin-automator (version 1.1.0)

--- name: linkedin-automator description: Automate LinkedIn content creation, posting, engagement tracking, and audience growth. Use for posting content, scheduling posts, analyzing engagement metrics, generating content ideas, commenting on posts, and building LinkedIn presence. Requires browser access with LinkedIn logged in. metadata: openclaw: emoji: "💼" requires: tools: - browser --- # LinkedIn Automator Automate your LinkedIn presence: post content, track engagement, generate content ideas, and grow your audience. ## Prerequisites 1. Browser tool enabled in OpenClaw 2. LinkedIn logged in via browser (use profile with active LinkedIn session) ## Quick Commands ```bash # Post content {baseDir}/scripts/post.sh "Your post content here" # Post with image {baseDir}/scripts/post.sh "Content" --image /path/to/image.png # Get engagement stats for recent posts {baseDir}/scripts/analytics.sh # Generate content ideas based on trending topics {baseDir}/scripts/ideas.sh [topic] # Engage with feed (like/comment on relevant posts) {baseDir}/scripts/engage.sh --limit 10 # Schedule a post (requires OpenClaw cron) {baseDir}/scripts/schedule.sh "Your content" --time "09:00" ``` ## Workflows ### Posting Content Use browser automation to post: 1. Navigate to `linkedin.com/feed` 2. Click "Start a post" button 3. Enter content in the post editor 4. Optionally attach media 5. Click "Post" button For scheduled posts, use OpenClaw cron: ``` cron add --schedule "0 9 * * 1-5" --payload "Post my LinkedIn content: [content]" ``` ### Content Strategy See [references/content-strategy.md](references/content-strategy.md) for: - High-engagement post formats and hook templates - Best posting times by region - Hashtag strategies (3-5 tags, mix broad + niche) - The 4-1-1 posting rule ### Engagement Automation See [references/engagement.md](references/engagement.md) for: - Comment templates and reply strategies - Engagement workflows to grow reach - Growth tactics and connection request limits ### Analytics Tracking The analytics script extracts: - Impressions per post - Engagement rate (likes + comments + shares / impressions) - Profile views trend - Follower growth - Top performing content themes ## Browser Selectors Key LinkedIn selectors (as of 2026): ``` Post button: button[aria-label="Start a post"] Post editor: div.ql-editor[data-placeholder] Submit post: button.share-actions__primary-action Like button: button[aria-label*="Like"] Comment button: button[aria-label*="Comment"] Profile stats: section.pv-top-card-v2-ctas ``` ## Rate Limits LinkedIn enforces activity limits. Stay under: - Posts: 2–3 per day max - Comments: 20–30 per day - Connection requests: 100 per week - Profile views: Natural browsing pace only ## Troubleshooting - **Login required**: Ensure browser profile has an active LinkedIn session - **Rate limited**: Reduce activity, wait 24h before resuming - **Selector not found**: LinkedIn may have updated UI — check and update selectors - **Post blocked**: Review LinkedIn content policies; avoid spam-like patterns

path: references/content-strategy.md
content: # LinkedIn Content Strategy Guide

## Post Formats That Work

### 1. The Hook Mastery

First line is everything. LinkedIn truncates after ~140 chars.

**Strong hooks:**
- "I got fired yesterday." (shock)
- "Stop doing [common practice]." (contrarian)
- "The best advice I ignored for 5 years:" (curiosity)
- "This one skill made me $X:" (value)
- "Unpopular opinion:" (debate trigger)

**Weak hooks:**
- "I'm excited to announce..." (corporate)
- "Happy to share..." (generic)
- "Check out this article..." (no value)

### 2. Post Structure

**The Line Break Formula:**
```
Hook line (grab attention)

Short paragraph (context)

• Bullet point 1
• Bullet point 2  
• Bullet point 3

One-liner insight

Call to action or question
```

**Character counts:**
- Ideal post: 1,200-1,500 characters
- Max before "see more": ~140 characters
- Max total: 3,000 characters

### 3. Best Posting Times (UTC)

| Region | Best Times | Best Days |
|--------|-----------|-----------|
| US East | 12:00-14:00 | Tue-Thu |
| US West | 15:00-17:00 | Tue-Thu |
| Europe | 07:00-09:00 | Tue-Wed |
| Asia | 00:00-02:00 | Mon-Wed |

General rule: Post when your audience starts their workday.

### 4. Content Pillars

Choose 3-4 pillars and rotate:

1. **Educational** - Tips, how-tos, frameworks
2. **Personal Stories** - Failures, lessons, wins
3. **Industry Insights** - Trends, analysis, predictions
4. **Engagement Posts** - Questions, polls, debates

Example rotation:
- Monday: Educational
- Wednesday: Personal Story
- Friday: Engagement/Question

### 5. Hashtag Strategy

**Rules:**
- Use 3-5 hashtags
- Place at END of post (not inline)
- Mix reach levels:
  - 1 broad (#leadership - 10M+ followers)
  - 2 medium (#startups - 1M followers)
  - 1-2 niche (#saasfounder - 50K followers)

**Top performing hashtags (2026):**
- #leadership #management #productivity
- #ai #technology #innovation
- #startup #entrepreneur #founder
- #career #hiring #jobsearch
- #marketing #sales #growth

### 6. Content That Gets Shared

**High share triggers:**
- "Save this for later" (utility)
- Controversial takes (debate)
- Data/stats visualized (credibility)
- Templates/frameworks (practical)
- Inspirational stories (emotional)

### 7. The 4-1-1 Rule

For every 6 posts:
- 4 educational/value posts
- 1 soft promotion (case study, achievement)
- 1 hard promotion (product, service, hiring)

Never go full promo. Value first, always.

## Engagement Multipliers

### Reply to Every Comment

Replies within 1 hour = 2x reach.
Ask follow-up questions to keep threads going.

### Tag Strategically

- Tag 1-2 people max
- Only tag if genuinely relevant
- "cc @person who wrote about this"

### Cross-Promote

- Share LinkedIn posts to Twitter/X
- Repurpose top posts into threads
- Turn comments into new posts


path: references/engagement.md
content: # LinkedIn Engagement & Growth Tactics

## The Engagement Algorithm

LinkedIn rewards:
1. **Dwell time** - How long people read your post
2. **Early engagement** - Likes/comments in first hour
3. **Comments over likes** - Comments weighted 10x
4. **Replies to comments** - Keeps post in feeds longer
5. **Saves** - Signals high value

## Comment Strategy

### Quality Over Quantity

One thoughtful comment > 10 "Great post!" comments.

**High-value comment formula:**
```
[Agreement/Acknowledgment] + [Your perspective/experience] + [Question or extension]
```

**Examples:**

For a post about leadership:
> "This hits different after managing remote teams. I found [specific technique] helped bridge the connection gap. Curious - do you think this applies differently for global teams across time zones?"

For a post about career advice:
> "Wish I'd heard this 5 years ago. The 'say yes to everything' phase nearly burned me out. Now I use a simple filter: Does this align with my 3-year goal? If not, it's a no. What criteria do you use?"

### Comment Timing

- **Golden hour**: Comment within 60 min of posting
- **Best targets**: Posts with 5-50 comments (not viral yet, not dead)
- **Engage up**: Comment on people 1-2 levels above you

## Connection Growth

### Warm Outreach

Never send blank connection requests.

**Template:**
```
Hey [Name], 

Loved your post about [topic] - especially [specific point]. 

I'm [brief who you are] and we share interest in [overlap].

Would love to connect and follow your content.

[Your name]
```

### Connection Request Limits

- 100 requests/week (soft limit)
- 200 requests/week (LinkedIn warning)
- 300+ requests/week (restriction risk)

Space out: 20-30 per day max.

### Who to Connect With

**High value:**
- People who engage with similar content
- 2nd connections from target accounts
- Event attendees, group members
- People who commented on competitor posts

**Low value:**
- Random salespeople
- 0 activity accounts
- Far outside your industry

## Engagement Pods (Use Carefully)

Small groups that mutually engage on each other's posts.

**Rules if using:**
- Keep it small (5-10 people)
- Same industry/niche
- Genuine comments only
- Don't engage within 5 min of posting (looks fake)
- Mix pod engagement with organic

**Risk:** LinkedIn may detect and reduce reach.

## Profile Optimization for Growth

### Headline Formula
```
[What you do] | [Who you help] | [Result you create]
```
Example: "Founder @ StartupX | Helping B2B SaaS scale from $1M-$10M ARR | 3x exits"

### Featured Section
Pin your best:
- Top performing posts
- Lead magnet / newsletter signup
- Portfolio pieces
- Media appearances

### Creator Mode
Turn ON for:
- Follow button (vs Connect)
- Featured hashtags
- LinkedIn Live access
- Newsletter feature

## Weekly Engagement Routine

| Day | Activity | Time |
|-----|----------|------|
| Daily | 15-20 comments on feed | 30 min |
| Daily | Reply to all comments on your posts | 15 min |
| Mon/Wed/Fri | Post content | 15 min |
| Tue/Thu | Send connection requests | 15 min |
| Sunday | Review analytics, plan week | 30 min |

Total: ~1 hour/day for serious growth.

## Metrics to Track

Weekly:
- Impressions (reach)
- Engagement rate (engagement/impressions)
- Profile views
- Follower growth
- Connection acceptance rate

Monthly:
- Top performing posts
- Best posting times
- Content themes that work
- DM conversations started


path: scripts/analytics.sh
content: #!/bin/bash
# LinkedIn Analytics Script
# Usage: ./analytics.sh [--days 7]

DAYS="${1:-7}"

cat << EOF
📊 LINKEDIN ANALYTICS WORKFLOW
═══════════════════════════════════════

Fetch engagement data for the last $DAYS days.

Steps to execute via browser tool:

1. Navigate to https://www.linkedin.com/analytics/creator/

2. Extract dashboard metrics:
   - Impressions (total views)
   - Engagements (likes + comments + shares)
   - Profile views
   - Follower count
   - Search appearances

3. Navigate to posts section to get per-post stats:
   - URL: https://www.linkedin.com/in/me/recent-activity/all/
   - For each post, extract:
     - Post date
     - Impressions
     - Reactions count
     - Comments count
     - Reposts count

4. Calculate metrics:
   - Engagement rate = (reactions + comments + reposts) / impressions * 100
   - Average engagement per post
   - Best performing post (highest engagement rate)
   - Best posting time (based on top performers)

5. Return structured data:
   {
     "period": "$DAYS days",
     "totalImpressions": <number>,
     "totalEngagements": <number>,
     "engagementRate": "<percentage>",
     "followerChange": "<+/- number>",
     "topPost": {
       "content": "<preview>",
       "impressions": <number>,
       "engagementRate": "<percentage>"
     },
     "posts": [...]
   }

💡 Tip: Run weekly to track trends
EOF


path: scripts/engage.sh
content: #!/bin/bash
# LinkedIn Engagement Automation
# Usage: ./engage.sh [--limit 10] [--topic keyword]

LIMIT="${1:-10}"
TOPIC="${2:-}"

cat << EOF
🤝 LINKEDIN ENGAGEMENT WORKFLOW
═══════════════════════════════════════

Engage with $LIMIT posts in your feed.

## Workflow Steps (via browser):

1. Navigate to https://www.linkedin.com/feed/

2. Scroll through feed and identify high-quality posts:
   - From people in your network
   - Related to your industry/interests
   $([ -n "$TOPIC" ] && echo "- Containing keyword: $TOPIC")

3. For each qualifying post (up to $LIMIT):

   a) **Like the post** (always do this)
      - Click the Like button (thumbs up)
      - Or use reactions: Celebrate 🎉, Love ❤️, Insightful 💡
   
   b) **Leave a thoughtful comment** (on best posts)
      - Add value, not just "Great post!"
      - Ask a question
      - Share your experience
      - Disagree respectfully (engagement gold)

4. Track engagement:
   - Note who you engaged with
   - They'll likely reciprocate
   - Builds algorithm favor for your content

## Comment Templates:

**Adding perspective:**
"This resonates. In my experience, [related insight]. Have you found [question]?"

**Respectful disagreement:**
"Interesting take. I'd push back slightly on [point] because [reason]. What do you think about [alternative]?"

**Asking questions:**
"Love this. Curious - how did you handle [specific challenge] when [scenario]?"

**Sharing experience:**
"Went through something similar. The game-changer for me was [insight]. [Brief elaboration]."

## Best Practices:

✅ Engage with posts 1-3 hours old (algorithm boost)
✅ Mix reactions (don't just Like everything)
✅ Comment on posts from people slightly ahead of you
✅ Reply to comments on your own posts within 1 hour
✅ Engage before AND after posting your own content

❌ Don't comment "Great post!" (looks like a bot)
❌ Don't mass-like 50 posts in 2 minutes
❌ Don't only engage with huge accounts
❌ Don't copy-paste the same comment

## Rate Limits:
- Comments: 20-30/day max
- Likes: 100/day max
- Space out over several hours
EOF


path: scripts/ideas.sh
content: #!/bin/bash
# LinkedIn Content Ideas Generator
# Usage: ./ideas.sh [topic]

TOPIC="${1:-general}"

cat << EOF
💡 LINKEDIN CONTENT IDEAS: $TOPIC
═══════════════════════════════════════

Generate content ideas based on high-performing formats.

## Research Steps (via browser):

1. Check trending topics:
   - https://www.linkedin.com/news/
   - Extract top 5 trending stories in your industry

2. Analyze competitor content:
   - Visit top creators in your niche
   - Note their most engaged posts (sort by reactions)
   - Identify patterns in hooks, formats, topics

3. Check hashtag performance:
   - Search relevant hashtags (#${TOPIC}, #leadership, #tech, etc.)
   - Note which posts get high engagement

## High-Engagement Post Formats:

📌 **The Contrarian Take**
"Unpopular opinion: [controversial but defensible stance]"
→ Drives comments and debate

📌 **The Story Arc**
"3 years ago, I [struggle]. Today, I [success]. Here's what changed:"
→ Personal stories get 3x engagement

📌 **The List Post**
"10 [lessons/tips/tools] I wish I knew [timeframe] ago:"
→ Easy to consume, high saves

📌 **The Before/After**
"Before: [old way]. After: [new way]. The difference? [insight]"
→ Clear transformation narrative

📌 **The Question Hook**
"What's the one skill that changed your career?"
→ Drives comments

📌 **The Hot Take + Data**
"[Bold claim]. Here's the data: [stats]"
→ Credibility + controversy

## Content Calendar Template:

| Day | Format | Topic |
|-----|--------|-------|
| Mon | Story | Personal lesson |
| Wed | List | Industry tips |
| Fri | Engagement | Question/poll |

## Hashtag Strategy for $TOPIC:

Primary (high reach): #${TOPIC} #innovation #leadership
Secondary (niche): #startup #founder #growthmindset  
Branded: #YourCompanyName

Use 3-5 hashtags per post. Place at end.
EOF


path: scripts/post.sh
content: #!/bin/bash
# LinkedIn Post Script
# Usage: ./post.sh "Your content here" [--image /path/to/image]

set -e

CONTENT="$1"
IMAGE=""

# Parse arguments
shift
while [[ $# -gt 0 ]]; do
    case $1 in
        --image)
            IMAGE="$2"
            shift 2
            ;;
        *)
            shift
            ;;
    esac
done

if [ -z "$CONTENT" ]; then
    echo "Usage: ./post.sh \"Your content here\" [--image /path/to/image]"
    exit 1
fi

# Output instructions for the agent to execute via browser tool
cat << EOF
📝 LINKEDIN POST WORKFLOW
═══════════════════════════════════════

Content to post:
---
$CONTENT
---

Steps to execute via browser tool:

1. Navigate to https://www.linkedin.com/feed/

2. Wait for page load, then click "Start a post" button:
   - Selector: button[class*="share-box-feed-entry__trigger"]
   - Or look for text "Start a post"

3. In the modal, enter the content in the editor:
   - Selector: div.ql-editor[data-placeholder]
   - Type the content

4. $([ -n "$IMAGE" ] && echo "Click the image icon and upload: $IMAGE" || echo "No image to attach")

5. Click the "Post" button:
   - Selector: button.share-actions__primary-action
   - Or button with text "Post"

6. Wait for confirmation (post appears in feed)

⚠️  Rate limit: Max 2-3 posts per day
EOF


path: scripts/schedule.sh
content: #!/bin/bash
# LinkedIn Post Scheduler
# Usage: ./schedule.sh "content" "2026-01-31 09:00" [--image /path/to/image]

CONTENT="$1"
SCHEDULE_TIME="$2"
IMAGE=""

shift 2
while [[ $# -gt 0 ]]; do
    case $1 in
        --image)
            IMAGE="$2"
            shift 2
            ;;
        *)
            shift
            ;;
    esac
done

if [ -z "$CONTENT" ] || [ -z "$SCHEDULE_TIME" ]; then
    echo "Usage: ./schedule.sh \"content\" \"YYYY-MM-DD HH:MM\" [--image /path/to/image]"
    exit 1
fi

cat << EOF
📅 LINKEDIN SCHEDULED POST
═══════════════════════════════════════

Schedule: $SCHEDULE_TIME (UTC)

Content:
---
$CONTENT
---
$([ -n "$IMAGE" ] && echo "Image: $IMAGE")

## To schedule in OpenClaw:

Use the cron tool with an "at" schedule:

\`\`\`json
{
  "schedule": {
    "kind": "at",
    "atMs": <timestamp_for_$SCHEDULE_TIME>
  },
  "payload": {
    "kind": "systemEvent",
    "text": "Post to LinkedIn now: $CONTENT"
  },
  "sessionTarget": "main"
}
\`\`\`

Or use cron expression for recurring posts:
- Daily at 9am: "0 9 * * *"
- Weekdays at 9am: "0 9 * * 1-5"  
- Mon/Wed/Fri at 2pm: "0 14 * * 1,3,5"

## Quick Setup

Convert your desired time to Unix milliseconds:
\`date -d "$SCHEDULE_TIME" +%s000\`

Then create the cron job via the OpenClaw cron tool.

💡 Tip: Keep a content calendar in a file and schedule a week at a time.
EOF


path: _meta.json
content: ownerId: kn78ftsr6trhzdv8byq4yv2x4s808pf4
slug: linkedin-automation
version: 1.0.0
publishedAt: 1769856129853

Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (HIGH)