ktg-plugin-marketplace/plugins/linkedin-thought-leadership/README.md
Kjell Tore Guttormsen 7ebd28cb0b feat(linkedin): v2.3.0 — Step 7.5 visual-assets phase in /linkedin:newsletter
Endring 7 from the change-spec: make visual assets an explicit pipeline
phase. New Step 7.5 (visual-assets) between annotation (Step 7) and lock
(Step 8): cover (+ optional inline figures) or carousel deck, generated and
operator-gated BEFORE lock so build-linkedin.mjs picks up cover.png at lock
without a post-lock re-render. Pipeline 13 → 14 phases.

- commands/newsletter.md: Step 7.5 section, pipeline overview + build-status,
  resumption table (annotation → 7.5; new visual-assets → 8), Step 8
  precondition, reference-file list.
- config/edition-state.template.json: visual-assets phase + additive
  articles.NN.visualAssets schema (format / cover / figures / carousel).
- config/image-credit-caption.template.md (new): motif + credit + caption
  table, honest-about-AI credit, naming convention.
- Two generation routes, no lock-in: default mcp-image (cover-v<N>-kandidat.png)
  or external cover-raw.png. Operator-gate via SendUserFile → cp to cover.png.
  Carousel branch reuses render/build-carousel.mjs.
- Doc/orchestration-only — no new code. Commands (24) + agents (15) unchanged.
- Version sync 2.2.0 → 2.3.0 across plugin.json, CHANGELOG, README, CLAUDE.md,
  root README + root CLAUDE.md.

Correction: spec claimed build-linkedin.mjs handles fig1-4; verified it does
NOT — it embeds only cover.png by fixed name; figures are referenced in the
draft markdown and uploaded manually. Step 7.5 documents actual behavior.

All 8 acceptance criteria met. JSON valid (14 phases); 20/20 render tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-28 22:49:19 +02:00

