LinkedIn automation via the Linked API CLI - fetch profiles, search people and companies, send messages, manage connections, create posts, react, comment, and…
от bobmatnyc★ 79 звёзд на GitHubОб этом скилле
LinkedIn - Linked API Automation CLI
Overview
linkedin is a CLI tool for LinkedIn automation built on Linked API. Use it to fetch profiles, search people and companies, send messages, manage connections, create posts, react, comment, and run Sales Navigator and custom workflows.
Each command sends a request to Linked API, which runs a real cloud browser to perform the action on LinkedIn. Operations are not instant - expect 30 seconds to several minutes depending on complexity.
Install the CLI when linkedin is not available:
npm install -g @linkedapi/linkedin-cli
Safety & Compliance
Read this before running any command.
- LinkedIn User Agreement risk. Automated connection requests, messaging, scraping, and posting can violate LinkedIn's User Agreement and can lead to account restriction or suspension. The account owner is responsible for compliance with LinkedIn's terms and applicable law. Confirm the user accepts this risk before performing write actions at scale.
- Confirm write and outreach actions. Require explicit user approval before sending messages, connection requests, InMail, posts, reactions, or comments. Show the exact target and content first.
- Credentials only. Use the Linked API token and identification token issued from the dashboard. Never request LinkedIn passwords, 2FA codes, cookies, session exports, recovery codes, or browser profile data.
- Respect action limits. Per-account limits are configurable on the platform. A
limitExceedederror means the limit was reached - stop and report it rather than retrying.
Authentication
The CLI reads credentials from environment variables. Export them so secrets stay out of shell history and process listings. Never pass tokens as CLI arguments.
When a command fails with exit code 2 (authentication error), guide the user through setup:
- Go to app.linkedapi.io and sign up or log in.
- Connect the LinkedIn account.
- Copy the Linked API Token and Identification Token from the dashboard.
Export the tokens and run setup:
export LINKEDAPI_TOKEN="your-linked-api-token"
export LINKEDAPI_IDENTIFICATION_TOKEN="your-identification-token"
linkedin setup
Treat an exposed token as compromised and rotate it in the Linked API dashboard. Do not put tokens in source files, committed examples, issue text, chat transcripts, screenshots, or logs.
Global Flags
Always use --json and -q for machine-readable output:
linkedin <command> --json -q
Optionally set LINKEDAPI_CLIENT=skill:linkedin in the environment once so Linked API can attribute usage to this skill. There is no need to repeat it on every command.
| Flag | Description |
|---|---|
--json |
Structured JSON output |
--quiet / -q |
Suppress stderr progress messages |
--fields name,url,... |
Select specific fields in output |
--no-color |
Disable colors |
--account "Name" |
Use a specific account for this command |
Output Format
Success:
{"success": true, "data": {"name": "John Doe", "headline": "Engineer"}}
Error:
{"success": false, "error": {"type": "personNotFound", "message": "Person not found"}}
Exit code 0 means the API call succeeded - always check the success field for the action outcome. Non-zero exit codes indicate infrastructure errors:
| Exit Code | Meaning |
|---|---|
| 0 | Success (check success field - action may have returned an error like "person not found") |
| 1 | General/unexpected error |
| 2 | Missing or invalid tokens |
| 3 | Subscription/plan required |
| 4 | LinkedIn account issue |
| 5 | Invalid arguments |
| 6 | Rate limited |
| 7 | Network error |
| 8 | Workflow timeout (workflowId returned for recovery) |
Commands
Fetch a Person Profile
linkedin person fetch <url> [flags] --json -q
Optional flags to include additional data:
--experience- work history--education- education history--skills- skills list--languages- languages--posts- recent posts (with--posts-limit N,--posts-since TIMESTAMP)--comments- recent comments (with--comments-limit N,--comments-since TIMESTAMP)--reactions- recent reactions (with--reactions-limit N,--reactions-since TIMESTAMP)
Request additional data only when needed - each flag increases execution time.
# Basic profile
linkedin person fetch https://www.linkedin.com/in/username --json -q
# With experience and education
linkedin person fetch https://www.linkedin.com/in/username --experience --education --json -q
# With last 5 posts
linkedin person fetch https://www.linkedin.com/in/username --posts --posts-limit 5 --json -q
Search People
linkedin person search [flags] --json -q
| Flag | Description |
|---|---|
--term |
Search keyword or phrase |
--limit |
Max results |
--first-name |
Filter by first name |
| `- |
Установить linkedin в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл linkedin?
LinkedIn automation via the Linked API CLI - fetch profiles, search people and companies, send messages, manage connections, create posts, react, comment, and run Sales Navigator and custom workflows. Use when the user wants to interact with LinkedIn.
Как установить скилл linkedin?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл linkedin запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic