← Back to Skills Marketplace
renatomaluhy

LinkedIn Automation Enhanced

by Renato Maluhy Bellan · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
72
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install linkedin-automation-enhanced
Description
Automate LinkedIn content creation, posting, engagement tracking, and audience growth. Use for posting content, scheduling posts, analyzing engagement metric...
README (SKILL.md)

LinkedIn Automator

Automate your LinkedIn presence: post content, track engagement, generate ideas, and grow your audience.

Prerequisites

  1. Browser tool enabled in OpenClaw
  2. LinkedIn logged in via browser (use profile with LinkedIn session)

Browser Cleanup Requirement

CRITICAL: All scripts that use openclaw browser commands MUST clean up tabs after execution to prevent accumulation.

Updated Pattern (Selective Cleanup - Baseline Comparison)

This pattern preserves pre-existing tabs and only closes tabs opened during script execution:

# Global variable to store baseline tabs
BASELINE_TABS=""

# Capture baseline BEFORE any browser actions
capture_baseline_tabs() {
    BASELINE_TABS=$(openclaw browser tabs 2>/dev/null | grep -oE '\[t[0-9]+' | sed 's/\[//g' | sort -u || echo "")
}

# Cleanup function - closes ONLY tabs opened during script execution
cleanup_browser_tabs() {
    CURRENT_TABS=$(openclaw browser tabs 2>/dev/null | grep -oE '\[t[0-9]+' | sed 's/\[//g' | sort -u || echo "")
    
    # Find NEW tabs (not in baseline)
    NEW_TABS=$(comm -13 \x3C(echo "$BASELINE_TABS") \x3C(echo "$CURRENT_TABS") 2>/dev/null || echo "")
    
    # Close only new tabs
    echo "$NEW_TABS" | while read TAB_ID; do
        [[ -n "$TAB_ID" ]] && openclaw browser close "$TAB_ID" 2>/dev/null || true
    done
}

# Capture baseline immediately (before first browser command)
capture_baseline_tabs

# Set EXIT trap for cleanup (runs on success or failure)
trap cleanup_browser_tabs EXIT

Benefits of this approach:

  • ✅ Preserves pre-existing tabs from other concurrent processes
  • ✅ Automatically handles auxiliary tabs (reCAPTCHA, blob URLs, etc.)
  • ✅ Works even if script fails mid-execution (EXIT trap)
  • ✅ No need to track individual tab IDs

Legacy Pattern (Label-Based - Still Valid for Simple Cases)

# 1. Label tabs when opening
openclaw browser open --label "my-tab-label" https://...

# 2. Set EXIT trap for cleanup
cleanup_browser_tabs() {
    TABS=$(openclaw browser tabs 2>/dev/null || echo "")
    TAB_ID=$(echo "$TABS" | grep "my-tab-label" | head -1 | sed -n 's/.*\[\(t[0-9]*\).*/\1/p')
    [[ -n "$TAB_ID" ]] && openclaw browser close "$TAB_ID"
}
trap cleanup_browser_tabs EXIT

Use label-based pattern when:

  • Script is simple (1-2 tabs)
  • No concurrent browser usage expected
  • Don't need to handle auxiliary tabs

Pattern for Agent Execution

# After completing browser workflow:
# Find tab by label and close with short ID (e.g., t74)
openclaw browser tabs | grep "my-tab-label" | sed -n 's/.*\[\(t[0-9]*\).*/\1/p' | xargs -I {} openclaw browser close {}

Verify No Accumulation

openclaw browser tabs  # Check tab count before/after runs

Reference Implementation

See scripts/analytics-extract.sh for a complete example with:

  • Baseline capture before first browser command
  • Re-capture after browser auto-start (if needed)
  • Selective cleanup preserving pre-existing tabs
  • Logging and verification

Quick Commands

# Post content (feed post, up to 3,000 chars)
{baseDir}/scripts/post.sh "Your post content here"

# Post with image
{baseDir}/scripts/post.sh "Content" --image /path/to/image.png

# Publish native article (long-form, up to 120,000 words, Google-indexed)
{baseDir}/scripts/article.sh --title "Title" --subtitle "Subtitle" --content "Content" [--cover-image /path/to/image]

# 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

Workflows

Posting Content (Feed Posts)

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]"

Publishing Articles (Native Long-Form)

Use browser automation to publish articles (up to 120,000 words, searchable on Google):

  1. Navigate to linkedin.com/feed
  2. Click "Write article" button (top of feed, near "Start a post")
  3. In the article editor:
    • Enter title
    • Enter subtitle (optional)
    • Write content with rich formatting (H1/H2, bold, lists, images, embeds)
    • Upload cover image (optional)
  4. Click "Publish" button
  5. Article appears in your Activity section permanently

Article vs Post:

Feature Post Article
Length 1,200-3,000 chars 120,000 words
Google-indexed ❌ No ✅ Yes
Lifespan 24-72 hours Permanent
Editor Simple Rich (H1-H6, images, embeds)
Location Feed Activity section

