Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

linkedin-cdp

БесплатноБез исполняемых скриптовНе проверен

LinkedIn CDP: Input-only automation (mouse, keyboard, screenshots). Zero DOM access.

aAAaqwqот aAAaqwq★ 123 звезды на GitHub

Об этом скилле

LinkedIn CDP Automation

LinkedIn automation via Chrome DevTools Protocol. Input-only (mouse/keyboard/screenshots). Zero DOM access.

When to use

  • "collect messages from linkedin" -> LinkedInMessages
  • "who messaged me on linkedin" -> LinkedInMessages
  • "write on linkedin" -> LinkedInMessages.send_message()
  • "find on linkedin" -> LinkedInSearch
  • "view profile" -> LinkedInProfile
  • "send connection request" -> LinkedInConnect
  • "show connection requests" -> LinkedInConnect.screenshot_invitations()

Dependencies

  • External: Chrome, pip install websocket-client requests
  • Chrome must run with --remote-debugging-port=9222 (separate instance)

Paths

What Path
Script $HOME/linkedin-cdp/linkedin_cdp.py
Modules $HOME/linkedin-cdp/linkedin_*.py
Rate limiter $HOME/linkedin-cdp/rate_limiter.py
Screenshots /tmp/li_screenshots/shot_*.jpg

How to execute

Step 0: Chrome Launch

IMPORTANT: Use the binary path directly, NOT open -a 'Google Chrome'. open -a on macOS opens a tab in existing Chrome instead of a separate instance.

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
  --remote-debugging-port=9222 \
  '--remote-allow-origins=*' \
  --user-data-dir="$HOME/chrome-debug-profile" \
  "https://www.linkedin.com" > /dev/null 2>&1 &

Run in background (run_in_background: true), then verify:

sleep 3 && curl -s "http://localhost:9222/json/version"
  • --user-data-dir MUST differ from user's main Chrome profile
  • $HOME/chrome-debug-profile persists login session between runs
  • Don't connect CDP while user logs in. Wait for login to complete.

Step 1: Calibration (REQUIRED on first run per session)

Every session may have different window size / DPR. On first run, take a calibration screenshot and determine the coordinate mapping:

import sys, subprocess, time
sys.path.insert(0, '$HOME/linkedin-cdp')
from linkedin_cdp import LinkedInBot

bot = LinkedInBot()
bot.connect()

# Take calibration screenshot — returns file path
path = bot.take_screenshot()
print(path)  # /tmp/li_screenshots/shot_0001.jpg

# Get image dimensions to determine DPR
result = subprocess.run(['sips', '-g', 'pixelWidth', '-g', 'pixelHeight', path],
                       capture_output=True, text=True)
print(result.stdout)
bot.close()

Then read the calibration screenshot with Read tool. Calculate:

  • DPR = image_width / expected_viewport_width (typically 2 on Retina Mac)
  • CSS coordinates = image_pixel_coordinates / DPR

Store the DPR for all subsequent coordinate calculations in this session.

Step 2: Coordinate System

All click_at(), _click() calls use CSS coordinates, not image pixels.

Formula: CSS_coord = image_pixel_coord / DPR

Typical Retina Mac (DPR=2, viewport ~1531x801):

  • Screenshot: 3062x1602 pixels
  • To click where you see something at image pixel (600, 400): click CSS (300, 200)

Step 3: Use modules

import sys
sys.path.insert(0, '$HOME/linkedin-cdp')
from linkedin_cdp import LinkedInBot

bot = LinkedInBot()
bot.connect()

# All actions use CSS coordinates
bot.click_at(x, y)        # click + screenshot
bot.type_text("text")      # type with human-like delays
bot.scroll_wheel(delta_y=500)  # scroll (keyword arg only!)
bot.take_screenshot()      # returns file path (JPEG)
bot.navigate_to(url)       # navigate + auto reconnect
bot.reconnect_to_tab()     # reconnect WebSocket after page change
bot.close()

Known Fixed Coordinates (DPR=2, viewport ~1531x801)

These modal/dialog coordinates are consistent across sessions at the same viewport size. Recalibrate if window size changes.

Connection Request Modal

After clicking "Connect" on a profile:

Element CSS (x, y) Notes
"Add a note" button (751, 239) White/outline button
"Send without a note" button (911, 239) Blue button
Note text field (click to focus) (752, 259) After clicking "Add a note"
"Send" button (with note) (968, 393) Blue, active after typing
"Cancel" button (889, 393)

Profile Page

Element CSS (x, y) Notes
"Connect" button (~270, 467-499) y varies by profile layout (banner height, etc.)
"Message" button (~383, 467-499) Next to Connect

Messaging Page

/messaging/ — conversation list on left, active thread on right.

Element CSS (x, y) Notes
"Write a message..." text field (715, 604) Click to focus, then type_text()
Send button (885, 724) Active (blue) only after typing

Invitation Manager

/mynetwork/invitation-manager/ — lists received/sent invitations.

Element CSS (x, y) Notes
"Accept" button (first invite) (~920, 274) Approximate — verify via screenshot
"Ignore" button (first invite) (~838, 274) Next
Полный SKILL.md на GitHub

Установить linkedin-cdp в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл linkedin-cdp?

LinkedIn CDP: Input-only automation (mouse, keyboard, screenshots). Zero DOM access.

Как установить скилл linkedin-cdp?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл linkedin-cdp запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить linkedin-cdp с