X hook extractor
Reverse-engineer the hook from a viral X (Twitter) tweet or thread URL.
How to use it
- Hit Copy the whole skill.
- Claude: ⋯ → Download .md, then Customize → Skills → Add → Upload skill.
ChatGPT: make a Project and paste it into Instructions.
Neither? Paste it at the top of a new chat — it works for that chat. - Describe your job in plain words. The AI follows the skill from there.
Claude Code — installs the whole folder, not just SKILL.md
npx degit sergebulaev/x-skills/.codex-marketplace/x-skills/skills/x-hook-extractor#main ~/.claude/skills/x-hook-extractorFor one project only, change the path to .claude/skills/x-hook-extractor.
Not working?
- Check which app you pasted it into — the steps above name the right one.
- Some skills need the paid tier of Claude or ChatGPT.
Paste into Claude, ChatGPT or Cursor.
Show the full text84 lines
X Hook Extractor
Paste a viral tweet or thread URL. Get back: which hook formula it uses, the exact structure, why it worked, and a blank template you can fill with your own voice.
When to use
- User finds a viral tweet or thread they want to study
- User wants to replicate a specific creator's pattern
- Before
x-post-writerorx-thread-builder, to seed a draft with a proven shape
Input
An X tweet or thread URL (x.com or twitter.com, /status/<id>). For a thread,
the URL of the first tweet is best.
Output
- Formula identified (X1-X10 from
../../references/hook-formulas.md) with a confidence score - Container: single tweet vs thread, and why that container fit the idea
- Structural breakdown:
- The hook line (and for a thread, how tweet 1 opens the loop)
- Body architecture (per-tweet roles for a thread)
- The close (what earns the repost or bookmark)
- Reaction-triggering devices (numbers, named entities, the open loop)
- Primary goal the original chased (replies / reposts / likes / bookmarks)
- Why it worked psychologically and algorithmically
- Blank template with
{slot}markers matched to the original, ready for the user's topic - Cautions: anything in the original that would fail a 2026 audit (more than one em dash in a tweet, an AI-vocab cluster, 3+ hashtags, link in tweet 1)
Steps
- Parse the URL.
lib.url_parser.parse_x_url(url)returnshandle,tweet_id,url_type. - Get the text. This bundle has no built-in tweet reader, so ask the user to paste the tweet or the full thread text. (If they later wire an Apify tweet actor, read it automatically.)
- Detect the container. One self-contained tweet, or a multi-tweet thread.
- Classify against the 11 formulas using features:
- Single tweet: a flat contrarian claim (X1)? one hard number (X2)? a personal metric/confession (X3)? a quote tweet adding a layer (X4)? a one-line-per- item list (X5)? a relatable shared moment (X6)?
- Thread: a numbered teaching promise (X7)? a story starting at the tension (X8)? a surprising result with the mechanism withheld (X9)? a first-person "how I" teardown (X10)?
- Score confidence. If two formulas fit, return the top 2 with fit scores.
- Extract structure. Label each part by its role. For a thread, map tweet 1 (the loop), the front-loaded payoff, the body beats, and the closer.
- Name the primary goal the original optimized for.
- Generate a blank template with
{slot}markers matched to the original shape and the user's topic. - Audit the source. Flag any AI tells in the original so the user does not copy them.
Example
See references/examples.md for worked teardowns.
Formulas reference
See ../../references/hook-formulas.md for the 11 canonical X formulas with full
skeletons and goal tags.
Files
SKILL.md- this filereferences/classification-rules.md- feature extraction + scoring heuristicsreferences/examples.md- worked teardowns (single tweet and thread)
Related skills
x-post-writer- use the extracted single-tweet template to draft your ownx-thread-builder- use the extracted thread templatex-humanizer --mode audit- audit your draft before shipping
| 1 | |
| 2 | name x-hook-extractor |
| 3 | description "Reverse-engineer the hook from a viral X (Twitter) tweet or thread URL. Identifies which of the 10 canonical 2026 X formulas it uses (one-liner contrarian, data-point, build-in-public, quote-tweet, mini-list, relatable cold-open, listicle-thread, story thread, curiosity-gap, how-I teardown), explains why it worked, and returns a blank template mapped to your topic with its primary goal. Use to learn from a tweet you admire. Not for writing your own (use x-post-writer or x-thread-builder)." |
| 4 | |
| 5 | |
| 6 | # X Hook Extractor |
| 7 | |
| 8 | Paste a viral tweet or thread URL. Get back: which hook formula it uses, the |
| 9 | exact structure, why it worked, and a blank template you can fill with your own |
| 10 | voice. |
| 11 | |
| 12 | ## When to use |
| 13 | |
| 14 | User finds a viral tweet or thread they want to study |
| 15 | User wants to replicate a specific creator's pattern |
| 16 | Before `x-post-writer` or `x-thread-builder`, to seed a draft with a proven shape |
| 17 | |
| 18 | ## Input |
| 19 | |
| 20 | An X tweet or thread URL (x.com or twitter.com, `/status/<id>`). For a thread, |
| 21 | the URL of the first tweet is best. |
| 22 | |
| 23 | ## Output |
| 24 | |
| 25 | **Formula identified** (X1-X10 from `../../references/hook-formulas.md`) with a |
| 26 | confidence score |
| 27 | **Container:** single tweet vs thread, and why that container fit the idea |
| 28 | **Structural breakdown:** |
| 29 | The hook line (and for a thread, how tweet 1 opens the loop) |
| 30 | Body architecture (per-tweet roles for a thread) |
| 31 | The close (what earns the repost or bookmark) |
| 32 | Reaction-triggering devices (numbers, named entities, the open loop) |
| 33 | **Primary goal** the original chased (replies / reposts / likes / bookmarks) |
| 34 | **Why it worked** psychologically and algorithmically |
| 35 | **Blank template** with `{slot}` markers matched to the original, ready for the |
| 36 | user's topic |
| 37 | **Cautions:** anything in the original that would fail a 2026 audit (more |
| 38 | than one em dash in a tweet, an AI-vocab cluster, 3+ hashtags, link in tweet 1) |
| 39 | |
| 40 | ## Steps |
| 41 | |
| 42 | **Parse the URL.** `lib.url_parser.parse_x_url(url)` returns `handle`, |
| 43 | `tweet_id`, `url_type`. |
| 44 | **Get the text.** This bundle has no built-in tweet reader, so ask the user to |
| 45 | paste the tweet or the full thread text. (If they later wire an Apify tweet |
| 46 | actor, read it automatically.) |
| 47 | **Detect the container.** One self-contained tweet, or a multi-tweet thread. |
| 48 | **Classify against the 11 formulas** using features: |
| 49 | Single tweet: a flat contrarian claim (X1)? one hard number (X2)? a personal |
| 50 | metric/confession (X3)? a quote tweet adding a layer (X4)? a one-line-per- |
| 51 | item list (X5)? a relatable shared moment (X6)? |
| 52 | Thread: a numbered teaching promise (X7)? a story starting at the tension |
| 53 | (X8)? a surprising result with the mechanism withheld (X9)? a first-person |
| 54 | "how I" teardown (X10)? |
| 55 | **Score confidence.** If two formulas fit, return the top 2 with fit scores. |
| 56 | **Extract structure.** Label each part by its role. For a thread, map tweet 1 |
| 57 | (the loop), the front-loaded payoff, the body beats, and the closer. |
| 58 | **Name the primary goal** the original optimized for. |
| 59 | **Generate a blank template** with `{slot}` markers matched to the original |
| 60 | shape and the user's topic. |
| 61 | **Audit the source.** Flag any AI tells in the original so the user does not |
| 62 | copy them. |
| 63 | |
| 64 | ## Example |
| 65 | |
| 66 | See `references/examples.md` for worked teardowns. |
| 67 | |
| 68 | ## Formulas reference |
| 69 | |
| 70 | See `../../references/hook-formulas.md` for the 11 canonical X formulas with full |
| 71 | skeletons and goal tags. |
| 72 | |
| 73 | ## Files |
| 74 | |
| 75 | `SKILL.md` - this file |
| 76 | `references/classification-rules.md` - feature extraction + scoring heuristics |
| 77 | `references/examples.md` - worked teardowns (single tweet and thread) |
| 78 | |
| 79 | ## Related skills |
| 80 | |
| 81 | `x-post-writer` - use the extracted single-tweet template to draft your own |
| 82 | `x-thread-builder` - use the extracted thread template |
| 83 | `x-humanizer --mode audit` - audit your draft before shipping |
| 84 |
Discussion
Alternatives
Also in Posting & schedulingLinkedin comment drafterDraft a LinkedIn comment on someone else's post from its URL, or reshare (repost) it to your feed with optional commentary. Use when the user pastes a post URL and asks to comment, engage, be first commenter, or repost with their thoughts. Produces 1-3 variants in the user's voice, picks a reaction, and publishes via Publora on approval. Not for replying to existing comments (use linkedin-reply-handler).Linkedin content plannerGenerate a 7-day LinkedIn content plan from a theme, audience, and pillars. Produces per-day post pillar, format, hook type, CTA, posting time, daily comment targets, and a weekly inbound-readiness check. Use when the user wants to plan a week or month of content, not draft a single post (use linkedin-post-writer).Linkedin employee advocacyStand up and run a LinkedIn employee advocacy program for a marketing or sales team. Covers 14-day launch playbook, brand-guideline governance, per-post time budget, cadence benchmarks, and team ROI (reach, engagement, pipeline). Triggers on "employee advocacy", "get the team posting", "scale LinkedIn across team", "advocacy ROI". Not for planning one person's own calendar (use linkedin-content-planner).Instagram Audience InsightsRead your Instagram niche and profile from real data via Apify, no login. Scan a hashtag for the posts traveling now (likes, comments, owner) to see the format and hook that works. Pull profile stats for any handle, yours or a competitor's: followers, posts, bio, category. Instagram hides who liked or commented on other accounts, so this is discovery plus profiles, not engagers. Triggers on "what works in my niche", "scan the hashtag", "competitor stats". Not for writing captions (use ig-caption-writer).