Content Strategy

See references/content-strategy.md for:

  • High-engagement post formats
  • Best posting times by region
  • Hashtag strategies
  • Hook templates

Engagement Automation

See references/engagement.md for:

  • Comment templates
  • Engagement workflows
  • Growth tactics

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

# Posts
Post button: button[aria-label="Start a post"]
Post editor: div.ql-editor[data-placeholder]
Submit post: button.share-actions__primary-action

# Articles
Write article button: button containing "Write article" (top of feed)
Article title: input[placeholder*="title"] or h1[contenteditable]
Article body: div[contenteditable="true"] or div.editor-content
Publish button: button containing "Publish"

# General
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
  • Articles: 1-2 per day recommended
  • Comments: 20-30 per day
  • Connection requests: 100 per week
  • Profile views: Natural browsing pace

Troubleshooting

  • Login required: Ensure browser profile has active LinkedIn session
  • Rate limited: Reduce activity, wait 24h
  • Selector not found: LinkedIn may have updated UI, check selectors
  • Article editor not loading: Try desktop browser (mobile has limited editor support)
  • Tabs accumulating: Scripts use selective cleanup (baseline comparison). If tabs remain:
    # Verify cleanup trap exists in script
    grep "trap cleanup" scripts/analytics-extract.sh
    
    # Check what the script considers "new tabs" (debug)
    # Run this DURING script execution to see baseline vs current
    
    # Manually close LinkedIn-related tabs if needed (use short tab IDs like t74)
    openclaw browser tabs | grep linkedin.com | sed -n 's/.*\[\(t[0-9]*\).*/\1/p' | \
      while read tab; do openclaw browser close "$tab"; done
    
  • Zombie tabs after script run: Script may have crashed before cleanup, OR tabs were pre-existing (preserved by design). Verify:
    # Check if tabs were pre-existing (not script-created)
    openclaw browser tabs
    
    # If truly zombie tabs, close by label pattern
    openclaw browser tabs | grep "linkedin-analytics-tab" | sed -n 's/.*\[\(t[0-9]*\).*/\1/p' | xargs -I {} openclaw browser close {}
    openclaw browser tabs | grep "linkedin-activity-tab" | sed -n 's/.*\[\(t[0-9]*\).*/\1/p' | xargs -I {} openclaw browser close {}
    
    # Nuclear option: Close ALL tabs (use with caution - closes pre-existing too)
    openclaw browser tabs | grep -oE '\[t[0-9]+' | sed 's/\[//g' | while read tab; do openclaw browser close "$tab"; done
    
  • Browser unresponsive: Restart browser (nuclear option):
    openclaw browser stop
    openclaw browser start
    
Usage Guidance
Before installing, make sure you are comfortable with an agent acting through your LinkedIn session. Review every post, article, like, and comment before it goes live, avoid unbounded recurring schedules, remove or fix the hard-coded profile URL, and only configure optional webhooks you control.
Capability Tags
crypto
Capability Assessment
Purpose & Capability
The stated purpose matches LinkedIn posting, analytics, and engagement automation, but the capability includes high-impact public account actions and one analytics script targets a specific hard-coded LinkedIn profile rather than clearly using the current user.
Instruction Scope
The workflows proceed to posting, publishing, liking, commenting, and scheduled posting without an explicit final user approval gate for each public action.
Install Mechanism
There is no install spec and registry requirements declare no binaries or environment variables, while included scripts reference runtime dependencies such as OpenClaw browser, jq, bc, curl, and an optional Discord webhook.
Credentials
Using a logged-in LinkedIn browser session is expected for this purpose, but it gives the skill access to the user's LinkedIn account context and public posting privileges.
Persistence & Privilege
The skill documents recurring cron-based posting, which can continue acting on the user's public LinkedIn account after initial setup unless carefully bounded.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install linkedin-automation-enhanced
  3. After installation, invoke the skill by name or use /linkedin-automation-enhanced
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Enhanced version inspired by linkedin-automation by Zich (BradAI's OpenClaw). Improvements: selective browser tab cleanup, better error handling, production-tested scripts. Original concept by Zich.
Metadata
Slug linkedin-automation-enhanced
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is LinkedIn Automation Enhanced?

Automate LinkedIn content creation, posting, engagement tracking, and audience growth. Use for posting content, scheduling posts, analyzing engagement metric... It is an AI Agent Skill for Claude Code / OpenClaw, with 72 downloads so far.

How do I install LinkedIn Automation Enhanced?

Run "/install linkedin-automation-enhanced" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is LinkedIn Automation Enhanced free?

Yes, LinkedIn Automation Enhanced is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does LinkedIn Automation Enhanced support?

LinkedIn Automation Enhanced is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created LinkedIn Automation Enhanced?

It is built and maintained by Renato Maluhy Bellan (@renatomaluhy); the current version is v1.0.0.

💬 Comments