From harlan-claude-code
Draft, iterate, and polish tweets with visuals. Use when user says "tweet this", "draft a tweet", "post about this", "share on twitter", "write a tweet", or provides text to tweet. Generates code cards, stat cards, and screenshot wraps.
npx claudepluginhub harlan-zw/harlan-claude-code --plugin harlan-claude-codeThis skill uses the workspace's default tool permissions.
Help the user draft, refine, and finalize tweets with compelling visuals. Automatically selects the right visual format based on content.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Help the user draft, refine, and finalize tweets with compelling visuals. Automatically selects the right visual format based on content.
length checks.sharp and @resvg/resvg-js need to be installed. If they're not global, install to a temp dir, don't pollute the project.Track tweet history for voice consistency:
# After finalizing a tweet, log it
echo "$(date -I) | VISUAL_TYPE | FINAL_TWEET_TEXT" >> "${CLAUDE_PLUGIN_DATA}/tweet-history.log"
On subsequent runs, read recent history to maintain consistent voice and avoid repeating hooks/angles.
$ARGUMENTS may contain:
Determine what the user provided and select the appropriate visual:
| Input type | Visual template | When to use |
|---|---|---|
| Screenshot/image path | wrap-screenshot.mjs | User has an existing screenshot to polish |
| Code snippet or mentions code | code-card.mjs | Showing a specific API, config, or code example |
| Release/launch with metrics | stat-card.mjs | GitHub stars, downloads, benchmarks, version milestones |
| General text, no obvious visual | Suggest one | Ask: "What's the most visual part of this?" |
If the input clearly maps to one visual, proceed directly. If multiple Must work, briefly suggest the best fit and why.
All templates share 6 color themes. Pick based on context:
| Theme | Vibe | Best for |
|---|---|---|
midnight | Deep blue, electric accents | General dev content, default choice |
ocean | Teal/cyan, calm | Nuxt/Vue ecosystem (matches brand colors) |
sunset | Warm orange/purple | Creative tools, design content |
forest | Green, natural | Performance, sustainability, growth metrics |
lavender | Purple, elegant | TypeScript, DX tooling |
ember | Red, intense | Breaking changes, critical fixes, hot takes |
Default to ocean for Nuxt ecosystem content, midnight for everything else.
| Chrome | Look | Best for |
|---|---|---|
terminal | macOS terminal with traffic lights + monospace title | CLI tools, terminal output |
browser | Browser-style with URL bar | Web apps, UI screenshots |
minimal | Thin top bar, no buttons | Clean look, design screenshots |
none | Just the image on background | When the content speaks for itself |
Read the draft and identify:
Produce 3 variations plus the fixed original:
For each variation show:
After showing variations, ask which direction they prefer or if they want to mix elements. Keep iterating until they're happy.
Based on the selected template, create a temporary script in scratchpad.
wrap-screenshot.mjs)Use the Read tool to view the screenshot first. Then customize:
INPUT_PATH -- the screenshot file pathOUTPUT_PATH -- same directory, append -twitter before extensionTITLE -- contextual title based on content:
claude — ~/project or the command shownTHEME -- selected themeCHROME -- selected chrome stylecode-card.mjs)Extract the most interesting code snippet (max ~20 lines, the card clips overflow). Customize:
CODE -- the code to display (clean it up: remove irrelevant imports, focus on the "aha" moment)LANGUAGE -- for the title bar labelTITLE -- optional override (e.g., "nuxt.config.ts" or "Usage")THEME -- selected themeOUTPUT_PATH -- descriptive nameTips for good code cards:
stat-card.mjs)For milestones, releases with impressive numbers, benchmarks. Customize:
HEADLINE -- project name + version or milestone labelSUBHEADLINE -- one-line descriptionSTATS -- array of { label, value } objects (2-4 stats, 3 is ideal)THEME -- selected themeOUTPUT_PATH -- descriptive nameTips for good stat cards:
node /path/to/scratchpad/template.mjs
Dependencies (sharp, @resvg/resvg-js) should be available globally or in the project. If not, install to scratchpad:
cd /path/to/scratchpad && npm init -y && npm install sharp @resvg/resvg-js
Read the output image to verify it looks correct. Show the user the result. If something looks off (text overflow, bad contrast, wrong theme), fix and re-run.
Present:
Log to ${CLAUDE_PLUGIN_DATA}/tweet-history.log.
Offer to: