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.
npx agentmods add instructions/linked-api/linkedin-cli/claude-mdgit clone --depth 1 https://github.com/Linked-API/linkedin-cliWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00732 | $0.00732 |
| Opus 5 | $0.00366 | $0.00366 |
| Sonnet 5 | $0.00146 | $0.00146 |
| Haiku 4.5 | $0.00073 | $0.00073 |
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 yesterday.
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.
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:
- Resolves auth tokens via
auth-manager.ts(config file -> error) - Creates SDK instance via
build-client.ts - Calls
operation.execute(params)-> gets workflowId - Polls via
operation.result(workflowId)with progress on stderr - 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)
- Request errors (SDK throws
LinkedApiError) -> non-zero exit, JSON on stderr - Workflow failures (SDK throws
LinkedApiError) -> exit 1, JSON on stderr - 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 |
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.
- yesterday First seen · 72 lines · 732 tokens per session scan A 7b18eff6e9d4
linkedin-cli CLAUDE.md is an instructions file published in the GitHub repository Linked-API/linkedin-cli (59 stars, last pushed 7d ago), licensed MIT. It adds 732 tokens to every session, about $0.0037 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-30.
Other instructions, from other repositories
linkedin-mcp-server AGENTS.md
Instructions for tr4m0ryp/linkedin-mcp-server, covering claude.md, development commands, scraping rules, tool return format and verifying bug reports.
linkedin-mcp-server CLAUDE.md
Instructions for tr4m0ryp/linkedin-mcp-server, a project described as: Open-source MCP server for LinkedIn. Give Claude and any MCP-compatible AI agent access to profiles, companies, jobs, and messages.
scream-code AGENTS.md
Instructions for LIUTod/scream-code, covering scream-code development guide, workspace overview, packages, terminology and cross-package import rules.
CLI-Manager AGENTS.md
AGENTS.md instructions for dark-hxx/CLI-Manager, covering agents.md, 项目概述, 最近变更(2026-03-25), 技术栈 and 国际化规则.
CLI-Manager CLAUDE.md
Claude Code instructions for dark-hxx/CLI-Manager, covering claude.md, 项目简介, 常用命令, 架构要点 and ipc 边界.
nebula AGENTS.md
AGENTS.md instructions for Kuddev/nebula, covering nebula 项目代理指引, 发布任务的持久化上下文, release note 原则 and 发布安全边界.