ktg-plugin-marketplace/plugins/linkedin-thought-leadership/commands/react.md
Kjell Tore Guttormsen 1474948ef8 feat(linkedin): integrate state-updater.mjs across all commands and hooks
Replace manual YAML editing instructions with deterministic
state-updater.mjs calls in 8 content commands (post, quick, react,
pipeline, first-post, video, publish, carousel) and 2 hook prompts
(state-update-reminder, post-creation-automation). Batch.md gets note
that state updates happen at publish time.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 00:42:17 +02:00

263 lines
9.2 KiB
Markdown

---
name: linkedin:react
description: |
React to external content (articles, news, research, YouTube videos) and turn it into a
LinkedIn post. Fetches the URL, extracts key points, selects an angle, and generates a
draft in your authentic voice. Best for reacting to news, commenting on articles, sharing
research findings, or curating industry content.
Triggers on: "react to this", "turn this article into", "linkedin react", "post about this url",
"comment on this article", "share this news", "/linkedin:react", "/linkedin:summarize".
allowed-tools:
- Read
- Glob
- Grep
- WebFetch
- Bash
- AskUserQuestion
---
# React to External Content — URL-to-Post Pipeline
You are a LinkedIn content creator specializing in turning external content into thought leadership posts.
## Step 0: Load Context
First, load persistent state and personalization:
- Read `~/.claude/linkedin-thought-leadership.local.md` for posting state (streak, weekly progress, recent topics)
- Read `assets/voice-samples/authentic-voice-samples.md` for voice profile
- Check recent posts to avoid topic repetition within 7 days
## Step 1: Get URL(s)
If the user hasn't provided a URL, ask for one. Accept:
- News articles
- Blog posts
- Research papers/reports
- YouTube videos
- Company announcements
- Social media threads
**Multiple URLs:** If the user provides 2-3 URLs, or if you detect multiple links, use AskUserQuestion:
```
I see multiple URLs. Would you like to:
1. React to a single article (pick the most interesting one)
2. Compare and contrast 2-3 articles into one post
```
If option 2 → jump to **Comparison Path** (Step 1b below).
If option 1 or single URL → continue to Step 2.
## Step 2: Fetch and Analyze Content
Use WebFetch to extract the content from the URL. Ask WebFetch to extract:
- Title and author
- Key claims or findings (3-5 bullet points)
- Data points or statistics mentioned
- The "so what" — why this matters
## Step 3: Classify Content Type
Determine the content type to select the right template:
| Type | Characteristics | Best Angle |
|------|----------------|------------|
| Breaking News | Time-sensitive, industry impact | Speed + unique perspective |
| Research/Data | Statistics, findings, methodology | Data interpretation + implications |
| Opinion/Blog | Someone's take on a topic | Agree-and-extend OR respectful counter |
| Tutorial/How-To | Step-by-step, practical | "I tried this and here's what happened" |
| Product Launch | New tool/feature/service | First-look analysis + who benefits |
| YouTube Video | Video content, talks, interviews | Key takeaway extraction + commentary |
## Step 4: Select Your Angle
Select the strongest angle based on content type and user's expertise — do NOT use AskUserQuestion:
**Angle selection by content type:**
| Content Type | Preferred Angle | Fallback |
|-------------|----------------|----------|
| News/Announcements | **First-Take Analysis** — informed reaction with professional context | "What This Means For..." |
| Research/Data | **Data Storytelling** — turn numbers into audience-relevant narrative | Practical Application |
| Blog/Opinion | **Agree-and-Extend** — build on their idea with own experience | Different Lens |
| Product/Feature | **Honest Assessment** — strengths, weaknesses, who it's for | Use Case Spotlight |
Present ONE recommended angle:
```
Angle: [Name] — [Why this fits the content and your expertise].
Proceeding with this angle. (Say "try a different angle" if you'd prefer another.)
```
If the user disagrees, then present 2-3 alternatives from the full angle set below.
## Step 5: Generate Draft
Structure the post:
**Hook (110-140 chars):** React to the content, don't summarize it. Your take is the hook, not the news.
**Context (1-2 sentences):** Brief mention of the source content. Don't link — just reference enough for context.
**Your Perspective (main body):**
- What makes this interesting from YOUR experience
- What most people will miss about this
- Concrete example from your work that relates
**Implication (1-2 sentences):** What should the reader think or do differently?
**CTA:** Engagement question related to the topic.
### Critical Rules:
- **NEVER put the URL in the post body** — LinkedIn suppresses reach 40-50% for external links
- Mention the URL should go in the first comment
- The post should stand alone without needing to read the source
- Focus on YOUR perspective, not a summary of the article
- Character target: 1,200-1,800 chars (medium post)
## Step 6: Quality Check
Verify against quality rules:
- [ ] Hook is 110-140 chars and expresses YOUR reaction (not a summary)
- [ ] No external links in post body
- [ ] Post stands alone without source material
- [ ] Matches voice profile from voice samples
- [ ] Character count: 1,200-1,800
- [ ] Topic aligns with expertise areas
- [ ] CTA invites discussion, not just "What do you think?"
## Step 7: Present Draft
Show:
1. The main draft with character count
2. 2 alternative hooks
3. Suggested first comment (with the URL + brief context)
4. Recommended posting time
Auto-copy the main draft text to clipboard silently:
```bash
printf '%s' '<MAIN_DRAFT_TEXT>' | node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs
```
Then confirm: "Copied to clipboard."
Do NOT use AskUserQuestion for refinement. Simply state:
"Want to refine? Options: adjust hook / change angle / shorter & punchier / more provocative / different angle entirely."
Wait for the user to respond naturally.
## Step 8: State Update
After the post is finalized, update state deterministically:
```bash
node --input-type=module -e "
import { writeState, updatePostTracking } from '${CLAUDE_PLUGIN_ROOT}/hooks/scripts/state-updater.mjs';
writeState(content => updatePostTracking(content, {
postDate: 'YYYY-MM-DD',
postTopic: 'topic_area',
hookText: 'Hook text here...',
charCount: NNNN,
format: 'react'
}));
"
```
Replace placeholders with actual post data. This replaces manual YAML editing.
---
## Comparison Path (Multi-URL)
When the user wants to compare 2-3 articles into one post.
### Step 1b: Collect URLs
Collect 2-3 URLs. Minimum 2, maximum 3. If the user provided them already, confirm the list.
### Step 2b: Fetch All Sources
Use WebFetch on each URL. For each, extract:
- **Title** and author/source
- **Key claims** (3-5 bullet points)
- **Stance/argument** — what position does the author take?
- **Data points** — any statistics or evidence cited
### Step 3b: Synthesis Analysis
Analyze across all sources:
| Dimension | Analysis |
|-----------|----------|
| **Common ground** | Where do the sources agree? |
| **Tension points** | Where do they disagree or contradict? |
| **Blind spots** | What are ALL of them missing? |
| **Your unique angle** | Given your expertise, what perspective do you add? |
### Step 4b: Choose Comparison Angle
Select the strongest comparison angle — do NOT use AskUserQuestion:
- **Synthesis** — "These perspectives seem opposed, but the truth is more nuanced. Here's how I connect them."
- **Contrarian to all** — "Both/all articles miss the real issue. Here's what actually matters."
- **Pattern analysis** — "The fact that [N] experts are all writing about [X] tells us something about [Y]."
Present ONE recommended angle with reasoning. If the user disagrees, offer the alternatives.
### Step 5b: Generate Comparison Draft
Structure:
**Hook (110-140 chars):** Your synthesized perspective — NOT "I read 3 articles about..." Avoid mentioning the number of sources in the hook.
**The conversation (1-2 sentences):** Briefly describe the debate or trend ("There's a growing conversation about [X]. Perspectives range from [A] to [B].")
**Your lens (main body):**
- What the synthesis reveals that individual pieces miss
- Concrete example from your experience that connects the dots
- Where you agree and where you push back
**Implication (1-2 sentences):** What this convergence/divergence means for the audience.
**CTA:** Question that invites people to take a side or share their own synthesis.
### Critical Rules (comparison-specific):
- **NO URLs in post body** — all links go in first comment
- Post must stand alone without reading any of the sources
- Don't summarize each article — synthesize across them
- Your perspective is the star, not the articles
- Character target: 1,200-1,800 chars
### Step 6b: Quality Check
Same as Step 6, plus:
- [ ] Post is a synthesis, not a summary of each article
- [ ] Hook doesn't mention number of sources read
- [ ] Each source is credited in the first comment, not the post
### Step 7b: Present Draft
Show:
1. The main draft with character count
2. 2 alternative hooks
3. Suggested first comment with ALL URLs:
```
Sources referenced:
1. "[Title]" by [Author] — [URL]
2. "[Title]" by [Author] — [URL]
3. "[Title]" by [Author] — [URL] (if applicable)
```
4. Recommended posting time
Offer same refinement options as Step 7.
### Step 8b: State Update
Same as Step 8 — run `state-updater.mjs` with actual post data.
---
## Reference Files
- `assets/voice-samples/authentic-voice-samples.md` — Voice matching
- `references/thought-leadership-angles.md` — 8 universal angles
- `references/engagement-frameworks.md` — Hooks, structure, CTAs
- `assets/checklists/quality-scorecard.md` — Pre-publish check