{"id":"c857e955-6a3a-4ef1-978c-85b58bb39cb6","shortId":"DzWQ9R","kind":"skill","title":"subject-line-lab","tagline":"Mine your actual subject-line history from Klaviyo / Mailchimp / Rule / Get a Newsletter, find the patterns that work for YOUR list, and generate tuned candidates","description":"# Subject Line Lab\n\nStop A/B testing blind. This skill reads **your actual last 100+ sends**, finds the subject-line patterns that correlate with open rate on *your* list, and generates 20 tuned candidates for your next campaign.\n\n**Requires:** Cogny MCP + a connected ESP (Klaviyo, Mailchimp, Rule, or Get a Newsletter). [Sign up](https://cogny.com)\n\n## Usage\n\n`/subject-line-lab` — mine patterns and generate generic candidates\n`/subject-line-lab \"Black Friday doors open\"` — mine patterns and generate candidates for a specific campaign topic\n\n## Prerequisites Check\n\nDetect which ESP is connected. Check **both** namespaces (Cloud-aggregated via `mcp__cogny__<svc>__*` and Solo/Lite per-ESP via `mcp__<svc>__*`):\n\n- Klaviyo → `mcp__cogny__klaviyo__*` or `mcp__klaviyo__*`\n- Mailchimp → `mcp__cogny__mailchimp__*` or `mcp__mailchimp__*`\n- Rule → `mcp__cogny__rule__*` or `mcp__rule__*`\n- Get a Newsletter → `mcp__cogny__get_a_newsletter__*` or `mcp__get_a_newsletter__*`\n\nIf none are connected:\n\n```\nThis skill requires a connected ESP via Cogny MCP.\nConnect Klaviyo, Mailchimp, Rule, or Get a Newsletter at https://cogny.com\n```\n\nIf multiple are connected, prompt the user which one to analyze (or analyze all, labeled).\n\n## ESP tool adapter\n\nEach ESP exposes subject-line history differently. Use the right tool per connected service:\n\n| ESP | Send history tool | Notes |\n|-----|-------------------|-------|\n| Klaviyo | `list_campaigns` (channel=email) then `get_campaign` | Tools are bare-named. Use `list_events` for deeper open/click metrics. |\n| Mailchimp | `tool_list_reports` then `tool_get_report` | Reports are the source of truth for opens/clicks per send. |\n| Rule | `tool_list_campaigns` then `tool_get_campaign_statistics` | Statistics tool returns opens/clicks/bounces. |\n| Get a Newsletter | `tool_list_sent` then `tool_get_sent` and `tool_get_report` | \"Campaigns\" don't exist as an object — iterate `list_sent` for subject+date, `get_report` per send for metrics. |\n\n## Steps\n\n### 1. Pull send history\nFor the connected ESP, pull the last **100 campaign sends** (or as many as available). For each, capture:\n- Subject line\n- Preheader (if available)\n- Send date + time (recipient local time if available)\n- Recipient count\n- Unique opens → open rate\n- Unique clicks → CTR\n- Segment / list name\n- Campaign type (promo, newsletter, announcement, transactional-adjacent)\n\nSkip transactional sends and automated flow emails — they distort the signal. Focus on broadcast campaigns.\n\n### 2. Compute baseline\n- **Median open rate** across the sample\n- **Mean open rate** (flag skew if mean ≠ median by >20%)\n- **Sample size warning** — if <30 sends, warn the user: \"small sample, patterns may be noise\"\n\n### 3. Extract subject-line features\nFor each subject line, tag these features (use keyword/regex heuristics — no ML needed):\n\n**Structural:**\n- Length (chars): <30 / 30-50 / 50-70 / >70\n- Word count\n- Title Case / Sentence case / ALL CAPS / lowercase\n- Ends in `?` / `!` / `.` / no punctuation\n\n**Content:**\n- Contains emoji (count, type)\n- Contains number / digit\n- Contains `%` or `$` or currency (promo signal)\n- Contains personalization token (`{{ first_name }}`, `[Firstname]`)\n- Question vs statement vs command\n- First-person (\"I\", \"we\", \"my\") vs second-person (\"you\", \"your\")\n- Urgency words: \"today\", \"tonight\", \"last chance\", \"ends\", \"hours\", \"don't miss\"\n- FOMO / scarcity: \"only\", \"limited\", \"few left\", \"selling fast\"\n- Curiosity gap: starts with \"why\", \"how\", \"the truth about\", \"what I learned\"\n- Benefit-led: leads with a noun describing an outcome\n- Social proof: \"customers\", \"members\", a number of people\n\n**Temporal:**\n- Day of week sent\n- Hour of day (bucketed: early morning / morning / midday / afternoon / evening / late)\n\n### 4. Compute lift per feature\nFor each feature, compute:\n- **Count in sample**\n- **Mean open rate when feature is present**\n- **Mean open rate when feature is absent**\n- **Lift** (% difference vs non-feature baseline)\n- **Significance note** — flag as \"strong\" if n≥10 in both groups and lift is ≥10% relative; \"weak\" otherwise\n\nRank features by absolute lift.\n\n### 5. Identify winning patterns\n\nOutput the top 5 **positive** patterns and top 3 **negative** patterns with specific numbers:\n\n```\nPatterns that worked for your list (last 100 sends):\n\n🟢 WINNERS\n1. Subject lines ending in \"?\" → 34% open rate vs 21% baseline (+62%, n=14 strong)\n2. Subject lines with numbers → 29% open rate vs 21% (+38%, n=22 strong)\n3. Length 30-50 chars → 27% open rate vs 19% (+42%, n=31 strong)\n4. First-person voice (\"I\", \"we\") → 26% open rate vs 22% (+18%, n=18 strong)\n5. Sent Tue 09:00-11:00 → 28% open rate vs 22% (+27%, n=12 weak)\n\n🔴 DRAGS\n1. ALL CAPS words → 14% open rate vs 23% (-39%, n=8 weak)\n2. Emoji at start → 18% open rate vs 24% (-25%, n=11 strong)\n3. Urgency words (\"last chance\", \"today only\") → 16% open rate vs 22% (-27%, n=9 weak)\n\nYour best historical subject: \"<actual subject>\" at <open rate>% (<date>)\nYour worst: \"<actual subject>\" at <open rate>% (<date>)\n```\n\n### 6. Generate tuned candidates\n\nIf a campaign topic was provided, generate **20 subject line candidates** that follow the winning patterns and avoid the drags. If no topic was provided, generate 20 generic promo/newsletter candidates using your patterns.\n\nFormat:\n\n```\nCandidates for: \"<topic>\"\n(tuned to: ends-in-?, has-number, 30-50 chars, first-person voice)\n\nPreheader recommendation: 85-100 chars, don't duplicate subject, extend the hook.\n\n1. \"What <specific number> of our customers asked last week?\" (52 chars)\n   Preheader: \"We pulled the top 5 questions and answered them in one place — you'll recognize #2.\"\n2. ...\n20. ...\n\n──\nA/B test plan:\n- Primary variant: candidate #<N> (leans hardest into top pattern)\n- Challenger: candidate #<M> (different angle to avoid pattern overfitting)\n- Hold-out: your house-style baseline subject\nSegment: X% / Y% / Z%\n```\n\n### 7. Persist patterns as context\n\nSave the winning-pattern summary to Cogny's context tree for future sessions:\n\n```json\n{\n  \"path\": \"insights/email/subject-line-patterns\",\n  \"body\": \"<the top 5 winners + top 3 drags, with numbers and date range>\"\n}\n```\n\n### 8. Create a finding\n\nIf the analysis surfaces a clear actionable insight (e.g., \"50% of recent sends use emoji-at-start which is actively hurting opens\"), create a finding:\n\n```json\n{\n  \"title\": \"Emoji-at-start subjects are tanking opens (-25% vs baseline)\",\n  \"body\": \"11 of last 100 sends started with emoji. Avg open 18% vs 24% non-emoji baseline. Recommend: move emoji to mid-subject or drop entirely on next 10 campaigns and re-measure.\",\n  \"action_type\": \"subject_line_optimization\",\n  \"expected_outcome\": \"Lift average open rate by 2-4 pp\",\n  \"estimated_impact_usd\": 0,\n  \"priority\": \"medium\"\n}\n```\n\n## Notes\n\n- Lift numbers are **correlational**, not causal — always surface sample size and flag weak signals.\n- If the user's list is <5,000 subscribers, opens are noisy. Recommend 2-week lookback minimum and warn.\n- Apple MPP inflates open rate for iOS Mail users. If open rate looks uniformly high (>40%+ across everything), the signal is degraded — note this and lean on CTR as a secondary metric.","tags":["subject","line","lab","claude","code","marketing","skills","cognyai","agent-skills","ai-agents","claude-code","claude-skills"],"capabilities":["skill","source-cognyai","skill-subject-line-lab","topic-agent-skills","topic-ai-agents","topic-claude-code","topic-claude-skills","topic-cluade-mcp","topic-cursor","topic-geo","topic-growth-hacking","topic-llm","topic-marketing","topic-mcp","topic-seo"],"categories":["claude-code-marketing-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/cognyai/claude-code-marketing-skills/subject-line-lab","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add cognyai/claude-code-marketing-skills","source_repo":"https://github.com/cognyai/claude-code-marketing-skills","install_from":"skills.sh"}},"qualityScore":"0.474","qualityRationale":"deterministic score 0.47 from registry signals: · indexed on github topic:agent-skills · 48 github stars · SKILL.md body (7,183 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T18:58:07.923Z","embedding":null,"createdAt":"2026-04-22T18:59:09.298Z","updatedAt":"2026-05-18T18:58:07.923Z","lastSeenAt":"2026-05-18T18:58:07.923Z","tsv":"'+18':697 '+27':713 '+38':667 '+42':681 '+62':653 '-100':826 '-11':706 '-25':740,971 '-27':756 '-39':727 '-4':1023 '-50':439,674,817 '-70':441 '/subject-line-lab':86,93 '0':1028 '00':705,707 '000':1053 '09':704 '1':311,642,718,835 '10':598,605,1004 '100':44,322,639,978 '11':742,975 '12':715 '14':655,722 '16':751 '18':699,735,985 '19':680 '2':381,657,731,861,862,1022,1059 '20':62,399,779,798,863 '21':651,666 '22':669,696,712,755 '23':726 '24':739,987 '26':692 '27':676 '28':708 '29':662 '3':415,626,671,744,924 '30':404,437,438,673,816 '31':683 '34':647 '4':558,685 '40':1080 '5':614,621,701,850,921,1052 '50':440,944 '52':843 '6':768 '7':896 '70':442 '8':729,931 '85':825 '9':758 'a/b':35,864 'absent':583 'absolut':612 'across':387,1081 'action':941,1010 'activ':955 'actual':7,42 'adapt':205 'adjac':365 'afternoon':555 'aggreg':120 'alway':1038 'analysi':937 'analyz':198,200 'angl':878 'announc':362 'answer':853 'appl':1065 'ask':840 'autom':370 'avail':329,337,345 'averag':1018 'avg':983 'avoid':789,880 'bare':237 'bare-nam':236 'baselin':383,590,652,890,973,991 'benefit':525 'benefit-l':524 'best':761 'black':94 'blind':37 'bodi':918,974 'broadcast':379 'bucket':550 'campaign':68,106,228,233,267,271,291,323,358,380,774,1005 'candid':30,64,92,102,771,782,801,806,869,876 'cap':450,720 'captur':332 'case':446,448 'causal':1037 'challeng':875 'chanc':498,748 'channel':229 'char':436,675,818,827,844 'check':109,115 'clear':940 'click':353 'cloud':119 'cloud-aggreg':118 'cogni':70,123,133,140,147,156,176,908 'cogny.com':84,187 'command':480 'comput':382,559,566 'connect':73,114,168,173,178,191,219,317 'contain':457,461,464,470 'content':456 'context':900,910 'correl':53,1035 'count':347,444,459,567 'creat':932,958 'ctr':354,1092 'curios':512 'currenc':467 'custom':536,839 'date':303,339,929 'day':543,549 'deeper':243 'degrad':1086 'describ':531 'detect':110 'differ':213,585,877 'digit':463 'distort':374 'door':96 'drag':717,791,925 'drop':1000 'duplic':830 'e.g':943 'earli':551 'email':230,372 'emoji':458,732,950,964,982,990,994 'emoji-at-start':949,963 'end':452,499,645,811 'ends-in':810 'entir':1001 'esp':74,112,128,174,203,207,221,318 'estim':1025 'even':556 'event':241 'everyth':1082 'exist':294 'expect':1015 'expos':208 'extend':832 'extract':416 'fast':511 'featur':420,427,562,565,574,581,589,610 'find':19,46,934,960 'first':473,482,687,820 'first-person':481,686,819 'firstnam':475 'flag':393,593,1043 'flow':371 'focus':377 'follow':784 'fomo':504 'format':805 'friday':95 'futur':913 'gap':513 'generat':28,61,90,101,769,778,797 'generic':91,799 'get':16,79,152,157,162,183,232,252,270,277,285,289,304 'group':601 'hardest':871 'has-numb':813 'heurist':430 'high':1079 'histor':762 'histori':11,212,223,314 'hold':884 'hold-out':883 'hook':834 'hour':500,547 'hous':888 'house-styl':887 'hurt':956 'identifi':615 'impact':1026 'inflat':1067 'insight':942 'insights/email/subject-line-patterns':917 'io':1071 'iter':298 'json':915,961 'keyword/regex':429 'klaviyo':13,75,131,134,137,179,226 'lab':4,33 'label':202 'last':43,321,497,638,747,841,977 'late':557 'lead':527 'lean':870,1090 'learn':523 'led':526 'left':509 'length':435,672 'lift':560,584,603,613,1017,1032 'limit':507 'line':3,10,32,50,211,334,419,424,644,659,781,1013 'list':26,59,227,240,248,266,281,299,356,637,1050 'll':859 'local':342 'look':1077 'lookback':1061 'lowercas':451 'mail':1072 'mailchimp':14,76,138,141,144,180,246 'mani':327 'may':412 'mcp':71,122,130,132,136,139,143,146,150,155,161,177 'mean':390,396,570,577 'measur':1009 'median':384,397 'medium':1030 'member':537 'metric':245,309,1096 'mid':997 'mid-subject':996 'midday':554 'mine':5,87,98 'minimum':1062 'miss':503 'ml':432 'morn':552,553 'move':993 'mpp':1066 'multipl':189 'n':597,654,668,682,698,714,728,741,757 'name':238,357,474 'namespac':117 'need':433 'negat':627 'newslett':18,81,154,159,164,185,279,361 'next':67,1003 'nois':414 'noisi':1057 'non':588,989 'non-emoji':988 'non-featur':587 'none':166 'note':225,592,1031,1087 'noun':530 'number':462,539,631,661,815,927,1033 'object':297 'one':196,856 'open':55,97,349,350,385,391,571,578,648,663,677,693,709,723,736,752,957,970,984,1019,1055,1068,1075 'open/click':244 'opens/clicks':261 'opens/clicks/bounces':276 'optim':1014 'otherwis':608 'outcom':533,1016 'output':618 'overfit':882 'path':916 'pattern':21,51,88,99,411,617,623,628,632,787,804,874,881,898,905 'peopl':541 'per':127,218,262,306,561 'per-esp':126 'persist':897 'person':471,483,490,688,821 'place':857 'plan':866 'posit':622 'pp':1024 'prehead':335,823,845 'prerequisit':108 'present':576 'primari':867 'prioriti':1029 'promo':360,468 'promo/newsletter':800 'prompt':192 'proof':535 'provid':777,796 'pull':312,319,847 'punctuat':455 'question':476,851 'rang':930 'rank':609 'rate':56,351,386,392,572,579,649,664,678,694,710,724,737,753,1020,1069,1076 're':1008 're-measur':1007 'read':40 'recent':946 'recipi':341,346 'recogn':860 'recommend':824,992,1058 'relat':606 'report':249,253,254,290,305 'requir':69,171 'return':275 'right':216 'rule':15,77,145,148,151,181,264 'sampl':389,400,410,569,1040 'save':901 'scarciti':505 'second':489 'second-person':488 'secondari':1095 'segment':355,892 'sell':510 'send':45,222,263,307,313,324,338,368,405,640,947,979 'sent':282,286,300,546,702 'sentenc':447 'servic':220 'session':914 'sign':82 'signal':376,469,1045,1084 'signific':591 'size':401,1041 'skew':394 'skill':39,170 'skill-subject-line-lab' 'skip':366 'small':409 'social':534 'solo/lite':125 'sourc':257 'source-cognyai' 'specif':105,630 'start':514,734,952,966,980 'statement':478 'statist':272,273 'step':310 'stop':34 'strong':595,656,670,684,700,743 'structur':434 'style':889 'subject':2,9,31,49,210,302,333,418,423,643,658,763,780,831,891,967,998,1012 'subject-lin':8,48,209,417 'subject-line-lab':1 'subscrib':1054 'summari':906 'surfac':938,1039 'tag':425 'tank':969 'tempor':542 'test':36,865 'time':340,343 'titl':445,962 'today':495,749 'token':472 'tonight':496 'tool':204,217,224,234,247,251,265,269,274,280,284,288 'top':620,625,849,873,920,923 'topic':107,775,794 'topic-agent-skills' 'topic-ai-agents' 'topic-claude-code' 'topic-claude-skills' 'topic-cluade-mcp' 'topic-cursor' 'topic-geo' 'topic-growth-hacking' 'topic-llm' 'topic-marketing' 'topic-mcp' 'topic-seo' 'transact':364,367 'transactional-adjac':363 'tree':911 'truth':259,519 'tue':703 'tune':29,63,770,808 'type':359,460,1011 'uniform':1078 'uniqu':348,352 'urgenc':493,745 'usag':85 'usd':1027 'use':214,239,428,802,948 'user':194,408,1048,1073 'variant':868 'via':121,129,175 'voic':689,822 'vs':477,479,487,586,650,665,679,695,711,725,738,754,972,986 'warn':402,406,1064 'weak':607,716,730,759,1044 'week':545,842,1060 'win':616,786,904 'winner':641,922 'winning-pattern':903 'word':443,494,721,746 'work':23,634 'worst':766 'x':893 'y':894 'z':895","prices":[{"id":"0009e1a9-3333-4259-9199-7383df206d32","listingId":"c857e955-6a3a-4ef1-978c-85b58bb39cb6","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"cognyai","category":"claude-code-marketing-skills","install_from":"skills.sh"},"createdAt":"2026-04-22T18:59:09.298Z"}],"sources":[{"listingId":"c857e955-6a3a-4ef1-978c-85b58bb39cb6","source":"github","sourceId":"cognyai/claude-code-marketing-skills/subject-line-lab","sourceUrl":"https://github.com/cognyai/claude-code-marketing-skills/tree/main/skills/subject-line-lab","isPrimary":false,"firstSeenAt":"2026-04-22T18:59:09.298Z","lastSeenAt":"2026-05-18T18:58:07.923Z"}],"details":{"listingId":"c857e955-6a3a-4ef1-978c-85b58bb39cb6","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"cognyai","slug":"subject-line-lab","github":{"repo":"cognyai/claude-code-marketing-skills","stars":48,"topics":["agent-skills","ai-agents","claude-code","claude-skills","cluade-mcp","cursor","geo","growth-hacking","llm","marketing","mcp","seo","vibe","windsurf"],"license":null,"html_url":"https://github.com/cognyai/claude-code-marketing-skills","pushed_at":"2026-05-07T20:57:53Z","description":"Marketing skills for Claude Code — SEO audits and implementation, ad analysis, ad optimization. Free skills need no account. $9/mo for live Search Console, Bing & LinkedIn data.","skill_md_sha":"d3b606b12ccabe8d45ebb2a14b78913ac8496778","skill_md_path":"skills/subject-line-lab/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/cognyai/claude-code-marketing-skills/tree/main/skills/subject-line-lab"},"layout":"multi","source":"github","category":"claude-code-marketing-skills","frontmatter":{"name":"subject-line-lab","description":"Mine your actual subject-line history from Klaviyo / Mailchimp / Rule / Get a Newsletter, find the patterns that work for YOUR list, and generate tuned candidates"},"skills_sh_url":"https://skills.sh/cognyai/claude-code-marketing-skills/subject-line-lab"},"updatedAt":"2026-05-18T18:58:07.923Z"}}