Hook Generation
Hook workflows generate viral opening lines grounded in real competitor data and trend signals. They can scrape creator channels, classify hook patterns, cluster by similarity, and score for estimated virality.
Generate Hooks
Section titled “Generate Hooks”Workflow: hooks/generate
Generates viral hooks for a niche, optionally grounded in scraped competitor data.
fabric run hooks/generate \ --input niche="AI productivity" \ --input platform="TikTok" \ --input num_hooks=15Pipeline
Section titled “Pipeline”scrape_creator_hooks (optional, if competitors provided) │ extract_hook_features │ cluster_hooks │ gather_competitor_insights │ generate_hook_ideas │ score_hook_ideas| Parameter | Type | Default | Description |
|---|---|---|---|
niche | string | required | Content niche |
competitors | list[str] | [] | Channel URLs/handles to scrape |
platform | string | "YouTube" | Target platform |
trends | dict | {} | Trend signals from research |
num_hooks | int | 15 | Number of hooks to generate |
Output
Section titled “Output”{ "hook_ideas": [ { "hook_text": "Stop building AI features nobody asked for", "hook_type": "controversial_take", "emotional_trigger": "frustration", "estimated_strength": 0.89, "tone": "authoritative", "video_angle": "expose common mistake" } ]}Hook Types
Section titled “Hook Types”The system classifies hooks into these patterns:
| Type | Example |
|---|---|
controversial_take | ”Most productivity advice is wrong” |
surprising_stat | ”90% of startups fail because of this” |
story_hook | ”I spent $50K on AI tools last year. Here’s what happened.” |
question | ”Why do the best developers avoid frameworks?” |
challenge | ”Try this for 30 days and your code will improve” |
fear_based | ”Your job is about to change forever” |
curiosity_gap | ”The one thing nobody tells you about AI” |
Scrape Creator Hooks
Section titled “Scrape Creator Hooks”Workflow: hooks/scrape
Scrapes video openers from YouTube or TikTok channels to build a hook corpus.
fabric run hooks/scrape \ --input channels='["@fireship", "@mkbhd"]' \ --input platform="youtube" \ --input max_per_channel=20| Parameter | Type | Default | Description |
|---|---|---|---|
channels | list[str] | required | Channel URLs or handles |
platform | string | "youtube" | Platform to scrape |
max_per_channel | int | 20 | Videos per channel |
shorts_only | bool | false | Only scrape Shorts |
Output
Section titled “Output”{ "scraped_hooks": [ { "channel": "@fireship", "video_id": "abc123", "hook_text": "This new JavaScript framework is wild", "transcript_excerpt": "..." } ]}Research-to-Hooks Bridge
Section titled “Research-to-Hooks Bridge”Workflow task: hooks/from_research
Transforms deep research output into the format expected by hook generation. Used internally by composed pipelines.
# Bridges research synthesis → hook generation context# Maps synthesis themes → trends# Maps raw sources → competitor insights