setup

A setup guide for connecting a tool to LinkedIn through OAuth 2.0, the sign-in method that lets an app request limited account access without receiving your password.

In plain words
What is it for?
Use it for first-time LinkedIn connection or to sign in again when an existing token has expired.
Why use it?
It walks you through creating a LinkedIn developer app, adding its callback address, requesting access, and saving the required credentials securely.

Command

Part of the linkedin plugin — 1 skill, 4 commands shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/rockyco/claude-linkedin-plugin/setup
Clone the repo
git clone --depth 1 https://github.com/rockyco/claude-linkedin-plugin

Or install linkedin, the plugin that ships this one along with the rest of its 1 skill, 4 commands.

Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 600 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00015 $0.00600
Opus 5 $0.00008 $0.00300
Sonnet 5 $0.00003 $0.00120
Haiku 4.5 $0.00002 $0.00060

Measured 2d ago against content hash f37719123c84, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

setup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/setup.md · 70 lines

How it starts

The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.

LinkedIn OAuth Setup

Guide the user through setting up LinkedIn API authentication. This is a one-time process.

Step 1: Check existing settings

Read ~/.claude/linkedin.local.md to see if already authenticated. If the file exists and has a valid (non-expired) token, inform the user they are already set up and ask if they want to re-authenticate.

Step 2: LinkedIn Developer App

If the user does not have credentials, walk them through creating a LinkedIn Developer App:

  1. Tell the user to go to https://www.linkedin.com/developers/apps and click "Create app"
  2. They need:
    • App name (anything descriptive)
    • A LinkedIn Company Page to associate with (they can create one if needed)
    • App logo
  3. After creating the app, go to the Auth tab and:
    • Copy the Client ID and Client Secret
    • Add http://localhost:9876/callback as an Authorized redirect URL
  4. Go to the Products tab and request access to:
    • Share on LinkedIn (for w_member_social scope)
    • Sign In with LinkedIn using OpenID Connect (for openid and profile scopes)
  5. Wait for product access to be approved (usually instant for Share on LinkedIn)

Use AskUserQuestion to collect the Client ID and Client Secret from the user.

Step 3: Run OAuth flow

Once you have the client_id and client_secret, run the OAuth server:

python3 ${CLAUDE_PLUGIN_ROOT}/scripts/oauth-server.py "<client_id>" "<client_secret>"

This will:

  1. Print an authorization URL and open the user's browser
  2. Wait for the OAuth callback on localhost:9876
  3. Exchange the authorization code for an access token
  4. Fetch the user's profile and person URN
  5. Save everything to ~/.claude/linkedin.local.md

Tell the user to authorize the app in their browser when it opens.

Step 4: Verify

After the script completes, read ~/.claude/linkedin.local.md and confirm to the user:

  • Their display name
  • Their person URN
  • Token expiration date (60 days from now)

Tell them they can now use /linkedin:post to publish content.

Read the full file on GitHub · 70 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 70 lines · 15 tokens per session scan A f37719123c84

Subscribe to this mod's changes

setup is a command published in the GitHub repository rockyco/claude-linkedin-plugin (2 stars, last pushed 1mo ago), licensed MIT. It adds 15 tokens to every session and 600 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.