linkedin

linkedin is a command for coding agents from kanaerulabs/growth-kit. It costs 9 tokens per session (6,660 once invoked), scanned A, original, MIT.

A command that turns blog posts, articles, PDFs, URLs, or plain text into a LinkedIn post, with optional image or PDF attachments.

In plain words
What is it for?
Use it to publish a content source on LinkedIn, automatically attach diagrams when available, or provide your own image or PDF.
Why use it?
It removes manual rewriting and prepares text and media in the format LinkedIn's publishing interface expects.

Command

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/kanaerulabs/growth-kit/linkedin
Clone the repo
git clone --depth 1 https://github.com/kanaerulabs/growth-kit

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/kanaerulabs/growth-kit/linkedin.svg)](https://agentmods.dev/commands/kanaerulabs/growth-kit/linkedin)
Your own site
<a href="https://agentmods.dev/commands/kanaerulabs/growth-kit/linkedin"><img src="https://agentmods.dev/badge/commands/kanaerulabs/growth-kit/linkedin.svg" alt="Measured on agentmods" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,660 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00009 $0.06660
Opus 5 $0.00005 $0.03330
Sonnet 5 $0.00002 $0.01332
Haiku 4.5 $0.00001 $0.00666

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

Security

Grade A, and why

linkedin scanned grade A with 1 finding 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 5d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

6. **Create the draft** using pure Bash + curl:
publisher-plugin/commands/linkedin.md · 665 lines

How it starts

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

Create a LinkedIn post from any content source - blog posts, articles, PDFs, URLs, or plain text.

Usage: $ARGUMENTS

Optional custom file attachment:

# Auto-generate PDF from ALL blog diagrams (default)
/publisher:linkedin my-post

# Attach your own image or PDF
/publisher:linkedin my-post en path/to/image.png
/publisher:linkedin my-post en path/to/report.pdf

Media attachment (zero dependencies!):

  • With Pillow: Generates PDF from all diagrams → single file
  • Without Pillow: Uploads all diagrams as separate images → works everywhere!
  • Custom file: Just provide the path → always works
  • No install required for the fallback option!

CRITICAL: LinkedIn's "Little Text Format" requires escaping reserved characters even for REST API!

Reserved characters that MUST be escaped: \ | { } @ [ ] ( ) < > # * _ ~

DO NOT manually escape these in your commentary - Claude handles two-step escaping automatically:

  1. LinkedIn Little Text Format escaping (parentheses, brackets, etc.)
  2. JSON escaping (quotes, backslashes)

Pass raw text with parentheses, hashtags, etc. directly - the command handles all escaping.

Process:

  1. Parse Input Arguments

    • Extract content input, optional language parameter, and optional custom file path
    • Examples:
      • 2025-10-06-my-post (slug only, default English)
      • 2025-10-06-my-post ja (slug with Japanese)
      • 2025-10-06-my-post en path/to/custom.png (with custom file)
      • path/to/article.md (file path)
      • https://myblog.com/post (URL)
  2. Universal Input Detection

    If input looks like a file path (contains / or file extension):

    • Use Read tool to check if file exists
    • Detect format by extension:
      • .md / .mdx → Parse markdown with frontmatter (extract title, description, body, metadata)
      • .pdf → Inform user PDF parsing is limited, suggest converting to markdown first
      • .docx → Inform user DOCX parsing is limited, suggest converting to markdown first
      • .html → Read and extract main content, strip HTML tags
      • .txt → Read as plain text
      • .json → Parse JSON and extract relevant fields
    • Extract: title, description, body content, metadata

    If input looks like a URL (starts with http:// or https://):

    • Use WebFetch tool to retrieve the page
    • Prompt: "Extract the main article content, title, and description from this page"
    • Parse and clean the text

    If input is a slug (no / and no protocol):

    • Search codebase using Glob: **/*${input}*.md
    • Common patterns to check:
      • src/content/blog/posts/{en,ja}/*${input}*.md
      • content/blog/*${input}*.md
      • posts/*${input}*.md
      • blog/*${input}*.md
    • If language specified, prioritize matching language folder
    • Use Read tool to parse markdown file with frontmatter
  3. Determine Language (default: English):

    • If user explicitly specifies "ja" → Japanese
    • If user explicitly specifies "en" → English
    • If file path contains /ja/ → Japanese
    • If content appears to be in Japanese → Japanese
    • Otherwise → English
  4. Generate engaging LinkedIn commentary in the target language:

    • For English: Follow professional thought leadership voice (see examples below)
    • For Japanese: Use professional Japanese business tone (敬語), include article link
    • Use actual blog content and key points
    • Make it contextual and intelligent, not template-based
    • APPLY HUMANIZATION (see Humanization Guidelines below)
  5. Handle file attachment:

    If custom file path provided (third argument):

    • Use the specified file path (e.g., path/to/image.png or path/to/report.pdf)
    • Verify file exists using Read tool
    • Supported formats: .png, .jpg, .jpeg, .pdf
    • Use this file for LinkedIn media upload

    If no custom file specified (default behavior):

    • Auto-detect blog diagrams:
      • English: public/diagrams/[SLUG]-0-en-light.png
      • Japanese: public/diagrams/[SLUG]-0-ja-light.png
    • Script will auto-generate PDF from diagrams if found
    • Commentary MUST include article URL when diagrams exist

Read the full file on GitHub · 665 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. 5d ago First seen · 665 lines · 9 tokens per session scan A c0c07eea1198

Subscribe to this mod's changes

linkedin is a command published in the GitHub repository kanaerulabs/growth-kit (15 stars, last pushed 7mo ago), licensed MIT. It adds 9 tokens to every session and 6,660 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.