AI Viral Hook Generator — Agent Skill
AI Viral Hook Generator — Agent Skill
Automated viral hook generation via AI Pass API. Use in content automation pipelines, social media schedulers, or any workflow that needs platform-calibrated hook variations.
Endpoint
POST https://aipass.one/apikey/v1/chat/completions
Authorization: Bearer $AIPASS_API_KEY
Get your API key: aipass.one/panel/developer.html
Quick Start
import requests, json, os
def generate_hooks(topic: str, platform: str = "LinkedIn") -> list:
r = requests.post(
"https://aipass.one/apikey/v1/chat/completions",
headers={"Authorization": f"Bearer {os.environ['AIPASS_API_KEY']}"},
json={
"model": "gpt-5-mini",
"temperature": 1,
"max_tokens": 16000,
"messages": [
{"role": "system", "content": f"Generate 5 viral hooks for {platform}. Return JSON: {{hooks:[{{text,type,why}}]}}"},
{"role": "user", "content": f"Topic: {topic}"}
]
}
)
c = r.json()["choices"][0]["message"]["content"]
if "```" in c:
c = c.split("```")[1].lstrip("json")
return json.loads(c.strip())["hooks"]
hooks = generate_hooks("AI tool that speeds up email writing 10x", "LinkedIn")
Hook Types
| Type | Example |
|---|---|
| Curiosity gap | "The email tactic that 10x'd my reply rate..." |
| Contrarian | "Your email subject lines are killing your deliverability" |
| Shocking stat | "The average cold email gets a 1% reply rate. Here's how to get 30%." |
| Personal story | "I sent 1,000 cold emails and learned one painful lesson." |
| Relatable struggle | "If you've ever stared at a blank compose window..." |
| Bold promise | "By the end of this, you'll write cold emails that actually get replies." |
Automation Patterns
# Content calendar automation
def generate_week_content(topics: list, platform: str) -> list:
return [{"topic": t, "hooks": generate_hooks(t, platform)} for t in topics]
# A/B test hook selection
def pick_best_hook(topic: str) -> str:
hooks = generate_hooks(topic, count=10)
priority = ["curiosity gap", "contrarian", "shocking stat"]
for ptype in priority:
match = next((h for h in hooks if h["type"] == ptype), None)
if match: return match["text"]
return hooks[0]["text"]
Related Apps
Skill File
# AI Viral Hook Generator — Agent Skill
## Purpose
Generates platform-specific viral content hooks for automated content pipelines.
## API
POST https://aipass.one/apikey/v1/chat/completions
Authorization: Bearer $AIPASS_API_KEY
Get key: https://aipass.one/panel/developer.html
## Usage
```python
import requests, json, os
def generate_hooks(topic: str, platform: str = 'LinkedIn', count: int = 5) -> list:
r = requests.post(
'https://aipass.one/apikey/v1/chat/completions',
headers={'Authorization': f'Bearer {os.environ["AIPASS_API_KEY"]}'},
json={
'model': 'gpt-5-mini',
'temperature': 1,
'max_tokens': 16000,
'messages': [
{'role': 'system', 'content': f'Generate {count} viral hooks for {platform}. Return JSON: {{hooks:[{{text,type,why}}]}}'},
{'role': 'user', 'content': f'Topic: {topic}'}
]
}
)
c = r.json()['choices'][0]['message']['content']
if '```' in c: c = c.split('```')[1].lstrip('json')
return json.loads(c.strip())['hooks']
hooks = generate_hooks('AI productivity tools', 'LinkedIn')
best = next((h for h in hooks if h['type'] == 'curiosity gap'), hooks[0])
print(best['text'])
```
## Related Apps
- https://aipass.one/apps/viral-hook-gen
- https://aipass.one/apps/social-writer
Download Skill File