Build LinkedIn thought leadership with algorithmic understanding, strategic consistency, and AI-assisted content creation. Updated for the January 2026 360Brew algorithm change. 16 agents, 25 commands, 6 skills, 9 hooks, 24 reference docs. Personal data sanitized: voice samples generalized to template, high-engagement posts cleared, region-specific references replaced with placeholders. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
15 KiB
Integration Test Guide: LinkedIn Thought Leadership Plugin
Manual integration testing scenarios for commands, agents, and hooks in the plugin.
Prerequisites
Before testing, ensure:
~/.claude/linkedin-thought-leadership.local.mdexists (create fromconfig/state-file.template.md)- Voice samples exist in
assets/voice-samples/authentic-voice-samples.md - Quality scorecard exists at
assets/checklists/quality-scorecard.md - Plugin is installed: appears in Claude Code's skill/command list
/linkedin:pipeline — End-to-End Tests
Test 1: Full Pipeline — Idea to Post
Goal: Execute the complete 8-step pipeline from ideation to publish-ready post.
Steps:
- Run
/linkedin:pipeline - Verify Step 0 loads: state file read, status displayed (posts/week, streak)
- Choose "Generate ideas for me" when prompted
- Verify 3 topic suggestions appear, drawn from
thought-leadership-angles.md - Select a topic → verify angle selection (2-3 options)
- Choose format → verify draft follows structure (hook/context/insight/implication/CTA)
- Verify optimization checks run:
- Hook: 110-140 chars
- Total: 1,200-1,800 chars
- No external links in body
- No corporate buzzwords
- Verify scheduling recommendation mentions CET times
- Verify 5x5x5 guidance is provided
- Verify copy-paste ready output with character count and hashtags
- Verify first-hour monitoring plan is shown
- Verify 48-hour check-in reminder appears
Expected outcome: A complete, publish-ready post with all quality checks passed.
Hooks that fire:
SessionStart→ loads stateUserPromptSubmit→ injects contextPreToolUse (Write)→ quality gate + voice guardian (if draft is written to file)PostToolUse (Write)→ alternative hooks + posting time suggestionStop→ state update + pre-publish reminders
Test 2: Pipeline with Existing Topic
Goal: User provides their own topic, skipping ideation.
Steps:
- Run
/linkedin:pipeline - Choose "I have an idea already"
- Provide topic: "Why AI agents will replace workflows in 2026"
- Verify the topic is used directly (no override)
- Verify angle suggestions are relevant to the provided topic
- Complete the remaining steps
Expected outcome: Post is created on the user's topic, not a generated one.
Test 3: Pipeline with State File Missing
Goal: Graceful handling when state file doesn't exist.
Steps:
- Temporarily rename
~/.claude/linkedin-thought-leadership.local.md - Run
/linkedin:pipeline - Verify: no crash, reasonable fallback (e.g., "No posting data found. Starting fresh.")
- Complete the pipeline
- Verify: state file is created after pipeline completes
Expected outcome: Pipeline works without state file, creates one at the end.
Test 4: Pipeline — Draft Save Option
Goal: Verify "Save as draft for later" works.
Steps:
- Run
/linkedin:pipeline - Create a post
- At scheduling step, choose "Save as draft for later"
- Verify: no posting reminders (5x5x5, first-hour) are shown for drafts
- Verify: state file is NOT updated with post date (it's a draft, not published)
Expected outcome: Draft is saved without publishing-related actions.
/linkedin:batch — End-to-End Tests
Test 5: Full Batch — 3 Posts from One Theme
Goal: Create 3 posts from a single theme with varying angles and formats.
Steps:
- Run
/linkedin:batch - Verify Step 0 loads: state file, check for existing weekly plan
- Choose "One main theme"
- Provide theme: "The future of AI in public sector"
- Verify batch plan shows 3 posts with:
- Different angles (not repetitive)
- Mixed formats (not all the same)
- Different target days
- Approve the plan
- Verify each post:
- Follows structure (hook 110-140 chars, 1,200-1,800 total)
- Has unique angle
- Quick quality check passes
- Verify posts are saved to
assets/drafts/week-[WXX]/ - Verify filenames follow pattern:
[day]-[topic-slug].md - Verify YAML frontmatter in each file (planned_date, pillar, angle, format, status)
- Verify summary shows content mix and pillar coverage
- Approve all drafts
- Verify posting schedule with recommended times
Expected outcome: 3 distinct posts saved in correct directory with proper metadata.
Test 6: Batch — Content Pillar Mode
Goal: Batch using existing content pillar.
Steps:
- Run
/linkedin:batch - Choose "Content pillar"
- Select from user's defined pillars in skill file
- Verify posts are created around that pillar
- Verify angle variety (not same perspective repeated)
Expected outcome: All posts align with chosen pillar but explore different angles.
Test 7: Batch — Revision Flow
Goal: Verify post revision during batch creation.
Steps:
- Run
/linkedin:batchand create 3 posts - At review step, choose "Revise a specific post"
- Ask for post #2 to be revised (e.g., "Make the hook more provocative")
- Verify: only post #2 is changed, others remain intact
- Verify: summary updates to reflect the revised post
Expected outcome: Individual post revision works without affecting other batch posts.
Test 8: Batch — Drafts Directory Creation
Goal: Verify assets/drafts/ directory is created when it doesn't exist.
Steps:
- Ensure
assets/drafts/does not exist - Run
/linkedin:batchand complete the workflow - Verify:
assets/drafts/week-[WXX]/directory is created - Verify: all posts are saved correctly
Expected outcome: Directory is created automatically, posts are saved.
Cross-Command Integration Tests
Test 9: Pipeline After Batch
Goal: Pipeline uses batch-created drafts.
Steps:
- First run
/linkedin:batchto create 3 drafts - Then run
/linkedin:pipeline - At ideation, choose "Use a planned topic"
- Verify: pipeline picks up a draft from the batch
- Complete pipeline with the batch draft
- Verify: state file is updated after publishing
Expected outcome: Pipeline can consume batch-created drafts seamlessly.
Test 10: Batch Respects Weekly State
Goal: Batch adjusts recommendations based on current posting state.
Steps:
- Set state file to show 2 posts already published this week
- Run
/linkedin:batchwith goal of 3 posts/week - Verify: batch suggests creating only 1 post (3 - 2 = 1 remaining)
- Or if configurable, verify batch mentions current progress
Expected outcome: Batch is aware of weekly posting status.
Hook Integration Tests
Test 11: Quality Gate Fires on Post Draft
Goal: Verify PreToolUse quality gate hook catches issues.
Steps:
- During pipeline or batch, intentionally create a post with:
- Hook over 140 chars
- External link in body
- Corporate buzzword ("leverage")
- Verify: quality gate flags ALL issues
- Verify: issues are described specifically (not generic warnings)
Expected outcome: Quality gate catches all three violations with specific feedback.
Test 12: Voice Guardian Detects AI Patterns
Goal: Verify voice guardian hook catches AI-sounding content.
Steps:
- During pipeline, create a post that starts with "In today's rapidly evolving landscape..."
- Verify: voice guardian flags the AI pattern
- Verify: specific rewrite suggestions are provided
- Verify: voice samples are referenced for comparison (if they exist)
Expected outcome: Voice guardian identifies AI patterns and suggests authentic alternatives.
Test 13: Stop Hook Updates State
Goal: Verify session-end state update works correctly.
Steps:
- Run
/linkedin:pipelineand create a post - Note the topic and hook
- End the session (or let Stop hook fire)
- Read
~/.claude/linkedin-thought-leadership.local.md - Verify:
last_post_date= todaylast_post_topic= the topic usedposts_this_weekincrementedcurrent_streakupdated correctly- Recent Posts section has new entry
Expected outcome: State file accurately reflects the session's output.
Test 14: PostToolUse Generates Alternative Hooks
Goal: Verify post-creation automation fires.
Steps:
- During pipeline or batch, write a post draft
- Verify: 3 alternative hooks are generated
- Verify: each alternative has character count shown
- Verify: optimal posting time is suggested
- Verify: 5x5x5 reminder appears
Expected outcome: Post-creation automation provides actionable suggestions.
Agent Tests
Test 15: Post-Feedback Monitor — Basic Monitoring
Command: Trigger post-feedback-monitor agent
Steps:
- Say "How is my latest post doing?"
- Agent should load algorithm-signals-reference and engagement-frameworks
- Agent should ask which post to monitor
- Provide sample metrics: 500 impressions, 15 reactions, 3 comments, 1 repost
- Agent should identify the current phase and provide benchmarks Expected: Structured output with metrics snapshot, velocity score, anomaly detection, and recommended actions Validates: Agent file loads correctly, context loading works, output format matches spec
Test 16: Post-Feedback Monitor — Anomaly Detection
Command: Trigger post-feedback-monitor agent
Steps:
- Say "My post has 2000 impressions but only 5 reactions"
- Agent should detect "Impression-Engagement Gap" anomaly
- Agent should provide specific intervention recommendations Expected: Anomaly correctly identified with cause analysis and action plan Validates: Anomaly detection framework, intervention playbook
Test 17: Post-Feedback Monitor — Golden Hour
Command: Trigger post-feedback-monitor agent
Steps:
- Say "I just posted 30 minutes ago, what should I do?"
- Agent should activate Golden Hour protocol
- Agent should provide time-sensitive action items Expected: Golden Hour specific advice (reply within 5 min, DM connections, first comment strategy) Validates: Phase detection, time-sensitive interventions
Command Tests
Test 18: A/B Test — Design New Test
Command: /linkedin:ab-test
Steps:
- Run the command
- Select "Design a new A/B test"
- Choose "Hook/Opening line" as the variable
- Follow the guided workflow Expected: Complete test plan with hypothesis, variants, execution schedule, success criteria Validates: Command loads, AskUserQuestion flow works, reference file loads, test plan file created
Test 19: A/B Test — Analyze Results
Command: /linkedin:ab-test
Steps:
- First create a test plan (Test 18) and manually create a test file with sample data
- Run
/linkedin:ab-testand select "Analyze test results" - Select the test to analyze Expected: Results comparison table, significance assessment (20% rule), verdict, recommended next steps Validates: File scanning, data analysis, result formatting
Test 20: Enhanced Report — Trends & Alerts
Command: /linkedin:report
Steps:
- Ensure at least 4 weeks of imported data exists
- Run
/linkedin:reportfor the current week - Verify trend analysis section appears after main report
- Verify alert detection section appears Expected: 4-week trend table, trend interpretation, performance alerts, algorithm alerts Validates: Trend CLI integration, alert thresholds, formatting
Test 21: Enhanced Import — Anomaly Detection
Command: /linkedin:import
Steps:
- Ensure baseline data exists (previous imports)
- Import a new CSV export
- After import, verify anomaly detection runs Expected: Breakout posts flagged, patterns detected, intelligent next steps offered Validates: Anomaly detection rules, baseline comparison, conditional suggestions
Test 22: Enhanced Report — Markdown Export
Command: /linkedin:report
Steps:
- Run
/linkedin:reportfor any week with data - Select "Export as Markdown" from options
- Verify file is saved to
assets/analytics/weekly-reports/YYYY-WXX-report.mdExpected: Clean markdown file with all sections (metrics, trends, alerts, top performers, recommendations) Validates: Export template, file creation, gitignore compliance
Cross-Command Integration Tests
Test 23: Router — New Commands Accessible
Command: /linkedin
Steps:
- Run
/linkedin - Verify A/B test appears in command menu
- Verify post-feedback-monitor appears in agent suggestions
- Say "I want to A/B test my hooks" — should route to
/linkedin:ab-test - Say "How is my post doing?" — should route to
post-feedback-monitorExpected: All new commands and agents are accessible through the router Validates: Router updates, intent matching
Test 24: Collaboration — Multi-Author Workflow
Command: /linkedin:collab
Steps:
- Run
/linkedin:collaband complete readiness check - Navigate to multi-author content coordination section
- Verify co-creation workflow templates are available
- Verify collaboration tracking section exists Expected: Multi-author workflow with 5 phases, shared draft guidelines, collaboration pipeline board Validates: New collab command sections (Step 7 and Step 8)
Known Limitations
-
No automated testing: These commands are conversational — they require human interaction at AskUserQuestion steps. Testing must be manual.
-
State file format: State file uses YAML frontmatter. Any malformed YAML will cause parsing issues. Always validate format after manual edits.
-
Draft directory:
assets/drafts/andassets/plans/are created at runtime. They don't exist in the base plugin directory and won't appear until first use. -
Hook ordering: PreToolUse has two hooks (quality gate + voice guardian). Both fire on every Write/Edit of content files. If one blocks, the user must fix the issue before proceeding.
-
Content vs. config detection: All prompt-based hooks include logic to skip non-content files. This relies on heuristic pattern matching (checking for
.local.md,.json, script extensions, etc.). Edge cases may exist. -
Agent testing: Agents (Tests 15-17) are triggered conversationally, not via slash commands. They require natural language input and cannot be invoked deterministically. Test by using the trigger phrases documented in the agent frontmatter.
-
Structure validation: Use
scripts/test-runner.shto validate file existence, frontmatter format, and router completeness. This is automated and complements the manual integration tests above.
Test Results Log
Record results here when tests are executed:
| Test | Date | Result | Notes |
|---|---|---|---|
| 1 | |||
| 2 | |||
| 3 | |||
| 4 | |||
| 5 | |||
| 6 | |||
| 7 | |||
| 8 | |||
| 9 | |||
| 10 | |||
| 11 | |||
| 12 | |||
| 13 | |||
| 14 | |||
| 15 | |||
| 16 | |||
| 17 | |||
| 18 | |||
| 19 | |||
| 20 | |||
| 21 | |||
| 22 | |||
| 23 | |||
| 24 |