linkedin-cli: Instructions file for Claude Code

CLAUDE.md

linkedin-cli CLAUDE.md is an instructions file for Claude Code from Linked-API/linkedin-cli. It costs 732 tokens per session, scanned A, original, MIT.

A set of coding instructions for linkedin-cli, a command-line tool that automates LinkedIn through the Linked API.

In plain words
What is it for?
Use it when developing linkedin-cli to install dependencies, build or check the TypeScript code, handle authentication, call LinkedIn operations, and format command output.
Why use it?
It explains how the project is structured, built, authenticated, and how its commands return results.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions Codex.

This is Linked-API/linkedin-cli's own configuration. It tells Claude Code how to work on linkedin-cli itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything linkedin-cli configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Linked-API/linkedin-cli. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Linked-API/linkedin-cli/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/Linked-API/linkedin-cli

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for linkedin-cli CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/linked-api/linkedin-cli/claude-md/github.svg)](https://agentmods.dev/instructions/linked-api/linkedin-cli/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/linked-api/linkedin-cli/claude-md"><img src="https://agentmods.dev/badge/instructions/linked-api/linkedin-cli/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for linkedin-cli CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/linked-api/linkedin-cli/claude-md"><img src="https://agentmods.dev/badge/instructions/linked-api/linkedin-cli/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 732 This file is loaded in full into every session.
When invoked 732 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00732 $0.00732
Opus 5.5 $0.00293 $0.00293
Sonnet 5.5 $0.00146 $0.00146
Haiku 4.5 $0.00073 $0.00073

Measured 2mo ago against content hash 7b18eff6e9d4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

linkedin-cli CLAUDE.md 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 2mo 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.

CLAUDE.md · 72 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code when working with code in this repository.

Product

linkedin-cli is an AI-agent-friendly CLI for LinkedIn automation via Linked API. It wraps the linkedapi-node SDK (v2.0.0) to give AI agents (Claude Code, Cursor, Codex, etc.) a token-efficient interface to control LinkedIn.

Package: linkedin-cli on npm, binary: linkedin Framework: oclif (TypeScript CLI framework by Salesforce)

Build Commands

npm ci                # Install dependencies
npm run build         # tsc + tsc-alias + oclif manifest
npm run typecheck     # Type check without emitting
npm run lint          # ESLint with auto-fix
npm run format        # Prettier

Architecture

User/Agent -> CLI (oclif command) -> linkedapi-node SDK -> Linked API HTTP endpoints

Every command:

  1. Resolves auth tokens via auth-manager.ts (config file -> error)
  2. Creates SDK instance via build-client.ts
  3. Calls operation.execute(params) -> gets workflowId
  4. Polls via operation.result(workflowId) with progress on stderr
  5. Outputs result to stdout (JSON or table based on TTY)

Path Aliases

Defined in tsconfig.json, resolved at build time by tsc-alias:

  • @base-command -> src/base-command
  • @core/* -> src/core/*
  • @utils/* -> src/utils/*

All imports MUST use aliases (not relative paths) when crossing module boundaries.

Code Style

Follows the shared code style guide:

  • @../docs/CODESTYLE.md — TypeScript code style and naming conventions

Error Handling (Three Levels)

  1. Request errors (SDK throws LinkedApiError) -> non-zero exit, JSON on stderr
  2. Workflow failures (SDK throws LinkedApiError) -> exit 1, JSON on stderr
  3. Action outcomes (returned in result.errors) -> exit 0, {success: false} on stdout

Exit codes: 0=success, 1=general, 2=auth, 3=subscription, 4=account, 5=validation, 6=rate-limit, 7=network, 8=timeout

Key Files

File Purpose
src/base-command.ts Abstract base for all commands (global flags, auth, error handling)
src/core/auth/auth-manager.ts Token resolution: config file -> error, supports --account override
src/core/auth/config-store.ts Multi-account config at ~/.config/linkedin-cli/config.json
src/core/client/build-client.ts Build LinkedApi instance
src/core/errors/exit-codes.ts Semantic exit codes
src/core/errors/error-handler.ts Map SDK errors -> exit codes + messages
src/core/output/formatter.ts JSON/table output with response envelope
src/core/output/field-selector.ts --fields filtering
src/core/workflow/workflow-runner.ts execute + poll with stderr progress
src/commands/message/get.ts Sync-then-poll pattern for conversations

Read the full file on GitHub · 72 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. 2mo ago First seen · 72 lines · 732 tokens per session scan A 7b18eff6e9d4

Subscribe to this mod's changes

linkedin-cli CLAUDE.md is an instructions file published in the GitHub repository Linked-API/linkedin-cli (82 stars, last pushed 2d ago), licensed MIT. It adds 732 tokens to every session, about $0.0029 per session on Opus 5.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-30.

Related

linkedin-cli CLAUDE.md compared with instructions from other repositories

linkedin-cli CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
linkedin-cli CLAUDE.mdLinked-API/linkedin-cliInstructions file822d agoMITA732Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode