Agent skill

X Hook Extractor

by sergebulaev in sergebulaev/x-skills

Reverse-engineer the hook from a viral X (Twitter) tweet or thread URL.

MITAuto-check passedWriting & Content

Install X Hook Extractor

skills CLI
$ npx skills add sergebulaev/x-skills --skill x-hook-extractor -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sergebulaev/x-skills x-hook-extractor --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sergebulaev/x-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/x-hook-extractor .claude/skills/x-hook-extractor && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
x-hook-extractor
GitHub stars
121
Used in
1 other repo
Token cost
~964 tokens
SKILL.md length
478 words
Files
3 (incl. references)
Skills in repo
10
Repo updated
First seen
Licence
MIT

At a glance

Reverse-engineer the hook from a viral X (Twitter) tweet or thread URL.

  • Works in 9 steps: Parse the URL.… → Get the text. This bundle has no… → Detect the container. One self-contained… → …
  • Learn from a tweet you admire
  • SKILL.md covers When to use, Input, Output and Steps, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

X Hook Extractor is an agent skill from sergebulaev/x-skills. 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).

Its SKILL.md is about 960 tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/classification-rules.md` and `references/examples.md`).

It sits in Writing & Content, covering Social media posts. It works with X (Twitter). The repository describes itself as: X (Twitter) marketing skills for Claude Code and Codex: write tweets, threads, and replies in your voice, strip AI tells, and publish via Publora. Open source, MIT. Content… The licence is MIT.

When your agent uses it

  • Learn from a tweet you admire
  • Tasks that involve Social media posts

Example prompts

  • “/x-hook-extractor”

Workflow steps

9 steps, taken from the first numbered list in SKILL.md.

  1. Parse the URL. lib.url_parser.parse_x_url(url) returns handle,
  2. Get the text. This bundle has no built-in tweet reader, so ask the user to
  3. Detect the container. One self-contained tweet, or a multi-tweet thread.
  4. Classify against the 11 formulas using features
  5. Score confidence. If two formulas fit, return the top 2 with fit scores.
  6. Extract structure. Label each part by its role. For a thread, map tweet 1
  7. Name the primary goal the original optimized for.
  8. Generate a blank template with {slot} markers matched to the original
  9. Audit the source. Flag any AI tells in the original so the user does not

What it can do on your machine

Read from SKILL.md and the folder at commit 6ffd8e0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

X Hook Extractor loads about 964 tokens when it runs, and up to ~2.5k if it reads all its reference files. Until then it costs about 128 tokens; SKILL.md has 478 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~128
When it runs · the whole SKILL.md, loaded when a task matches
~964
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from sergebulaev/x-skills at commit 6ffd8e0, republished under its MIT licence (© sergebulaev). 478 words, ~964 tokens.

Download SKILL.mdSave it as .claude/skills/x-hook-extractor/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
x-hook-extractor
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).

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-writer or x-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

  1. Parse the URL. lib.url_parser.parse_x_url(url) returns handle, tweet_id, url_type.
  2. 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.)
  3. Detect the container. One self-contained tweet, or a multi-tweet thread.
  4. 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)?
  5. Score confidence. If two formulas fit, return the top 2 with fit scores.
  6. 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.
  7. Name the primary goal the original optimized for.
  8. Generate a blank template with {slot} markers matched to the original shape and the user's topic.
  9. Audit the source. Flag any AI tells in the original so the user does not copy them.
Show full SKILL.md (64 more words)Show less

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 file
  • references/classification-rules.md - feature extraction + scoring heuristics
  • references/examples.md - worked teardowns (single tweet and thread)
  • x-post-writer - use the extracted single-tweet template to draft your own
  • x-thread-builder - use the extracted thread template
  • x-humanizer --mode audit - audit your draft before shipping

© sergebulaev, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/x-hook-extractor of sergebulaev/x-skills.

  • SKILL.md
  • references/classification-rules.md
  • references/examples.md

Open the folder on GitHubat commit 6ffd8e0

Used in 1 other repository

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in sergebulaev/x-skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

X Hook Extractor next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

X Hook Extractor compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
X Hook Extractor this skillsergebulaev/x-skills1211 repos~964Automated safety check: PassMIT
Socialcoreyhaines31/marketingskills54k4 repos~4.5kAutomated safety check: PassMIT
Social Contentfreekmurze/dotfiles1k23 repos~2.1kAutomated safety check: PassNone
Typefullyfreekmurze/dotfiles1k2 repos~3.4kAutomated safety check: NotesNone
Changelog Social RecapFlorianBruniaux/claude-code-ultimate-guide6.1k—~1.8kAutomated safety check: NotesCC-BY-SA-4.0
X Mastery Mentoralchaincyf/x-mentor-skill1.2k—~2.3kAutomated safety check: PassMIT

Similar skills

  • Social

    coreyhaines31/marketingskills

    When the user wants help creating, scheduling, or optimizing social media content for LinkedIn, Twitter/X, Instagram, TikTok, or Facebook, or wants to do social listening and engagement triage.

    54k GitHub starsUsed in 4 repos~4.5k tokens
    Writing & ContentAuto-check passed
  • Social Content

    freekmurze/dotfiles

    When the user wants help creating, scheduling, or optimizing social media content for LinkedIn, Twitter/X, Instagram, TikTok, Facebook, or other platforms.

    1k GitHub starsUsed in 23 repos~2.1k tokens
    Writing & ContentAuto-check passed
  • Typefully

    freekmurze/dotfiles

    Create, schedule, and manage social media posts via Typefully.

    1k GitHub starsUsed in 2 repos~3.4k tokens
    Writing & ContentAuto-check: notes
  • Changelog Social Recap

    FlorianBruniaux/claude-code-ultimate-guide

    Turns CHANGELOG.md entries for a release or a week into LinkedIn, Twitter/X, newsletter and Slack posts in French and English.

    6.1k GitHub stars~1.8k tokensUpdated today
    Writing & ContentAuto-check: notes
  • X Mastery Mentor

    alchaincyf/x-mentor-skill

    $10K/hr级X/Twitter运营导师。基于Nicolas Cole、Dickie Bush、Sahil Bloom、Justin Welsh、 Dan Koe、Alex Hormozi六位顶级创作者的方法论 + X开源算法深度分析 + AI/科技赛道专精策略, 提炼6个核心心智模型、10条决策启发式、完整的选题-写作-增长操作手册。

    1.2k GitHub stars~2.3k tokensUpdated 1 mo ago
    Writing & ContentAuto-check passed
  • Voice Builder

    charlie947/social-media-skills

    Build a personalised voice profile inside a Codex or Claude project from a short interview plus 3 to 5 sample pieces of writing.

    3.8k GitHub stars~3.3k tokensUpdated 23 days ago
    Writing & ContentAuto-check passed

More from sergebulaev/x-skills

All 10 skills in this repo
  • X Marketing

    sergebulaev/x-skills

    Plan, draft, audit, and publish posts and threads for X (Twitter).

    121 GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check: notes
  • X Content Planner

    sergebulaev/x-skills

    Generate a weekly X (Twitter) content plan from a theme, audience, and content pillars.

    121 GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed
  • X Reply Drafter

    sergebulaev/x-skills

    Draft a reply or a value-add quote tweet for a specific X (Twitter) tweet from its URL.

    121 GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed
  • X Humanizer

    sergebulaev/x-skills

    Remove the AI tells human readers react to in a tweet or thread: 2026 vocabulary by density, reveal bridges, staccato stacks, stacked triads, performed sincerity.

    121 GitHub starsUsed in 1 repo~4.2k tokens
    Auto-check passed
  • X Post Writer

    sergebulaev/x-skills

    Draft a single tweet or short auto-thread for X (Twitter) using a 2026 X hook formula (one-liner contrarian, data-point, build-in-public, mini-list, relatable cold-open), picked by goal (replies…

    121 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • X Audience Insights

    sergebulaev/x-skills

    Read your X (Twitter) audience and niche from real data. An agent skill from sergebulaev/x-skills.

    121 GitHub starsUsed in 2 repos~1.2k tokens
    Auto-check passed

Works with

Questions about X Hook Extractor

What does X Hook Extractor do?

Reverse-engineer the hook from a viral X (Twitter) tweet or thread URL. X Hook Extractor is an agent skill from sergebulaev/x-skills. Reverse-engineer the hook from a viral X (Twitter) tweet or thread URL.

When should I use X Hook Extractor?

X Hook Extractor fits situations like: learn from a tweet you admire; tasks that involve Social media posts.

How do I install X Hook Extractor in Claude Code?

Run `npx skills add sergebulaev/x-skills --skill x-hook-extractor -a claude-code`. Or copy the skill folder (skills/x-hook-extractor in sergebulaev/x-skills) into .claude/skills/x-hook-extractor in your project. Claude Code loads it when a task matches its description.

How do I install X Hook Extractor in Codex?

Run `npx skills add sergebulaev/x-skills --skill x-hook-extractor -a codex`. Or copy the skill folder (skills/x-hook-extractor in sergebulaev/x-skills) into .agents/skills/x-hook-extractor in your project. Codex loads it when a task matches its description.

Can I use X Hook Extractor in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sergebulaev/x-skills --skill x-hook-extractor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/x-hook-extractor, .gemini/skills/x-hook-extractor, .github/skills/x-hook-extractor and .opencode/skills/x-hook-extractor in your project.

What does X Hook Extractor need to run?

SKILL.md names no scripts, command-line tools or credentials: X Hook Extractor is instructions for the agent only.

Does X Hook Extractor access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is X Hook Extractor safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does X Hook Extractor use?

X Hook Extractor is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does X Hook Extractor use?

About 964 tokens (SKILL.md is roughly 3.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.6k tokens, read only when the agent opens those files.

What are the alternatives to X Hook Extractor?

Skills that share tags, products or a category with X Hook Extractor: Social (coreyhaines31/marketingskills, 54k stars), Social Content (freekmurze/dotfiles, 1k stars), Typefully (freekmurze/dotfiles, 1k stars) and Changelog Social Recap (FlorianBruniaux/claude-code-ultimate-guide, 6.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains X Hook Extractor?

sergebulaev (a GitHub user) maintains it in sergebulaev/x-skills, which has 121 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 7, 2026.

Source: sergebulaev/x-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.