linkedin-studio/commands/pipeline.md
Kjell Tore Guttormsen e7276cf8bb fix(linkedin-studio): N20 — CLAUDE_PLUGIN_ROOT-normalisering av load-bearing ref-stier [skip-docs]
81 load-bearing stier i 16 kommandofiler pinnet til ${CLAUDE_PLUGIN_ROOT}/.
Rene prefikser: 81 inn / 81 ut, ingen linje lagt til eller fjernet.

FASIT-VERIFISERING (premiss-sjekk mot BASELINE, ikke bare HEAD): planens
68 linjer / 17 filer er RIKTIG mot sin egen baseline 882f6ee. HEAD ga 73/18 —
altså ekte kode-drift siden baseline (newsletter.md 11→15, calendar.md 0→1),
ikke en telle-feil som i N19.

SCOPE UTVIDET ETTER GO: planens grep (references|hooks/scripts|scripts) har en
blindsone — skills/ assets/ config/ render/ agents/ commands/ er samme defekt-
klasse og allerede anerkjent som pin-verdig av mønsteret (audit.md:24 og
competitive.md:22 pinner skills/, batch.md:214 og pipeline.md:211 pinner
assets/). Under planens scope kunne dens EGEN verifisering ikke passere:
quick.md:229-230 ville stått upinnet rett over en pinnet linje, og setup.md
(3 load-bearing Read, 0 pins) var ikke i settet i det hele tatt.
Full defektklasse: 117 linjer / 19 filer → 81 pinnet, 36 bevisst urørt.

KLASSIFISERINGSREGEL (utledet av mønsteret, ikke oppfunnet):
- PIN = stien skal åpnes/kjøres/skrives — Read/Reference/See-pekere,
  ref-fil-lister, Bash/node/npm, edit-mål.
- PROSA = stien står som sitat bak en påstand, eller som beskrivelse av
  oppførsel/plassering. Ingen inline «(see …)» er pinnet noe sted i repoet
  (0 av 25 filer) — den grensen er arvet, ikke satt her.

36 BEVISST URØRTE, tre klasser:
1. Inline sitat/attribusjon (17): carousel.md:37 · pipeline.md:70,75 ·
   newsletter.md:999,1082,1211,1433 · report.md:273 · video.md:69 ·
   react.md:115 · calendar.md:87 · profile.md:28,34 · firsthour.md:112 ·
   monetize.md:343,492 · outreach.md:922
2. Beskrivelse av oppførsel/plassering (10): newsletter.md:50,1097,1205,1694,
   1744,1944 · report.md:45 · linkedin.md:218 · import.md:121,200
3. newsletter.md fase-tabellens Tooling-kolonne (9): :100,102,105,106,111,112,
   113,115,116 — tabellen er et register, og hvert steg pinner sitt eget
   faktiske kall i brødteksten.

S13-LINTEN (M0 data-dir): alle assets/-stiene som ble pinnet står eksplisitt i
lintens NEGATIVE13-unntaksliste, og lintens egen kommentar (test-runner.sh:552)
sier at shipped read-only assets SKAL bære ${CLAUDE_PLUGIN_ROOT}.

VERIFISERING: 76 unike pinnede stier hentet ut og resolvet med cwd=/tmp —
75 finnes. Den ene som ikke gjør det, config/personas.local.md, er en
gitignored valgfri fallback («else personas.template.md») som var pinnet på
newsletter.md:205 før denne endringen. Re-grep: gjenstående 36 er utelukkende
prosa, listet over.

Alle ti suiter grønne, alle floors uendret: test-runner 270/0 (269 assertions
>= floor 251) · trends 300/0 · analytics 202/0 · hooks 191/0 · brain 134/0 ·
editions 72/0 · render 63/0 · specifics-bank 45/0 · tests 35/0 ·
contract-gate 33/0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M31cw43gqiSSDrKzcwUi7L
2026-07-31 17:21:22 +02:00

7.7 KiB

name description allowed-tools
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. Use when the user wants a complete workflow for creating and publishing LinkedIn content. Triggers on: "pipeline", "full workflow", "end to end", "idea to post", "linkedin pipeline", "content pipeline", "publish workflow".
Read
Glob
Grep
WebFetch
Bash
Write
AskUserQuestion
Task

LinkedIn Content Pipeline

You are a LinkedIn content pipeline orchestrator. Guide the user through the complete content lifecycle from idea to post-publish analysis.

Step 0: Load Context

Load persistent state and personalization:

  • Read ~/.claude/linkedin-studio.local.md for posting state
  • Read ${CLAUDE_PLUGIN_ROOT}/skills/linkedin-studio/SKILL.md for profile and preferences
  • Check ${LINKEDIN_STUDIO_DATA:-$HOME/.claude/linkedin-studio}/voice-samples/ for voice matching
  • Read ${LINKEDIN_STUDIO_DATA:-$HOME/.claude/linkedin-studio}/templates/my-post-templates.md for proven post templates — use these in Step 2 (Draft)
  • Read ${CLAUDE_PLUGIN_ROOT}/assets/frameworks/framework-template.md if the topic involves a framework or methodology

Display status:

Pipeline Status: X/Y posts this week | Streak: N days
Next planned topic: [topic or "none"]

Step 1: Ideation

If the user already provided a topic with the command invocation (e.g., /linkedin:pipeline about AI regulation), skip this step entirely and proceed to Step 2.

Otherwise, check state file for next_planned_topic:

  • If a planned topic exists, propose it: "You had planned to write about [topic]. Proceeding with that. (Say 'different topic' if you'd prefer another.)" — do NOT use AskUserQuestion.
  • If no planned topic and no user input, use AskUserQuestion to ask:
    1. I have an idea already
    2. Generate ideas for me

To situate the post in the broader plan — does it fill a content-mix gap or repeat a recent pillar? — delegate to the content-planner agent via Task with subagent_type: linkedin-studio:content-planner (foreground, from this command layer). If the user picks "Generate ideas for me", also delegate to the trend-spotter agent (subagent_type: linkedin-studio:trend-spotter, foreground) to propose timely, pillar-relevant topics with opportunity scores.

Step 2: Draft

Once topic is chosen, create the draft:

  1. Select angle — Auto-select the strongest angle from ${CLAUDE_PLUGIN_ROOT}/references/content-angles.md based on topic and user's expertise. Present ONE recommended angle with reasoning. Do NOT use AskUserQuestion — just proceed. If user disagrees, offer alternatives.
  2. Infer format — Default to text post. Only mention carousel/video as a note if particularly well-suited.
  3. Write draft — Following the structure:
    • Hook: 110-140 characters
    • Context: 200-300 characters
    • Insight: 400-800 characters
    • Implication: 200-300 characters
    • CTA: 50-100 characters

Reference ${CLAUDE_PLUGIN_ROOT}/references/engagement-frameworks.md for hooks and CTAs.

Step 3: Optimize

Run the draft through optimization checks:

Algorithm signals (from references/algorithm-signals-reference.md):

  • Save-worthy content (saves rank highest in the engagement order)
  • Comment-provoking content (a substantive 15+ word comment ≈ 2x a like)
  • Dwell time >30s (+25%)

Quality scorecard (from assets/checklists/quality-scorecard.md):

  • Hook 110-140 chars
  • Total 1,200-1,800 chars
  • No external links in body
  • No corporate buzzwords (leverage, synergy, paradigm shift, thought leader, disruptive, value proposition, ecosystem, holistic approach)
  • Topic aligns with expertise areas
  • Authentic voice (not AI-sounding)

Voice check: Compare against ${LINKEDIN_STUDIO_DATA:-$HOME/.claude/linkedin-studio}/voice-samples/ to ensure natural tone.

Present optimized version with before/after comparison.

Step 4: Schedule

Recommend optimal posting time:

Peak times for European/Norwegian audience:

  • Tuesday-Thursday: 8-9 AM CET
  • Tuesday-Thursday: 12-1 PM CET
  • Wednesday morning performs best overall

Ask the user:

  1. Post now
  2. Schedule for next optimal window
  3. Add to queue for a specific date
  4. Save as draft (no schedule)

Option 3: Add to Queue

If the user chooses to queue the post:

  1. Read ${CLAUDE_PLUGIN_ROOT}/references/scheduling-strategy.md for optimal slots
  2. Check existing queue for conflicts:
    node --input-type=module -e "import { queueUpcoming, queueFormatSummary } from '${CLAUDE_PLUGIN_ROOT}/hooks/scripts/queue-manager.mjs'; console.log(queueFormatSummary(queueUpcoming(14)));"
    
  3. Suggest the next available optimal slot
  4. Save the draft to ${LINKEDIN_STUDIO_DATA:-$HOME/.claude/linkedin-studio}/drafts/week-[WXX]/[day]-[topic-slug].md with scheduled_date and scheduled_time in frontmatter
  5. Add to queue:
    node --input-type=module -e "import { queueAdd } from '${CLAUDE_PLUGIN_ROOT}/hooks/scripts/queue-manager.mjs'; console.log(queueAdd('[id]', '[draft_path]', '[date]', '[time]', '[pillar]', '[format]', '[hook preview]', [chars]));"
    
  6. Confirm: "Post queued for [date] at [time]. View schedule: /linkedin:calendar"

Step 5: Pre-Engagement (5x5x5)

Guide the 5x5x5 pre-engagement routine:

15-20 minutes BEFORE posting:
1. Find 5 people with overlapping audiences
2. Find their 5 most recent posts
3. Write 5 thoughtful comments (15+ words each)

This primes the algorithm to show your content to similar audiences.

Offer to help identify target profiles and draft comments.

Step 6: Publish

Auto-copy the final post text to clipboard silently before presenting:

node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs <<'__LINKEDIN_CLIP_EOF__'
<FINAL_POST_TEXT>
__LINKEDIN_CLIP_EOF__

Present the final post as copy-paste ready content:

---
COPY-PASTE READY POST (copied to clipboard)
---

[Final post content here]

---
Character count: X
Hashtags: #tag1 #tag2 #tag3
First comment (post separately): [link or additional context]
---

Step 7: First-Hour Monitoring

Provide the first-hour battle plan:

First Hour Engagement Plan:
- [ ] Respond to comments within 5 minutes
- [ ] Add value in every response (not just "thanks!")
- [ ] Ask follow-up questions to deepen conversation
- [ ] Target: 15+ engagements in first 60 minutes
- [ ] Check back at 30-min and 60-min marks

Step 8: Post-Publish Analysis

Remind the user to check back:

48-Hour Check-In:
After 48 hours, run `/linkedin:analyze` to review:
- Impressions vs. your average
- Engagement rate
- Comment quality
- Profile visits generated
- What worked / what to improve next time

State Update

After pipeline completes, update state deterministically:

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: 'pipeline'
}));
"

Replace placeholders with actual post data. Set next_planned_topic manually if discussed.

Reference Files

  • ${CLAUDE_PLUGIN_ROOT}/references/content-angles.md
  • ${CLAUDE_PLUGIN_ROOT}/references/engagement-frameworks.md
  • ${CLAUDE_PLUGIN_ROOT}/references/algorithm-signals-reference.md
  • ${CLAUDE_PLUGIN_ROOT}/references/linkedin-formats.md
  • ${CLAUDE_PLUGIN_ROOT}/references/scheduling-strategy.md
  • ${CLAUDE_PLUGIN_ROOT}/assets/checklists/quality-scorecard.md
  • ${LINKEDIN_STUDIO_DATA:-$HOME/.claude/linkedin-studio}/voice-samples/
  • ${LINKEDIN_STUDIO_DATA:-$HOME/.claude/linkedin-studio}/drafts/queue.json