From dcaa0d13c696b0e1e9256f98c3f37a60e0b02415 Mon Sep 17 00:00:00 2001 From: Kjell Tore Guttormsen Date: Fri, 10 Apr 2026 15:12:19 +0200 Subject: [PATCH] feat(linkedin): add auto-clipboard on all content commands Adds Bash to allowed-tools and clipboard-helper.mjs auto-copy to: post.md, quick.md, react.md, pipeline.md, first-post.md, video.md, multiplatform.md, carousel.md. Each command auto-copies the final post/caption text to clipboard after presenting the draft. Replaces manual copy-paste instructions in first-post.md (=== COPY FROM HERE ===) with auto-copy. Co-Authored-By: Claude Opus 4.6 --- .../commands/carousel.md | 7 +++++++ .../commands/first-post.md | 14 +++++--------- .../commands/multiplatform.md | 7 ++++++- .../commands/pipeline.md | 7 ++++++- .../linkedin-thought-leadership/commands/post.md | 7 +++++++ .../linkedin-thought-leadership/commands/quick.md | 7 +++++++ .../linkedin-thought-leadership/commands/react.md | 7 +++++++ .../linkedin-thought-leadership/commands/video.md | 9 ++++++++- 8 files changed, 53 insertions(+), 12 deletions(-) diff --git a/plugins/linkedin-thought-leadership/commands/carousel.md b/plugins/linkedin-thought-leadership/commands/carousel.md index a83162c..1908215 100644 --- a/plugins/linkedin-thought-leadership/commands/carousel.md +++ b/plugins/linkedin-thought-leadership/commands/carousel.md @@ -8,6 +8,7 @@ description: | "linkedin carousel", "document post", "create slides". allowed-tools: - Read + - Bash - AskUserQuestion --- @@ -129,6 +130,12 @@ Create one slide per page using the content above. Export as PDF and upload directly to LinkedIn. ``` +Auto-copy the carousel caption text to clipboard silently: +```bash +printf '%s' '' | node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs +``` +Then confirm: "Caption copied to clipboard." + Use AskUserQuestion: "Want to refine any slides, or is this ready for design?" ## Step 7: State Update diff --git a/plugins/linkedin-thought-leadership/commands/first-post.md b/plugins/linkedin-thought-leadership/commands/first-post.md index 3501f31..0651ab6 100644 --- a/plugins/linkedin-thought-leadership/commands/first-post.md +++ b/plugins/linkedin-thought-leadership/commands/first-post.md @@ -9,6 +9,7 @@ description: | allowed-tools: - Read - Write + - Bash - AskUserQuestion --- @@ -135,17 +136,12 @@ Show the post with: - The hook highlighted - One alternative version with a different hook -Format the post in a copy-paste-ready block: - -``` -=== COPY FROM HERE === - -[post content] - -=== TO HERE === +Auto-copy the post text to clipboard silently: +```bash +printf '%s' '' | node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs ``` -Add: "Copy this text, go to linkedin.com, click 'Start a post', paste it, and hit Post." +Then present: "Post copied to clipboard. Go to linkedin.com, click 'Start a post', paste it, and hit Post." ## Step 7: State Update diff --git a/plugins/linkedin-thought-leadership/commands/multiplatform.md b/plugins/linkedin-thought-leadership/commands/multiplatform.md index cf5290d..4d2ccc2 100644 --- a/plugins/linkedin-thought-leadership/commands/multiplatform.md +++ b/plugins/linkedin-thought-leadership/commands/multiplatform.md @@ -9,6 +9,7 @@ allowed-tools: - Read - Glob - Write + - Bash - AskUserQuestion --- @@ -163,7 +164,11 @@ YouTube tips: After creating the adaptation: - Save to `${CLAUDE_PLUGIN_ROOT}/assets/drafts/multiplatform/[platform]-[slug].md` -- Present copy-paste ready version +- Auto-copy the adapted content to clipboard silently: +```bash +printf '%s' '' | node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs +``` +- Present the content and confirm: "Copied to clipboard." - Note platform-specific publishing tips ## Reference Files diff --git a/plugins/linkedin-thought-leadership/commands/pipeline.md b/plugins/linkedin-thought-leadership/commands/pipeline.md index 8a31f1e..faef7da 100644 --- a/plugins/linkedin-thought-leadership/commands/pipeline.md +++ b/plugins/linkedin-thought-leadership/commands/pipeline.md @@ -143,11 +143,16 @@ Offer to help identify target profiles and draft comments. ## Step 6: Publish +Auto-copy the final post text to clipboard silently before presenting: +```bash +printf '%s' '' | node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs +``` + Present the final post as copy-paste ready content: ``` --- -COPY-PASTE READY POST +COPY-PASTE READY POST (copied to clipboard) --- [Final post content here] diff --git a/plugins/linkedin-thought-leadership/commands/post.md b/plugins/linkedin-thought-leadership/commands/post.md index 5a232c5..9171305 100644 --- a/plugins/linkedin-thought-leadership/commands/post.md +++ b/plugins/linkedin-thought-leadership/commands/post.md @@ -11,6 +11,7 @@ allowed-tools: - Glob - Grep - WebFetch + - Bash - AskUserQuestion --- @@ -145,6 +146,12 @@ Present the main draft with: - Hook analysis (what makes it work) - CTA explanation +Auto-copy the final post text to clipboard silently: +```bash +printf '%s' '' | node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs +``` +Then confirm: "Copied to clipboard." + Then offer: - 1-2 alternative versions with different angles or tones - Option to refine or adjust diff --git a/plugins/linkedin-thought-leadership/commands/quick.md b/plugins/linkedin-thought-leadership/commands/quick.md index 897d5b8..eac0dfa 100644 --- a/plugins/linkedin-thought-leadership/commands/quick.md +++ b/plugins/linkedin-thought-leadership/commands/quick.md @@ -8,6 +8,7 @@ description: | "simple linkedin post", "short post". allowed-tools: - Read + - Bash - AskUserQuestion --- @@ -134,6 +135,12 @@ Show the post with: - Post type identified - Note if it sounds like the user's voice +Auto-copy the final post text to clipboard silently: +```bash +printf '%s' '' | node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs +``` +Then confirm: "Copied to clipboard." + Offer one alternative version with different hook or angle. **State Update:** diff --git a/plugins/linkedin-thought-leadership/commands/react.md b/plugins/linkedin-thought-leadership/commands/react.md index b2ae364..115766c 100644 --- a/plugins/linkedin-thought-leadership/commands/react.md +++ b/plugins/linkedin-thought-leadership/commands/react.md @@ -12,6 +12,7 @@ allowed-tools: - Glob - Grep - WebFetch + - Bash - AskUserQuestion --- @@ -135,6 +136,12 @@ Show: 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' '' | node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs +``` +Then confirm: "Copied to clipboard." + Offer refinement options via AskUserQuestion: 1. Perfect — ready to post 2. Adjust the hook diff --git a/plugins/linkedin-thought-leadership/commands/video.md b/plugins/linkedin-thought-leadership/commands/video.md index 75ccbb0..0acb1c8 100644 --- a/plugins/linkedin-thought-leadership/commands/video.md +++ b/plugins/linkedin-thought-leadership/commands/video.md @@ -10,6 +10,7 @@ allowed-tools: - Glob - Grep - Write + - Bash - AskUserQuestion --- @@ -142,7 +143,7 @@ Angle: [from 8 thought leadership angles] [Line-by-line caption text with timing] -━━━ POST CAPTION ━━━━━━━━━━━━━━━━━━━━━━━━━ +━━━ POST CAPTION (copied to clipboard) ━━━ [200-400 char text to accompany the video] @@ -159,6 +160,12 @@ Style: [minimal / branded / text-heavy] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ``` +Auto-copy the POST CAPTION text to clipboard silently: +```bash +printf '%s' '' | node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs +``` +Then confirm: "Post caption copied to clipboard." + ## Step 7: Refinement Cycle Use AskUserQuestion: