threads-hook-extractor

threads-hook-extractor is a skill for Claude Code, Codex from sergebulaev/threads-skills. It costs 116 tokens per session (951 once invoked), scanned A, original, MIT.

A tool for studying the opening pattern of a viral Threads post or thread. Threads is Meta’s text-based social network; the tool identifies one of ten listed post structures and provides a reusable blank template.

In plain words
What is it for?
Use it with a Threads post or thread URL to identify the hook, body structure, ending, and attention devices, then adapt the pattern to your own writing.
Why use it?
It helps explain why a post attracted replies, reposts, likes, or quotes instead of copying its wording without understanding its structure.

Skill for Claude CodeCodex

Part of the threads-skills plugin — 9 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/sergebulaev/threads-skills/threads-hook-extractor
Any agent
npx skills add sergebulaev/threads-skills --skill threads-hook-extractor
Clone the repo
git clone --depth 1 https://github.com/sergebulaev/threads-skills

Made for: Claude Code, Codex.

Or install threads-skills, the plugin that ships this one along with the rest of its 9 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for threads-hook-extractor

README.md
[![agentmods](https://agentmods.dev/badge/skills/sergebulaev/threads-skills/threads-hook-extractor.svg)](https://agentmods.dev/skills/sergebulaev/threads-skills/threads-hook-extractor)
Your own site
<a href="https://agentmods.dev/skills/sergebulaev/threads-skills/threads-hook-extractor"><img src="https://agentmods.dev/badge/skills/sergebulaev/threads-skills/threads-hook-extractor.svg" alt="Measured on agentmods" height="20"></a>
Per session 116 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 951 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00116 $0.00951
Opus 5 $0.00058 $0.00476
Sonnet 5 $0.00023 $0.00190
Haiku 4.5 $0.00012 $0.00095

Measured 4d ago against content hash d2f50f81d36d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

threads-hook-extractor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.codex-marketplace/threads-skills/skills/threads-hook-extractor/SKILL.md · 84 lines

How it starts

The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Threads Hook Extractor

Paste a viral Threads post 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 post or thread they want to study
  • User wants to replicate a specific creator's pattern
  • Before threads-post-writer, to seed a draft with a proven shape

Input

A Threads post or thread URL (threads.net or threads.com, /@handle/post/). For a thread, the URL of the first post is best.

Output

  • Formula identified (T1-T10 from ../../references/hook-formulas.md) with a confidence score
  • Container: single post vs thread, and why that container fit the idea
  • Structural breakdown:
    • The hook line (and for a thread, how post 1 opens the loop)
    • Body architecture (per-post roles for a thread)
    • The close (what earns the repost or the reply)
    • Reaction-triggering devices (numbers, named entities, the open loop, the warm invite)
  • Primary goal the original chased (replies / reposts / likes / quotes)
  • 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 (em dashes, AI vocab, 2+ hashtags, link in post 1, a cold X tone)

Steps

  1. Parse the URL. lib.url_parser.parse_threads_url(url) returns handle, post_id, url_type.
  2. Get the text. This bundle has no built-in post reader, so ask the user to paste the post or the full thread text. (If they later wire an Apify post-read actor, read it automatically.)
  3. Detect the container. One self-contained post, or a multi-post thread.
  4. Classify against the 13 formulas using features:
    • Single post: a warm contrarian claim (T1)? one hard number (T2)? a personal metric/confession (T3)? a quote post adding a layer (T4)? a one-line-per-item list (T5)? a relatable shared moment (T6)?
    • Thread: a numbered teaching promise (T7)? a story starting at the tension (T8)? a surprising result with the mechanism withheld (T9)? a first-person "how I" teardown (T10)?
  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 post 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.

Read the full file on GitHub · 84 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 84 lines · 116 tokens per session scan A d2f50f81d36d

Subscribe to this mod's changes

threads-hook-extractor is a skill published in the GitHub repository sergebulaev/threads-skills (20 stars, last pushed today), licensed MIT. It adds 116 tokens to every session and 951 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

x-marketing

Plan, draft, audit, and publish posts and threads for X (Twitter). Use when the user wants to write a single tweet or an auto-numbered thread, build a long-form tweetstorm, remove AI tells from a draft, reverse-engineer the hook from a viral tweet, draft a reply or quote tweet, or plan a week of X content. Tweets and…

sergebulaev/x-skills · 117 tokens

x-humanizer

Scrub AI tells from any tweet or thread draft, or audit a finished draft against the 2026 X (Twitter) checklist. Strips em dashes, AI vocabulary (leverage, fundamentally, delve, harness), rule-of-three lists, and uniform tweet rhythm, then adds human fingerprints. Includes a --mode audit pre-publish check (280-char…

sergebulaev/x-skills · 120 tokens

facebook-marketing

Plan, draft, audit, and publish posts for a Facebook Page. Use when the user wants to write a short punchy Page post or a longer story post, remove AI tells from a draft, reverse-engineer the hook from a high-share Page post, draft replies to comments on their Page, or plan a week of Facebook Page content. Page posts…

sergebulaev/facebook-skills · 104 tokens

fb-humanizer

Scrub AI tells from any Facebook Page post draft, or audit a finished draft against the 2026 Facebook checklist. Strips em dashes, AI vocabulary (leverage, delve, harness), "We are thrilled to announce" openers, and corporate auto-pilot, then adds human fingerprints. Includes a --mode audit pre-publish check (under-80…

sergebulaev/facebook-skills · 119 tokens

tiktok-marketing

Plan, script, caption, and publish short-form video for TikTok. Use when the user wants to write the first 1-3 second hook (spoken line plus on-screen text), draft a caption under 2,200 chars with TikTok settings and hashtags, ride a trending sound without being cringe, strip AI tells from a spoken script to sound…

sergebulaev/tiktok-skills · 0 tokens

x-post-writer

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, reposts, likes, bookmarks). Respects the 280-char limit (25,000 on Premium), runs the humanizer pass, and publishes via…

sergebulaev/x-skills · 120 tokens