diff --git a/Specialized/thread-to-post/SKILL.md b/Specialized/thread-to-post/SKILL.md new file mode 100644 index 0000000..891d1ec --- /dev/null +++ b/Specialized/thread-to-post/SKILL.md @@ -0,0 +1,160 @@ +--- +name: thread-to-post +description: > + Convert threads, discussions, and pasted text into polished blog posts or LinkedIn articles. + Use when: (1) turning a Twitter/X thread into a blog post, (2) converting a Reddit post or + comment chain into an article, (3) repurposing a Hacker News discussion as written content, + (4) transforming any online thread or discussion into a polished article, (5) creating a + LinkedIn post or article from a thread or pasted text, (6) repurposing pasted thread text + or conversation into a structured blog post or LinkedIn article, (7) "turn this into an article", + "make this a LinkedIn post", "repurpose as a blog post", or any thread-to-article / + discussion-to-post / text-to-article transformation. Works with URLs and raw pasted text. + Builds on: exa (content extraction). +metadata: {"openclaw": {"emoji": "๐Ÿงต", "os": ["linux"], "requires": {"env": ["EXA_API_KEY"]}}} +--- + +# Thread-to-Post + +Transform viral threads and online discussions into polished, structured articles. Supports two output formats: long-form blog posts and punchy LinkedIn articles. + +## Foundational Skills Used + +- **exa** โ€” Content extraction from URLs (threads, posts, discussions). Read it for API details. +- **environment** โ€” Cloud proxy for LLM access (OpenAI/Anthropic). Read it for proxy URLs and auth. + +## Input Types + +| Input | How to Handle | +|-------|--------------| +| URL (Hacker News) | Extract with **exa** โ€” usually works reliably | +| URL (Twitter/X thread) | Extract with **exa** โ€” often fails, use fallback chain | +| URL (Reddit post) | Extract with **exa** โ€” often fails, use fallback chain | +| URL (any discussion) | Extract with **exa** `contents` endpoint | +| Raw pasted text | Use directly โ€” skip extraction (most reliable path) | + +## Workflow + +### Step 1: Get the Content + +**If raw text provided:** Use it directly. Skip to Step 2. + +**If URL provided:** Use the **exa** skill to extract the thread content. Follow this fallback chain โ€” each step tries a more creative approach: + +1. **Try `contents` endpoint** โ€” Request `text` content type for the readable body. +2. **If `contents` fails โ†’ try `search`** โ€” Search for the thread by title/topic with `category` filter (e.g., `"tweet"`, `"reddit post"`). Extract content from the top result. +3. **If `search` fails โ†’ try `answer`** โ€” Use Exa's `answer` endpoint with a query about the thread topic. This returns a synthesized summary with citations you can then extract via `contents`. +4. **If all fail โ†’ ask the user to paste the text directly.** + +#### โš ๏ธ Known Extraction Limitations + +**Reddit and X/Twitter URLs frequently fail Exa extraction** due to aggressive anti-bot measures on both platforms: + +- **X/Twitter:** `contents` often returns empty results or 403/404 errors. Exa's crawler is blocked by X's robots.txt. +- **Reddit:** `contents` typically hits `CRAWL_LIVECRAWL_TIMEOUT`. Trying `old.reddit.com` or `.json` suffix does not help. +- **Hacker News:** Generally works well with `contents`. + +For Reddit and X/Twitter, expect to hit Step 2-4 of the fallback chain. The `search` and `answer` endpoints work better since they use Exa's pre-indexed content rather than live crawling. When all extraction fails, asking the user to paste the thread text is the best path forward. + +### Step 2: Analyze the Content + +Before writing, identify: + +- **Core thesis** โ€” What's the one main point? Threads are often winding; find the spine. +- **Key arguments/points** โ€” Number them. Most threads have 3-7 distinct points. +- **Best quotes** โ€” Memorable phrasing worth preserving verbatim. +- **Supporting evidence** โ€” Data, examples, anecdotes the author used. +- **Thread structure** โ€” Is it a narrative? A list? An argument? A how-to? + +### Step 3: Choose Output Format + +| User Asks For | Format | +|---------------|--------| +| "blog post" / "article" / default | **Blog Post** โ€” full article with sections, depth, ~800-2000 words | +| "LinkedIn post" / "LinkedIn article" | **LinkedIn Article** โ€” hook-driven, shorter paragraphs, ~300-800 words | + +If the user doesn't specify, default to **blog post**. + +### Step 4: Transform to Article + +Use the cloud proxy (see **environment** skill) to call an LLM for the restructuring. Send the extracted content with a structured prompt. + +**LLM prompt should instruct:** + +#### For Blog Posts: +- Open with a hook that captures the thread's core insight +- Organize into logical sections with clear headings (not just "Point 1, Point 2") +- Expand compressed thread-speak into full prose paragraphs +- Preserve the author's best lines as direct quotes with attribution +- Add transitions between sections โ€” threads jump between points; articles flow +- Close with a synthesis or takeaway, not just the last tweet restated +- Include a "TL;DR" or key takeaways section at the end if the post exceeds 1000 words + +#### For LinkedIn Articles: +- Start with a bold hook line (pattern interrupt โ€” question, surprising stat, contrarian take) +- Short paragraphs (1-3 sentences each) โ€” LinkedIn readers scan +- Use line breaks liberally โ€” white space is your friend on LinkedIn +- Include a personal/professional angle: "Here's why this matters for [industry/role]" +- End with a call to engagement: question, prompt for comments, or "share if you agree" +- Keep emoji usage minimal but strategic (1-2 per post, not every line) +- No markdown headers โ€” LinkedIn doesn't render them. Use **bold** or ALL CAPS for emphasis + +### Step 5: Attribution & Formatting + +Always include attribution to the original author and source: + +**Blog post format:** +```markdown +# [Article Title] + +*Originally shared by [@author](source_url) on [Platform]* + +[Article body...] + +--- +*Source: [Original thread](url) by [Author] on [Platform]* +``` + +**LinkedIn format:** +``` +[Hook line] + +[Body...] + +โ€” + +Originally by @[Author] on [Platform] +[URL] + +#relevanthashtag #anothertag +``` + +Add 3-5 relevant hashtags for LinkedIn posts. No hashtags for blog posts. + +### Step 6: Deliver + +Present the finished article to the user as markdown. If they want it saved: +- Blog posts โ†’ `~/Documents/posts/[slug].md` +- LinkedIn articles โ†’ `~/Documents/linkedin/[slug].md` + +Create the directories if they don't exist. + +## Quality Checklist + +Before delivering, verify: + +- [ ] **Core thesis is clear** โ€” a reader who skips to the end still gets the point +- [ ] **Original voice preserved** โ€” key phrases quoted, author's personality intact +- [ ] **No thread artifacts** โ€” removed "1/", "๐Ÿงต", "Thread:", "(cont.)", tweet-style fragments +- [ ] **Logical flow** โ€” sections follow a narrative arc, not just tweet order +- [ ] **Attribution present** โ€” source and author credited +- [ ] **Format matches request** โ€” blog post structure vs. LinkedIn structure +- [ ] **No padding** โ€” every paragraph earns its place. Cut fluff. + +## Tips + +- **Thread order โ‰  article order.** Threads often front-load the hook, meander through examples, then circle back. Reorganize for reading flow. +- **Expand, don't just restate.** "This is huge" in a thread becomes a sentence explaining *why* it's significant in an article. +- **Cut the meta-commentary.** Remove "I've been thinking about this..." and "Let me explain..." โ€” just explain. +- **Multiple authors (discussions).** For Reddit/HN threads with multiple contributors, synthesize the best points from various commenters. Attribute specific insights to specific users. +- **Controversial threads.** Present the strongest arguments from each side. Don't flatten nuance into one perspective unless the user asks for a specific angle. +- **Short threads (< 5 tweets/points).** LinkedIn format works better. Don't pad a 3-tweet thread into a 1500-word blog post.