LinkedIn CLI for Openclaw

A streamlined command-line tool for managing LinkedIn posts and shares via the official API v2 with OAuth security.

0xmythril
v0.1.0
Mar 4, 2026
1
1.1k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install linkedin-cli-2

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install linkedin-cli-2 using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is LinkedIn CLI?

LinkedIn CLI is a purpose-built tool designed to bridge the gap between AI development environments and professional social networking. By utilizing the official LinkedIn API v2, it enables developers and AI agents to programmatically publish text updates and share external URLs. As a component of the Openclaw Skills library, it focuses on transparency and security, ensuring that all interactions are authenticated via OAuth and executed only upon explicit user request or predefined schedules.

This skill is ideal for developers who want to integrate social proofing into their automated workflows without sacrificing security. It maintains a minimal footprint with very few dependencies, making it a reliable choice for long-term automation and professional content management.

LinkedIn CLI Use Cases

  • Deploying automated project updates directly from a CI/CD pipeline.
  • Scheduling recurring professional insights using cron jobs.
  • Enabling an AI agent to share technical documentation or blog posts with a professional network.
  • Cleaning up or managing professional activity by deleting specific posts via the terminal.

How LinkedIn CLI Works

  1. The skill initiates an OAuth 2.0 flow to securely connect your LinkedIn profile with the CLI tool.
  2. Credentials and access tokens are stored locally in a restricted environment file to maintain session persistence.
  3. Commands are issued through the terminal or an AI agent to the LinkedIn API v2 endpoints.
  4. The tool processes raw text or URLs, converting them into the required LinkedIn URN format for publication.
  5. Upon success, the API returns a unique activity ID that can be used for future reference or deletion.

LinkedIn CLI Setup

Install the skill globally using npm to ensure it is accessible in your environment:

npm install -g github:0xmythril/linkedin-cli#v1.0.0

Create a LinkedIn application at the developer portal to obtain your Client ID and Secret. Then, configure your local environment:

mkdir -p ~/.config/linkedin-cli
touch ~/.config/linkedin-cli/.env
chmod 600 ~/.config/linkedin-cli/.env
cat > ~/.config/linkedin-cli/.env << 'EOF'
LINKEDIN_CLIENT_ID=your_client_id
LINKEDIN_CLIENT_SECRET=your_client_secret
EOF

Finally, run the authentication command to open the browser-based OAuth flow:

linkedin-cli auth

LinkedIn CLI Data Schema & Taxonomy

The skill manages data through a local configuration file and interacts with the LinkedIn API schema as follows:

Component Type Description
.env File Stores encrypted OAuth tokens and app secrets in ~/.config/linkedin-cli/.
Post Content String Supports UTF-8 text for updates and commentary.
Share URL String Validated external URLs for content distribution.
Post URN Identifier Unique LinkedIn identifiers used for tracking and deleting activity.

LinkedIn CLI Advanced Features

  • Zero post-install scripts and pinned versioning to ensure maximum security within Openclaw Skills.
  • Automated token refresh logic that handles OAuth expiration cycles every 60 days.
  • Deep linking support that accepts raw numeric IDs, full URNs, or standard LinkedIn post URLs for deletion.
  • Minimal dependency architecture to prevent supply-chain vulnerabilities in automation environments.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins linkedin-cli
Github Stars: 0
forks: 0

Featured*