602 lines
40 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# LinkedIn Thought Leadership Plugin for Claude Code
> Build authentic LinkedIn authority through algorithmic understanding, strategic consistency, and AI-assisted content creation.
> **Solo-maintained, fork-and-own.** This plugin is a starting point, not a vendor product. Issues are welcome as signals; pull requests are not accepted. See [GOVERNANCE.md](GOVERNANCE.md) for the full model and what upstream provides.
*AI-generated: all code produced by Claude Code through dialog-driven development. [Full disclosure →](../../README.md#ai-generated-code-disclosure)*
![Version](https://img.shields.io/badge/version-2.3.0-blue)
![Platform](https://img.shields.io/badge/platform-Claude_Code_Plugin-purple)
![Commands](https://img.shields.io/badge/commands-24-green)
![Agents](https://img.shields.io/badge/agents-15-orange)
![Hooks](https://img.shields.io/badge/hooks-9-red)
![Reference Docs](https://img.shields.io/badge/reference_docs-24-teal)
![License](https://img.shields.io/badge/license-MIT-lightgrey)
A comprehensive Claude Code plugin that turns LinkedIn from a chore into a full-spectrum content engine — short-form feed posts, carousels, video scripts, and long-form newsletter editions. v2.0.0 consolidated the surface (27 → 24 commands, 16 → 14 agents) and added `/linkedin:newsletter` as a multi-session long-form orchestrator with fact-check + persona-sweep gates BEFORE lock. **v2.1.0** adds two more gates BEFORE prose to `/linkedin:newsletter` — a skeleton gate (Step 2.5) and a spine-prose gate (Step 3a) — encoding the Maskinrommet writing-contract §A discipline (premiss / problem / anbefaling / gevinst / vei videre) into the pipeline itself, so spine errors get caught in minutes at the skeleton stage instead of hours at the resonance stage or a full day post-lock. v2.2.0 hardened the longform gates with the lessons from the next production run: blocking persona hard-fails (primær «mistet meg» / doesn't own the action / jargon wall / model-name catalog → BLOCK), a post-cutoff fact-check mandate, a new Norwegian-chronicle de-AI voice-scrubber agent, render+annotate operator gates, and edition state reconciled with the global STATE.md continuity system. **v2.3.0** makes visual assets an explicit pipeline phase — new **Step 7.5 (visual-assets)** between annotation and lock: the cover (+ optional inline figures) or a carousel deck is generated and operator-gated *before* lock, so the renderer picks up `cover.png` without a post-lock re-render (pipeline 13 → 14 phases). 24 slash commands, 15 specialized agents, 9 automated hooks, and a 24-document knowledge base grounded in LinkedIn's actual algorithm signals. Updated for the January 2026 **360Brew** algorithm change, where LinkedIn now validates your profile before distributing content.
---
## Table of Contents
- [What's New in v2.3.0](#whats-new-in-v230)
- [What's New in v2.2.0](#whats-new-in-v220)
- [What's New in v2.1.0](#whats-new-in-v210)
- [What's New in v2.0.0](#whats-new-in-v200)
- [What Is This?](#what-is-this)
- [Quick Start](#quick-start)
- [Commands](#commands)
- [Agent Architecture](#agent-architecture)
- [Knowledge Base](#knowledge-base)
- [Skills](#skills)
- [Hooks & Automation](#hooks--automation)
- [Analytics System](#analytics-system)
- [Personalization Engine](#personalization-engine)
- [Workflow Examples](#workflow-examples)
- [Content Quality Rules](#content-quality-rules)
- [Configuration](#configuration)
- [What This Plugin Does Not Cover](#what-this-plugin-does-not-cover)
- [Version History](#version-history)
- [License](#license)
---
## What's New in v2.3.0
**Visual assets become an explicit pipeline phase.** Until now, images (cover + inline figures) were produced ad-hoc *outside* the `/linkedin:newsletter` pipeline and referenced by hand — even though a cover is mandatory and has to coordinate with the text. v2.3.0 adds **Step 7.5 — Visual assets** between annotation (Step 7) and lock (Step 8), so visuals are resolved *before* the edition locks.
- **New Step 7.5 — Visual assets** (`commands/newsletter.md`). Decides image needs from the article type (method-heavy → 12 inline figures; diagnosis-heavy → cover only), writes a per-image brief, generates, runs an operator-gate, and records credit + caption. It runs **before lock on purpose**: `render/build-linkedin.mjs` picks up `linkedin/NN/cover.png` + the edition-config credit/caption at lock, so generating images after lock would force a re-render and break the lock.
- **Two generation routes, no lock-in** — default `mcp__mcp-image__generate_image` (Nano Banana Pro) writing `cover-v<N>-kandidat.png`, or an external route (DALL·E / Midjourney / photographer) via a `cover-raw.png` the operator drops in. The interface is pluggable (path-in / path-out); mcp-image is the default, not a hard dependency.
- **Operator-gate = the Step 2.5/3a pattern, for images** — every candidate is surfaced via `SendUserFile` for side-by-side comparison; on approval the chosen candidate is copied to the fixed `cover.png` name that the renderer reads.
- **Explicit carousel branch** — `format: "carousel"` editions render a typografisk slide-deck via the existing `render/build-carousel.mjs` instead of cover+inline.
- **New `config/image-credit-caption.template.md`** — cover motif + credit + caption table (honest-about-AI credit per the verification duty), modelled on the established series convention. Documents the `cover.png` / `cover-v<N>-kandidat.png` / `cover-raw.png` / `fig<N>.png` naming.
- **`visual-assets` phase + additive `visualAssets` state** in `config/edition-state.template.json`. Pipeline grows 13 → 14 phases; resumption stays deterministic (`annotation` now resumes at Step 7.5).
Doc/orchestration-only — **no new code**. Commands (24) and agents (15) unchanged. Backward-compatible: the only state-shape change is additive.
---
## What's New in v2.2.0
**Longform gates hardened** — the second production run (Seres-serien) surfaced six concrete weaknesses; v2.2.0 closes all of them. A chronicle built as a model/name catalog passed review (flags were read as notes, not stop-signs) and nearly shipped; the rewrite was better but introduced fresh factual errors. The gates now make both failure modes blocking.
- **Persona gate is blocking, with an explicit hard-fail list** (`agents/persona-reviewer.md`, `config/personas.template.md`). The bar is the primær reader's *clean* JA — «JA med store forbehold» = NEI. Hard fails (= rewrite, not annotate): primær «mistet meg», primær doesn't own the action, **sjargong-mur**, **modell-/navne-katalog**. Any one → BLOCK regardless of the other axes.
- **Fact-check is orthogonal to narrative strength** (`agents/fact-checker.md`). The more convincing a draft reads, the *more* verification — not less. Claims dated after the model's knowledge cutoff **MUST** be web-searched (never confirmed from memory), plus an explicit checklist for the high-frequency error types (person titles, org-varying "standards", over-credited studies, source scope, founding/release years).
- **New `voice-scrubber` agent** (Opus) — aggressive de-AI scrub (Pass 1, objective: «la meg være ærlig», reflex rule-of-three, em-dash-spam, self-referential overhead, modell-/navne-katalog) + voice-drift correction (Pass 2, calibrated). **Gold standard = the approved Norwegian editions, NOT the English `authentic-voice-samples.md`** (which forbids the em-dash and would degrade chronicle voice). Wired into Step 4 of `/linkedin:newsletter`. *(New agent — requires a session reload before it is invokable.)*
- **Render+annotate operator gates** (`commands/newsletter.md` Steps 2.5, 3a). The operator review is HTML annotation in the browser (`render/build-html.mjs``file://` link), not a multiple-choice prompt — for every write deliverable, skeleton included. `AskUserQuestion` becomes a receipt + fallback.
- **Edition state reconciled with STATE.md** (ONE-system). `edition-HANDOVER.md` is gone; narrative state lives in `<serie>/STATE.md` (overwritten each phase, auto-injected by the session-start hook), machine state (fact-check log, persona verdicts, immutable rules) in `edition-state.json`. `config/edition-HANDOVER.template.md` deleted.
- **Voice-profile + longform-rules avoid-patterns** — modell-/navne-katalog, completeness-over-reader-action, and self-referential overhead openings added to `references/longform-quality-rules.md` (rules 1 + 3) and `config/user-profile.template.md`.
15 agents (was 14). No command-count change (24). Backward-compatible: existing editions resume by `currentPhase`; the only state-shape change is additive (`personaSweep.skeleton`, `immutableRules`).
---
## What's New in v2.1.0
**Skeleton gate before prose** in `/linkedin:newsletter` — the single most expensive failure mode in long-form (spine errors caught post-prose) is now gated before the first sentence is written. Empirically motivated by the Seres-serien Del 3 + Del 4 production (~1 day lost to spine rework that a 15-minute skeleton gate would have caught).
- **New Step 2.5 — Skeleton + section pitch** — writes `<serie>/NN-skjelett.md` with the five-line spine (premiss / problem / anbefaling / gevinst / vei videre) + one-line section pitches. Operator-gate (JA / REVIDER / NEI) AND parallel persona-skjelett-sweep must both return JA before the pipeline can advance. No prose is written until the spine is right.
- **New Step 3a — Spine prose** — one paragraph per section against the gated skeleton, ~2030 % of final edition length. Operator-gate on whether the axis lands now that there is prose on it. The old Step 3 (Draft) is split into 3a (spine) and 3b (full expansion); 3b owns the multi-session draft-cursor logic, 3a is short enough to restart on interruption.
- **New `persona-reviewer` mode: `skjelett`** — third mode alongside `resonans` (before lock) and `konverter` (after lock). Five spine axes (Premiss / Problem / Anbefaling / Gevinst / Vei videre) scored HOLDER / TVILER / MANGLER, ≤3 direction-only flags, per-pitch section-pay-in check. Reads the skeleton + pitches only — no prose.
- **Two new phase strings** in `edition-state.template.json``skeleton-pitch` + `spine-prose`. The pipeline grows from 11 to 13 phases; resumption is deterministic across every new phase boundary.
- **Rule 8 — Skjelett før prosa** in `references/longform-quality-rules.md` — codifies the skeleton-before-prose pre-condition that all other quality rules implicitly rely on.
Backward-compatible: existing editions with `currentPhase: "research"` now resume at Step 2.5 (was Step 3) — an intended deterministic improvement; the contract on every other phase is bit-for-bit unchanged.
---
## What's New in v2.0.0
**Full-spectrum content engine** — feed posts AND long-form newsletter editions in one cohesive surface, with net-fewer commands.
- **Long-form `/linkedin:newsletter` orchestrator** — multi-session pipeline (load → calibrate → research fan-out → draft → consistency → fact-check sweep → persona sweep → lock → delivery → hook-gate → schedule) with maintained edition-state across sessions. Supports newsletter editions, essays, and series articles
- **Two new longform-quality gate agents** — `fact-checker` (Opus, verifies every factual claim against primary sources) and `persona-reviewer` (Opus, evaluates reader-persona resonance + hook-conversion). Both run BEFORE lock — the cost of fixing an error in a published edition is too high
- **Render pipeline migrated into the plugin** — `render/build-html.mjs`, `build-pdf.mjs`, `build-linkedin.mjs`, `build-carousel.mjs` + self-hosted fonts (Newsreader, Inter, JetBrains Mono) under OFL-1.1. No more cross-repo render dependency
- **Persona library** — `config/personas.template.md` lets you define reader personas with knowledge level, time-pressure, and resonance criteria. `persona-reviewer` uses these to evaluate every long-form draft
- **Edition-state schema** — `assets/editions/<slug>/state.json` tracks a long-form piece across many sessions (research notes, draft revisions, fact-check status, persona-review status, lock state)
- **Net surface reduction** — 27 → 24 commands (5 removed: `templates`, `publish`, `authority`, `collab`, `speaking` absorbed into existing commands; 2 added: `newsletter`, `outreach`). 16 → 14 agents (4 merged: `content-tracker`, `personalization-scorer`, `performance-reporter`, `comment-strategist` absorbed into `analytics-interpreter` + `engagement-coach`; 2 added: `fact-checker`, `persona-reviewer`)
- **Analytics consolidation** — `analytics-interpreter` now has interpret + report modes (replaces standalone `performance-reporter`); `engagement-coach` now owns 5x5x5 + first-hour tactics + CEA commenting + target selection + daily routine (replaces standalone `comment-strategist`)
- **`/linkedin:import` analysis delegates to `/linkedin:report`** — both consume the same `trends` CLI; the import flow runs the report inline instead of duplicating the analysis pipeline
- **Router gating** — `/linkedin:monetize` and `/linkedin:outreach` now surface "unlocks at ~1K followers" guidance so new creators are pointed at `/linkedin:strategy` first
### Friction reduction (carried forward from prior release)
- Auto-clipboard on all content commands · max 2 interactive steps · deterministic `state-updater.mjs` · MCP image carousel · progressive onboarding · iCal calendar integration
---
## What Is This?
This plugin gives you a complete LinkedIn thought leadership system inside Claude Code. Instead of staring at a blank post editor, you work through structured workflows that handle ideation, drafting, optimization, scheduling, publishing, and post-publish analytics — all calibrated to how LinkedIn's algorithm actually works.
Key capabilities:
- **360Brew profile optimization** aligned with LinkedIn's AI-first content distribution (January 2026 update)
- **Content Matrix System** that generates 40+ post ideas from a single topic using 8 universal thought leadership angles
- **Full content pipeline** from ideation through post-publish 48-hour monitoring
- **Batch content creation** — produce a full week of posts in one session
- **Analytics pipeline** — import LinkedIn CSV exports, parse into structured JSON, generate performance reports
- **Voice training** — learns your authentic writing style and flags drift
- **Growth strategy** — phase-specific guidance from foundation (0-1K followers) through authority (10K+)
- **Monetization and outreach** — readiness assessment, lead magnets, conference CFP templates, collaboration formats and partner pitches
- **Video scripting** — structured scripts for 30s/60s/90s/2min LinkedIn video
- **Multi-platform repurposing** — adapt LinkedIn content for Twitter/X, newsletters, blogs, slides
- **A/B testing framework** — design and track content experiments
> [!TIP]
> Start with `/linkedin:profile` to optimize for 360Brew, then `/linkedin:setup` to personalize, then `/linkedin:post` to create your first post.
---
## Quick Start
### Prerequisites
- [Claude Code](https://docs.anthropic.com/en/docs/claude-code) with plugin support enabled
- Node.js 18+ (for hooks and analytics CLI; analytics requires `tsx`: `cd scripts/analytics && npm install`)
### Installation
Add the marketplace and browse plugins with `/plugin`:
```bash
claude plugin marketplace add https://git.fromaitochitta.com/open/ktg-plugin-marketplace.git
```
Or enable directly in `~/.claude/settings.json`:
```json
{
"enabledPlugins": {
"linkedin-thought-leadership@ktg-plugin-marketplace": true
}
}
```
### Get Started (5 minutes)
Run the onboarding wizard — it walks you through profile, setup, and your first post in one flow:
```
/linkedin:onboarding
```
The wizard handles everything: 360Brew profile checklist, voice and user profile setup, and a guided first post.
### Already Set Up?
| Goal | Command |
|------|---------|
| Write a post | `/linkedin:post` |
| Quick 5-min post | `/linkedin:quick` |
| React to an article | `/linkedin:react` |
| View your stats | `/linkedin:report` |
| See all commands | `/linkedin` |
---
## Commands
All 24 commands use colon notation: `/linkedin:post`, `/linkedin:quick`, etc.
### Onboarding
| Command | Description |
|---------|-------------|
| `/linkedin:onboarding` | Multi-step onboarding wizard — guides you through profile optimization, plugin personalization, and your first post in one flow. |
| `/linkedin:first-post` | First-post accelerator — zero to published in 10 minutes with guided hand-holding. |
| `/linkedin:setup` | Guided setup to populate empty asset templates with your real voice, case studies, and audience data. |
### Content Creation
| Command | Description |
|---------|-------------|
| `/linkedin:post` | Full interactive post creation with angle selection, format choice, and refinement. Best for substantial posts (1,200-1,800 characters). |
| `/linkedin:quick` | 5-minute quick post using the 3-line formula. Target: 150-500 characters. Best for reactions, observations, tips, and questions. Also the single entry point for the 8 post-type templates (fill-in-the-blank structures). |
| `/linkedin:pipeline` | Full end-to-end content pipeline from idea to published post. Guides through ideation, drafting, optimization, scheduling, pre-engagement, publishing, and post-analysis. |
| `/linkedin:batch` | Create a full week of LinkedIn content in one session. Input one theme, output 3-5 posts with varying angles and formats. Writes to scheduling queue. |
| `/linkedin:calendar` | View and manage the post scheduling queue — upcoming, overdue, published — and run the publish action (mark a scheduled post as published, update state + streak tracking, surface the first-hour engagement plan). |
| `/linkedin:video` | Video script generator for 30s, 60s, 90s, or 2-minute LinkedIn videos with pacing and visual cues. |
| `/linkedin:multiplatform` | Adapt LinkedIn content for Twitter/X threads, newsletter sections, blog posts, presentation slides, and YouTube scripts. |
| `/linkedin:react` | URL-to-post pipeline — paste an article, research paper, or news link and generate a reaction post. |
### Analytics
| Command | Description |
|---------|-------------|
| `/linkedin:analyze` | Analyze content performance and troubleshoot engagement issues. Diagnoses algorithm penalties, profile-content mismatches, and reach drops. |
| `/linkedin:audit` | Periodic content strategy audit. Reviews top/bottom posts, topic distribution, format mix, and engagement trends. Run quarterly. |
| `/linkedin:report` | Generate weekly performance report from imported analytics data. Shows key metrics, top performers, trends, and actionable alerts. |
| `/linkedin:import` | Import LinkedIn analytics CSV export into structured JSON. Auto-detects files in ~/Downloads, parses CSV, detects anomalies. |
| `/linkedin:competitive` | Competitive analysis of other thought leaders in your niche. Analyzes posting frequency, content types, hooks, and identifies differentiation opportunities. |
| `/linkedin:ab-test` | Design and manage A/B content tests. Track experiments across post variations. |
### Strategy
| Command | Description |
|---------|-------------|
| `/linkedin:strategy` | Growth strategy + authority building. Phase-specific guidance from foundation (0-1K) through authority establishment (10K+), trajectory-aware adjustments, and signature-content compounding for Phase 2+. The single growth/authority entry point — `/linkedin:profile` owns 360Brew alignment. |
| `/linkedin:monetize` | Monetization strategy with scored readiness assessment, stage-specific action plans, lead magnet blueprints, DM conversion workflows, and revenue dashboards. |
| `/linkedin:outreach` | Outreach orchestrator covering both collaborations and speaking opportunities under one paradigm: readiness assessment (collab thresholds + 100-pt speaker scorecard), partner scoring (25-pt rubric), event/CFP search with Nordic/European conference calendar, 12 collaboration formats across 4 maturity tiers, 4 talk abstract templates, speaker bio variants, co-creation production workflow, unified pipeline tracker, and quarterly results dashboard. |
### Profile & Setup
| Command | Description |
|---------|-------------|
| `/linkedin:profile` | 360Brew profile optimization checklist. Audits About section, Experience, Headline, content history alignment, and network patterns. |
| `/linkedin:setup` | Guided setup to populate asset templates with real data. 6 sub-workflows: voice samples, case studies, frameworks, post analysis, demographics, user profile. Calculates personalization score. |
| `/linkedin` | Main router. Shows posting status (streak, weekly progress) and lists all available commands with contextual guidance. |
---
## Agent Architecture
The plugin delegates specialized work to 15 purpose-built agents. Each agent has its own model assignment, color identity, and focused responsibility.
| Agent | Model | Color | Primary Responsibility |
|-------|-------|-------|----------------------|
| `content-optimizer` | Sonnet | Blue | Optimize posts against algorithm signals, hooks, CTAs |
| `strategy-advisor` | Sonnet | Green | Growth strategy and phase-specific guidance |
| `analytics-interpreter` | Sonnet | Yellow | Pattern discovery + weekly/monthly performance reports (interpret/report modes) |
| `engagement-coach` | Sonnet | Magenta | 5x5x5 + first-hour tactics + CEA commenting + target selection |
| `content-planner` | Sonnet | Cyan | Weekly/monthly content calendars and mix enforcement |
| `network-builder` | Sonnet | Teal | Strategic networking, connection scoring, DM templates |
| `content-repurposer` | Sonnet | Purple | Format conversion and evergreen content refresh |
| `trend-spotter` | Sonnet | White | Trending topics, opportunity scoring, first-mover assessment |
| `voice-trainer` | Sonnet | Pink | Voice profile building and drift detection |
| `differentiation-checker` | Sonnet | Gray | Originality scoring and commodity content detection |
| `post-feedback-monitor` | Haiku | Lime | Post-publish 48h monitoring and real-time interventions |
| `video-scripter` | Sonnet | Violet | Video script creation with pacing and visual cues |
| `fact-checker` | Opus | Brown | Factual-claim verification against primary/credible sources, post-cutoff web-search mandate (longform) |
| `persona-reviewer` | Opus | Olive | Reader-persona **skeleton** (v2.1, before prose) + **resonance** (before lock) + **hook-conversion** (after lock) gate, blocking hard-fail list (longform) |
| `voice-scrubber` | Opus | Red | De-AI scrub + Norwegian-chronicle voice-drift correction; gold standard = approved Norwegian editions, not the English post corpus (longform, v2.2) |
### Content Pipeline
Agents collaborate across the end-to-end content lifecycle:
```
trend-spotter --> content-planner --> differentiation-checker --> content-optimizer --> [PUBLISH]
| |
voice-trainer engagement-coach
(5x5x5 + first-hour
+ CEA commenting)
analytics-interpreter
(interpret + report modes)
```
Parallel support agents: `strategy-advisor`, `analytics-interpreter`, `network-builder`, `content-repurposer`, `video-scripter`.
Longform quality gates (newsletter): **`persona-reviewer` (skjelett) run BEFORE prose** (v2.1, Step 2.5) → `voice-scrubber` de-AI / chronicle-voice scrub (v2.2, Step 4) → `fact-checker` (Step 5) → `persona-reviewer` (resonance) run BEFORE lock (Step 6) → `persona-reviewer` (conversion) run AFTER lock on the hook (Step 9).
> **Note (agent invocation + reload):** Commands invoke agents by their **namespaced**
> type — `subagent_type: linkedin-thought-leadership:<name>`, never the bare name. And a
> **newly added** agent file under `agents/` only becomes invokable after a Claude Code
> **session reload** (the plugin agent set is built at session start). Add the agent, then
> reload before invoking it.
### Which Agent Do I Need?
| Scenario | Agent |
|----------|-------|
| "Make this post better" | content-optimizer |
| "What should I post about?" | content-planner, trend-spotter |
| "Is this original enough?" | differentiation-checker |
| "Plan my week's content" | content-planner |
| "How did I do this week?" | analytics-interpreter (report mode) |
| "Analyze my LinkedIn data" | analytics-interpreter (interpret mode) |
| "Help me engage more" | engagement-coach |
| "Who should I comment on?" | engagement-coach |
| "Build my network" | network-builder |
| "Does this sound like me?" | voice-trainer |
| "Repurpose my best post" | content-repurposer |
| "What's trending in my field?" | trend-spotter |
| "How do I monetize?" | strategy-advisor |
| "How is my latest post doing?" | post-feedback-monitor |
| "How personalized is my plugin?" | `/linkedin:setup` |
| "Write a LinkedIn video script" | video-scripter |
---
## Knowledge Base
The plugin includes **24 reference documents** covering the full LinkedIn thought leadership domain:
| Category | Document | When to Use |
|----------|----------|-------------|
| Algorithm | `algorithm-signals-reference.md` | Profile setup, troubleshooting reach |
| Angles | `thought-leadership-angles.md` | Choosing post angle (8 universal angles) |
| Engagement | `engagement-frameworks.md` | Writing hooks, CTAs, 5x5x5 method |
| Formats | `linkedin-formats.md` | Choosing content format |
| Growth | `linkedin-growth-playbook-2025-2026.md` | Strategy deep-dive |
| Monetization | `linkedin-monetization-strategies.md` | Revenue planning |
| Newsletter | `newsletter-strategy-guide.md` | Newsletter strategy (5,000+ followers) |
| Articles | `articles-strategy-guide.md` | Long-form content |
| Roadmaps | `growth-roadmaps.md` | Monthly planning |
| Low-frequency | `low-frequency-posting-strategy.md` | 2-3x/week strategy |
| Collaborations | `collaborations-guide.md` | Partnership strategy |
| Opportunities | `opportunity-generation.md` | Business development |
| Analytics | `analytics-tools-guide.md` | Finding your edge |
| Troubleshooting | `troubleshooting-guide.md` | When reach drops |
| URLs | `url-processing-templates.md` | Converting external content |
| AI Content | `ai-content-framework.md` | AI-specific angles |
| First Comment | `first-comment-strategy.md` | Comment templates and timing |
| Visual Style | `linkedin-visual-style.md` | Image and carousel specs |
| Polls | `poll-strategy-guide.md` | Poll question types and follow-up |
| A/B Testing | `ab-testing-framework.md` | Content experiment design |
| Scheduling | `scheduling-strategy.md` | Optimal posting times and rotation |
| Trajectory | `trajectory-strategy-adjustments.md` | Growth trajectory adjustments |
| Video | `video-strategy-guide.md` | LinkedIn video best practices |
| Glossary | `glossary.md` | 38 plugin-specific terms |
---
## Skills
Six domain-specific skills organize the plugin's knowledge and route commands to the right context:
| Skill | Domain | Commands Routed |
|-------|--------|-----------------|
| `linkedin-thought-leadership` | Router + shared knowledge (algorithm, quality rules) | `/linkedin`, `/linkedin:setup` |
| `linkedin-content-creation` | Posts, batch, pipeline, video, calendar, newsletter | `/linkedin:post`, `:quick`, `:pipeline`, `:batch`, `:calendar`, `:video`, `:multiplatform`, `:newsletter`, `:carousel` |
| `linkedin-analytics` | Analysis, reporting, import, A/B testing | `/linkedin:analyze`, `:audit`, `:import`, `:report`, `:ab-test` |
| `linkedin-strategy` | Growth, authority (absorbed), competitive, monetization | `/linkedin:strategy`, `:competitive`, `:monetize` |
| `linkedin-networking` | Engagement, collaborations, speaking (all in `outreach`) | `/linkedin:outreach` |
| `linkedin-voice` | Voice training, profile optimization, differentiation | `/linkedin:profile` |
---
## Hooks & Automation
9 hooks across 7 events provide automated quality gates, state management, and proactive reminders. All hooks are Node.js (.mjs) for cross-platform support.
| Event | Type | Purpose |
|-------|------|---------|
| `SessionStart` | command | Load persistent state, posting metrics, REMEMBER.md context, and 10K milestone tracker |
| `PreToolUse` (Write\|Edit) | command | **Content quality gate** — hook length, link check, tone, post length |
| `PreToolUse` (Write\|Edit) | command | **Voice guardian** — AI authenticity check and voice matching |
| `PreToolUse` (Write\|Edit) | command | **Topic rotation gate** — no back-to-back same pillar, no pillar >50% in 14-day window |
| `Stop` | command | Update state file with posting metrics and pre-publish reminders |
| `UserPromptSubmit` | command | LinkedIn context enrichment based on prompt keywords (two-tier matching) |
| `PostToolUse` (Write) | command | Post-creation automation: alternative hooks, posting time, 5x5x5 reminder |
| `PreCompact` | command | Preserve critical LinkedIn context during context compaction |
| `Notification` (idle_prompt) | command | Proactive posting reminders: streak risk, weekly goals, optimal windows (rate-limited 30min) |
### How Hooks Collaborate
PreToolUse hooks use a shared **content-gatekeeper** (`content-gatekeeper.mjs`) that first checks `isLinkedInContent()` before injecting the relevant prompt. This prevents false positives on non-LinkedIn file edits.
Session markers (`/tmp/linkedin-hooks/session-active`) are set when LinkedIn content is detected. The Stop hook only fires state updates if this marker exists (max 12h staleness). The Notification hook rate-limits via a separate marker with a 30-minute cooldown.
> [!NOTE]
> Prompt content lives in `hooks/prompts/*.md` and is loaded dynamically at runtime. The compiled `hooks.json` is generated from `hooks.template.json` — do not edit it directly.
---
## Analytics System
A Node.js CLI tool for parsing LinkedIn CSV exports into structured JSON.
### Workflow
1. Export analytics CSV from LinkedIn
2. Place in `assets/analytics/exports/` (or use auto-detect from ~/Downloads)
3. Run `/linkedin:import` to parse into structured JSON
4. Run `/linkedin:report` to generate weekly performance reports
### CLI Usage
```bash
ANALYTICS_ROOT="${CLAUDE_PLUGIN_ROOT}/assets/analytics" \
node --import tsx "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" import <file>
ANALYTICS_ROOT="${CLAUDE_PLUGIN_ROOT}/assets/analytics" \
node --import tsx "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" report --week <W>
ANALYTICS_ROOT="${CLAUDE_PLUGIN_ROOT}/assets/analytics" \
node --import tsx "${CLAUDE_PLUGIN_ROOT}/scripts/analytics/src/cli.ts" trends --period <P> --metric <M>
```
### Storage
```
assets/analytics/
├── exports/ # Raw CSV from LinkedIn (drop files here)
├── posts/ # Imported post data as JSON
└── weekly-reports/ # Generated weekly reports
```
Agents that consume analytics data: `analytics-interpreter` (interpret/report modes).
---
## Personalization Engine
The plugin tracks how well you've populated asset templates with your own data. A higher personalization score means more tailored content output.
### Scoring Categories (100 points total)
| Category | Weight | Source |
|----------|--------|--------|
| Voice samples | 25 | `assets/voice-samples/` |
| User profile | 20 | `config/user-profile.local.md` |
| Case studies | 15 | `assets/case-studies/` |
| Frameworks | 10 | `assets/frameworks/` |
| High-engagement posts | 10 | `assets/examples/` |
| Demographics | 8 | `assets/audience-insights/` |
| Engagement patterns | 7 | `assets/audience-insights/` |
| Post templates | 5 | `assets/templates/` |
Run `/linkedin:setup` to see your current score and walk through guided workflows for each category. The score is also displayed in your session status line at startup.
### Assets Directory
| Directory | Contents |
|-----------|----------|
| `templates/` | Post type templates, carousel blueprints, article template, content calendar |
| `checklists/` | Quality scorecard for pre-publish checks |
| `examples/` | High-engagement post examples |
| `voice-samples/` | Your authentic voice reference (add your own) |
| `audience-insights/` | Demographics and engagement patterns |
| `case-studies/` | Case study template for your real stories |
| `frameworks/` | Framework template for your methodologies |
| `analytics/` | Imported data, weekly reports (gitignored) |
| `drafts/` | Post scheduling queue and weekly drafts (gitignored) |
---
## Workflow Examples
### 1. Sunday Content Prep
```
/linkedin:batch
> Theme: AI adoption in government IT
# Creates 3-5 posts with varying angles and formats
# Posts are added to the scheduling queue
/linkedin:calendar
# Review the upcoming week's schedule
```
### 2. Quick React Post (5 minutes)
```
/linkedin:quick
> Just saw Microsoft announce Copilot Studio autonomous agents —
> this changes everything for low-code teams
```
### 3. Import Analytics and Review Performance
```
/linkedin:import
> ~/Downloads/linkedin-analytics-2026-02.csv
/linkedin:report
> Show me last week's performance
/linkedin:audit
> Full quarterly review
```
### 4. Grow from 2K to 5K Followers
```
/linkedin:strategy
> I have about 2,500 followers and want to reach 5K
/linkedin:competitive
> Analyze the top 5 thought leaders in Microsoft AI for government
```
### 5. Repurpose a Viral Post
```
/linkedin:multiplatform
> Take my best-performing post and adapt it for a newsletter intro,
> a Twitter thread, and 3 presentation slides
```
---
## Content Quality Rules
The plugin enforces quality standards through hooks and agent behavior:
| Rule | Threshold | Enforcement |
|------|-----------|-------------|
| Hook length | 110-140 characters | PreToolUse quality gate |
| Post length (standard) | 1,200-1,800 characters | PreToolUse quality gate |
| Post length (quick) | 150-500 characters | PreToolUse quality gate |
| No external links in body | 0 links | PreToolUse quality gate (40-50% reach suppression) |
| No corporate buzzwords | Blocklist: leverage, synergy, paradigm shift, thought leader, disruptive, value proposition, ecosystem, holistic approach | PreToolUse quality gate |
| Topic alignment | Must align with 5 core expertise areas | 360Brew signal check |
| Topic rotation | No back-to-back same pillar; no pillar >50% in 14 days | Topic rotation gate (warn-only) |
| Voice consistency | AI authenticity check + voice matching | Voice guardian hook |
---
## Configuration
### User Profile
```bash
cp config/user-profile.template.md config/user-profile.local.md
```
Edit with your name, expertise areas, target audience, voice preferences, and LinkedIn goals. The more detail you provide, the more personalized the output.
### State File
The plugin tracks posting metrics in `~/.claude/linkedin-thought-leadership.local.md`:
```yaml
---
last_post_date: 2026-01-28
posts_this_week: 2
weekly_goal: 3
current_streak: 12
current_week: "2026-W05"
follower_count: 0
follower_target: 10000
target_date: "2026-12-31"
next_planned_topic: ""
---
```
State is automatically initialized on first session start (from `config/state-file.template.md`) and updated by the Stop hook after each content session.
### Post Queue
Scheduled posts are tracked in `assets/drafts/queue.json`:
- Managed by `queue-manager.mjs` (imported by session-start, posting-reminder, and commands)
- Status flow: `draft` -> `scheduled` -> `published` (or `cancelled`)
- Created by `/linkedin:batch` and `/linkedin:pipeline`
- Viewed via `/linkedin:calendar`
- Transitioned (marked as published) via the `/linkedin:calendar` publish action
---
## What This Plugin Does Not Cover
| Area | Why | Alternative |
|------|-----|-------------|
| LinkedIn API integration | No official API for content posting | Copy/paste from generated drafts |
| Real-time analytics | LinkedIn doesn't provide streaming data | Periodic CSV import via `/linkedin:import` |
| Engagement automation | Automated commenting violates LinkedIn ToS | Manual engagement guided by `/linkedin:outreach` |
| Profile editing | Plugin generates recommendations, not API calls | Apply changes manually on LinkedIn |
| Team/multi-user workflows | Designed for individual thought leaders | Enterprise LinkedIn tools |
| Content scheduling via API | No official scheduling API | Queue management with manual posting via `/linkedin:calendar` (publish action) |
---
## Version History
| Version | Date | Highlights |
|---------|------|-----------|
| **2.3.0** | 2026-05-28 | Visual assets as an explicit pipeline phase. New **Step 7.5 — Visual assets** in `/linkedin:newsletter` (between annotation and lock): cover (+ optional inline figures) or carousel deck, generated (default `mcp-image`; external `cover-raw.png` accepted) and operator-gated via `SendUserFile` BEFORE lock so `build-linkedin.mjs` picks up `cover.png` without a post-lock re-render. Explicit `format: "carousel"` branch reusing `build-carousel.mjs`. New `config/image-credit-caption.template.md`; additive `visualAssets` state + naming convention (`cover.png` / `cover-v<N>-kandidat.png` / `cover-raw.png` / `fig<N>.png`). Pipeline 13 → 14 phases. Doc/orchestration-only (no new code); commands (24) + agents (15) unchanged. |
| **2.2.0** | 2026-05-28 | Longform gates hardened (2nd production run). Persona gate blocking with explicit hard-fail list (primær mistet meg / doesn't own action / sjargong-mur / modell-navne-katalog → BLOCK; «JA med forbehold» = NEI). Fact-check post-cutoff web-search mandate + high-frequency-error checklist. New `voice-scrubber` agent (Opus): de-AI scrub + Norwegian-chronicle voice-drift, gold standard = approved Norwegian editions (NOT the English post corpus). Render+annotate operator gates (Steps 2.5/3a). Edition state reconciled with STATE.md (ONE-system); `edition-HANDOVER.template.md` deleted. 14 → 15 agents; commands unchanged (24). |
| **2.1.0** | 2026-05-28 | Skeleton gate BEFORE prose in `/linkedin:newsletter`. New Step 2.5 (skeleton + section pitch, operator-gate + persona-skjelett-sweep) and Step 3a (spine prose, operator-gate) split the old Step 3 into pre-prose stages with their own gates. New `persona-reviewer` mode (`skjelett`). Pipeline grows 11 → 13 phases; commands and agents unchanged in count (24, 14). Encodes the Maskinrommet writing-contract §A discipline (premiss / problem / anbefaling / gevinst / vei videre) into the pipeline. Empirically motivated by the Seres-serien Del 3 + Del 4 spine-rework cost. |
| **2.0.0** | 2026-05-28 | Full-spectrum content engine. `/linkedin:newsletter` long-form orchestrator with multi-session edition-state, fact-check + persona-sweep gates BEFORE lock. New agents: `fact-checker`, `persona-reviewer` (both Opus). Render pipeline migrated in-plugin with self-hosted OFL-1.1 fonts. Net-fewer surface: 27 → 24 commands (5 removed, 2 added), 16 → 14 agents (4 merged, 2 added). Router gating on monetize/outreach (unlocks at ~1K). `/linkedin:import` delegates analysis to `/linkedin:report`. |
| **1.2.0** | 2026-04-11 | Friction reduction release. Auto-clipboard on all content commands, reduced interactive steps (max 2 per post), deterministic state management (`state-updater.mjs`), MCP image carousel pipeline, progressive onboarding, iCal calendar integration for batch scheduling, auto-prune content history (90 days). |
| **1.1.0** | 2026-04-08 | Q2 feature release. 27 commands (+onboarding, +carousel). Week-rollover automation, voice drift scoring, industry content matrix, multi-URL react, day-of-week heatmap, month-over-month reports. |
| **1.0.0** | 2026-04-07 | Public release. 25 commands, 16 agents, 9 hooks, 6 skills, 24 reference docs. Agent model tiering (Sonnet/Haiku), all scripts Node.js, comprehensive documentation. |
| **0.6.0** | 2026-02-07 | First formal version. 20 commands, 15 agents, 8 hooks, analytics system, 360Brew profile optimization, content matrix system, personalization engine, 20 reference documents. |
See [CHANGELOG.md](CHANGELOG.md) for full details and known gaps.
---
## License
This project is licensed under the [MIT License](LICENSE).
The plugin architecture, content strategies, and algorithm analysis are original work. LinkedIn is a trademark of LinkedIn Corporation.
---
*The algorithm rewards expertise, consistency, and authenticity. Everything else is noise.*