kevinbadi/ai-os-skills · Archived

linkedin-post

Post text and optional image content to LinkedIn via browser automation. Use when creating LinkedIn posts, scheduling LinkedIn content, or automating LinkedIn publishing as part of a content pipeline.

First seen Apr 8, 2026

Installation

$ npx skills add kevinbadi/ai-os-skills --skill linkedin-post

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from kevinbadi/ai-os-skills · top by installs.

npx skills add kevinbadi/ai-os-skills

Browse all from kevinbadi/ai-os-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 55
License MIT
Default branch main
Open issues 0
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,534 B
  • docs SUMMARY.md 221 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 5 installs

SKILL.md

LinkedIn Post

Post text + optional image to LinkedIn using CDP browser automation against a logged-in Chrome session.

Prerequisites

  • Clawdbot installed (script auto-starts the browser if not running)
  • Logged into LinkedIn (cookies at cookies/linkedin-zeusbycreatoros.json)
  • ws npm package available

Quick Usage

Text-only post

node skills/linkedin-post/scripts/linkedin-post.js --text "Your post text here"

Text + image post

node skills/linkedin-post/scripts/linkedin-post.js \
  --text "Your post text here" \
  --image /path/to/image.png

Custom CDP port

node skills/linkedin-post/scripts/linkedin-post.js \
  --text "Post text" \
  --cdp-port 18800

Output

  • stdout: Post URL (e.g. https://www.linkedin.com/feed/update/urn:li:share:...) or POSTSUCCESSNO_URL
  • stderr: Progress/error messages
  • Exit 0: Success
  • Exit 1: Error

How It Works

  1. Connects to Chrome via CDP WebSocket
  2. Finds or opens a LinkedIn tab, navigates to feed
  3. Clicks "Start a post" to open the editor dialog
  4. Injects text via innerHTML on LinkedIn's Quill editor (.ql-editor)
  5. If image provided: clicks "Add media", uploads via DOM.setFileInputFiles
  6. Clicks "Post" and waits for success dialog
  7. Extracts and returns the post URL

Formatting Notes

  • Double newlines (\n\n) become separate paragraphs
  • HTML entities are auto-escaped
  • LinkedIn supports emojis natively in post text
  • @mentions in text appear as plain text (not linked mentions) unless LinkedIn auto-resolves them

Cron Automation

To schedule LinkedIn posts via cron, ensure the browser is running and LinkedIn session is active. Example cron job text:

Post to LinkedIn: "Your scheduled content here" with image /path/to/image.png

The agent reads this skill, runs the script, and confirms the post URL.

Troubleshooting

  • Browser won't start: Script auto-starts via clawdbot browser start or the control server at :18791. If both fail, start manually.
  • Not logged in: Re-import cookies or log in manually via browser automation
  • Post button disabled: Text may be empty or image upload failed — check stderr
  • Timeout on selector: LinkedIn UI may have changed — update selectors in script