{"id":"978a7cc1-336a-41fa-b918-ff23433d70cf","shortId":"zhqhkX","kind":"skill","title":"engagement-tracker","tagline":"Track engagement metrics on all posted content (Reddit comments, Twitter replies, original posts). Runs 24h after posting to measure performance. Produces weekly analysis with actionable insights. Triggers on \"check engagement\", \"track metrics\", \"how did my posts do\", \"engagement","description":"# Engagement Tracker Skill\n\nClosed-loop analytics for all social media activity. Scrapes engagement metrics 24h after posting, stores structured data, and produces weekly insights.\n\n---\n\n## Core Principle\n\n**You can't optimize what you don't measure.** Every post gets tracked. Every week gets analyzed. Decisions come from data, not vibes.\n\n---\n\n## Configuration\n\nSet your Twitter handle:\n```bash\nexport TWITTER_HANDLE=\"yourhandle\"\n```\n\nPoint to your Twikit directory:\n```bash\nexport TWIKIT_DIR=\"~/crawlee-social-scraper\"  # wherever you have twikit + cookies\n```\n\n---\n\n## Daily Engagement Check (runs at 07:00 your TZ)\n\n### Step 1: Find Yesterday's Posts\n\nRead `memory/YYYY-MM-DD.md` for yesterday's date. Extract all posted URLs from the log tables.\n\n**Reddit comment URLs** look like:\n```\nhttps://www.reddit.com/r/{subreddit}/comments/{post_id}/comment/{comment_id}/\n```\n\n**Twitter reply URLs** look like:\n```\nhttps://x.com/{username}/status/{tweet_id}\n```\n\n### Step 2: Scrape Reddit Comment Metrics\n\nFor each Reddit comment URL, fetch engagement data via AppleScript Chrome:\n\n```bash\nosascript -l JavaScript -e '\nvar chrome = Application(\"Google Chrome\");\nvar tab = chrome.windows[0].activeTab;\ntab.execute({javascript: \"(\" + function() {\n    var commentId = \"COMMENT_ID\";\n    fetch(\"/api/info.json?id=t1_\" + commentId, {credentials: \"include\"})\n        .then(r => r.json())\n        .then(d => {\n            var c = d.data.children[0].data;\n            document.title = \"METRICS:\" + JSON.stringify({\n                id: c.name,\n                score: c.score,\n                ups: c.ups,\n                num_replies: c.num_comments || 0,\n                permalink: c.permalink,\n                subreddit: c.subreddit,\n                body: c.body.substring(0, 100)\n            });\n        });\n} + \")();\"});\n'\nsleep 2\nosascript -e 'tell application \"Google Chrome\" to return title of active tab of first window'\n```\n\n**Multi-profile Chrome fallback:** Use System Events + Console pattern (see `reddit-cultivate` skill).\n\n**Rate limiting:** Wait 2+ seconds between each comment check.\n\n### Step 3: Scrape Twitter Reply Metrics\n\n```bash\ncd $TWIKIT_DIR\nsource venv/bin/activate\npython3 -c \"\nimport asyncio, json\nfrom twikit import Client\n\nasync def check():\n    client = Client('en-US')\n    client.load_cookies('twitter_cookies.json')\n    user = await client.get_user_by_screen_name('$TWITTER_HANDLE')\n    tweets = await client.get_user_tweets(user.id, tweet_type='Replies', count=20)\n    results = []\n    for t in tweets:\n        results.append({\n            'id': t.id,\n            'text': t.text[:100],\n            'created_at': str(t.created_at),\n            'likes': t.favorite_count,\n            'retweets': t.retweet_count,\n            'replies': t.reply_count,\n            'views': t.view_count,\n            'in_reply_to': t.in_reply_to_tweet_id,\n            'url': f'https://x.com/$TWITTER_HANDLE/status/{t.id}'\n        })\n    print(json.dumps(results, indent=2))\n\nasyncio.run(check())\n\"\n```\n\n### Step 4: Store Metrics\n\nAppend to `memory/analytics/engagement-log.json`:\n\n```json\n{\n  \"entries\": [\n    {\n      \"id\": \"reddit-2026-01-01-001\",\n      \"date\": \"2026-01-01\",\n      \"platform\": \"reddit\",\n      \"type\": \"comment\",\n      \"subreddit\": \"SideProject\",\n      \"post_title\": \"Post title here\",\n      \"url\": \"https://www.reddit.com/r/SideProject/comments/abc/comment/xyz/\",\n      \"checked_at\": \"2026-01-02T07:00:00+08:00\",\n      \"hours_since_post\": 22,\n      \"metrics\": {\n        \"upvotes\": 12,\n        \"replies\": 3\n      }\n    }\n  ]\n}\n```\n\n### Step 5: Daily Summary\n\nReport only if there's notable engagement:\n\n```\nEngagement Check (24h metrics)\n\nReddit (3 comments yesterday):\n  r/ClaudeAI \"your post topic\" — 12 upvotes, 3 replies\n  r/SideProject \"your post topic\" — 8 upvotes, 1 reply\n\nTwitter (2 replies yesterday):\n  @somebody — 5 likes, 1500 views\n  @someone — 2 likes, 800 views\n\nTop performer: Reddit r/ClaudeAI comment (12 upvotes)\nNeeds attention: 3 replies on ClaudeAI comment — consider responding!\n```\n\n**If no notable engagement (all zeros):** Reply `HEARTBEAT_OK`, no notification.\n\n**If replies detected:** Flag them for response (author replies = +75 algo weight on Reddit).\n\n---\n\n## Weekly Analysis (runs Sunday)\n\nReads ALL entries from `memory/analytics/engagement-log.json` for the current week.\n\n### Metrics Computed\n\n**Per-Subreddit (Reddit):**\n\n| Subreddit | Posts | Avg Upvotes | Avg Replies | Hit Rate |\n|-----------|-------|-------------|-------------|----------|\n| r/indiehackers | 5 | 12.0 | 2.3 | 100% |\n| r/SideProject | 7 | 5.1 | 0.8 | 43% |\n\n**Hit Rate** = % of posts with upvotes > 5 (adjustable threshold).\n\n**Per-Target Account (Twitter):**\n\n| Account | Replies | Avg Likes | Avg Views |\n|---------|---------|-----------|-----------|\n| @founder | 3 | 4.2 | 2100 |\n| @techperson | 2 | 2.5 | 1800 |\n\n### Actionable Recommendations\n\n```\nWeekly Insights:\n\n1. SHIFT WEIGHT: r/indiehackers has 2.4x better engagement than r/SideProject.\n   → Recommend: 2 comments/day in indiehackers, 1 in SideProject\n\n2. SWEET SPOT: Higher quality score comments get 1.75x more upvotes.\n   → Recommend: Raise quality bar\n\n3. TIMING: Morning posts outperform evening by 40%.\n   → Consider: Add midday posting batch\n\n4. REPLIES UNANSWERED: 7 Reddit replies went unanswered this week.\n   → Action: Respond within 24h for algo boost (+75 weight).\n```\n\n### Weekly Summary Format\n\n```\nWeekly Engagement Report\n\nREDDIT\n  Posts: 21 | Avg upvotes: 7.3 | Best: 23 (r/indiehackers)\n  Karma delta: +53\n  Hit rate: 62% (>5 upvotes)\n\nTWITTER\n  Replies: 18 | Avg likes: 2.8 | Best: 12\n  Followers delta: +7\n  Avg views: 1,340\n\nTOP 3 POSTS THIS WEEK:\n  1. r/indiehackers \"auth rebuild\" — 23 upvotes, 5 replies\n  2. @founder \"reply\" — 12 likes, 3,200 views\n  3. r/ClaudeAI \"setup\" — 15 upvotes, 4 replies\n\nRECOMMENDATIONS:\n  → Shift Reddit weight to r/indiehackers (+2.4x ROI)\n  → 7 unanswered replies — respond today!\n```\n\n---\n\n## Data Schema\n\n### engagement-log.json (append-only)\n\n```json\n{\n  \"entries\": [\n    {\n      \"id\": \"string (platform-date-seq)\",\n      \"date\": \"YYYY-MM-DD\",\n      \"platform\": \"reddit | twitter | linkedin | xhs\",\n      \"type\": \"comment | reply | original_post\",\n      \"subreddit\": \"string (reddit only)\",\n      \"target_account\": \"string (twitter only)\",\n      \"post_title\": \"string\",\n      \"url\": \"string\",\n      \"checked_at\": \"ISO8601\",\n      \"hours_since_post\": \"number\",\n      \"metrics\": {\n        \"upvotes\": \"number\",\n        \"likes\": \"number\",\n        \"retweets\": \"number\",\n        \"replies\": \"number\",\n        \"views\": \"number\"\n      }\n    }\n  ]\n}\n```\n\n---\n\n## Integration with Other Skills\n\n### Feeds Into:\n- **Weekly Review** — reads weekly summary for its report\n- **Content Multiply** — uses performance data to find winners worth repurposing\n\n### Reads From:\n- `memory/YYYY-MM-DD.md` — daily logs with posted URLs\n- Reddit API (via AppleScript Chrome)\n- Twitter API (via Twikit)\n\n---\n\n## Troubleshooting\n\n| Problem | Solution |\n|---------|----------|\n| Reddit API returns 403 | Rate limited — wait 5 min, retry |\n| Twikit cookie expired | Re-export cookies from Chrome |\n| Comment deleted/removed | Log as `metrics: null`, note \"deleted\" |\n| Chrome multi-profile issue | Use Method 2 (System Events + Console) from reddit-cultivate |","tags":["engagement","tracker","claude","agent","skills","phy041","agent-skills","ai-agents","automation","founder","indie-hacker","openclaw"],"capabilities":["skill","source-phy041","skill-engagement-tracker","topic-agent-skills","topic-ai-agents","topic-automation","topic-claude","topic-founder","topic-indie-hacker","topic-openclaw","topic-social-media"],"categories":["claude-agent-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/PHY041/claude-agent-skills/engagement-tracker","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add PHY041/claude-agent-skills","source_repo":"https://github.com/PHY041/claude-agent-skills","install_from":"skills.sh"}},"qualityScore":"0.456","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 13 github stars · SKILL.md body (7,277 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-04-22T13:03:31.904Z","embedding":null,"createdAt":"2026-04-19T00:41:07.290Z","updatedAt":"2026-04-22T13:03:31.904Z","lastSeenAt":"2026-04-22T13:03:31.904Z","tsv":"'+08':433 '+2.4':742 '+53':687 '+7':703 '+75':529,668 '-001':405 '-01':403,404,408,409,428 '-02':429 '-2026':402 '/$twitter_handle/status/':382 '/api/info.json':211 '/comment':158 '/comments':155 '/crawlee-social-scraper':111 '/r/':153 '/r/sideproject/comments/abc/comment/xyz/':424 '/status':168 '0':201,225,240,247 '0.8':569 '00':123,431,432,434 '07':122 '1':127,477,603,619,706,713 '1.75':630 '100':248,352,565 '12':441,467,498,700,724 '12.0':563 '15':732 '1500':486 '18':695 '1800':598 '2':172,250,284,388,480,489,596,615,622,721,889 '2.3':564 '2.4':608 '2.5':597 '2.8':698 '20':341 '200':727 '2026':407,427 '21':678 '2100':594 '22':438 '23':683,717 '24h':18,57,457,664 '3':291,443,460,469,502,592,638,709,726,729 '340':707 '4':392,651,734 '4.2':593 '40':645 '403':858 '43':570 '5':445,484,562,577,691,719,862 '5.1':568 '62':690 '7':567,654,745 '7.3':681 '8':475 '800':491 'account':583,585,784 'action':28,599,661 'activ':53,261 'activetab':202 'add':647 'adjust':578 'algo':530,666 'analysi':26,535 'analyt':48 'analyz':85 'api':844,849,856 'append':395,754 'append-on':753 'applescript':186,846 'applic':195,254 'async':311 'asyncio':305 'asyncio.run':389 'attent':501 'auth':715 'author':527 'avg':555,557,587,589,679,696,704 'await':323,332 'bar':637 'bash':97,107,188,296 'batch':650 'best':682,699 'better':610 'bodi':245 'boost':667 'c':223,303 'c.body.substring':246 'c.name':231 'c.num':238 'c.permalink':242 'c.score':233 'c.subreddit':244 'c.ups':235 'cd':297 'check':32,119,289,313,390,425,456,793 'chrome':187,194,197,256,269,847,873,882 'chrome.windows':200 'claudeai':505 'client':310,314,315 'client.get':324,333 'client.load':319 'close':46 'closed-loop':45 'come':87 'comment':12,147,159,175,180,208,239,288,413,461,497,506,628,775,874 'commentid':207,214 'comments/day':616 'comput':548 'configur':92 'consid':507,646 'consol':274,892 'content':10,825 'cooki':116,320,866,871 'core':67 'count':340,360,363,366,369 'creat':353 'credenti':215 'cultiv':279,896 'current':545 'd':221 'd.data.children':224 'daili':117,446,838 'data':62,89,184,226,750,829 'date':137,406,762,764 'dd':768 'decis':86 'def':312 'delet':881 'deleted/removed':875 'delta':686,702 'detect':522 'dir':110,299 'directori':106 'document.title':227 'e':192,252 'en':317 'en-us':316 'engag':2,5,33,41,42,55,118,183,454,455,512,611,674 'engagement-log.json':752 'engagement-track':1 'entri':399,540,757 'even':643 'event':273,891 'everi':78,82 'expir':867 'export':98,108,870 'extract':138 'f':379 'fallback':270 'feed':815 'fetch':182,210 'find':128,831 'first':264 'flag':523 'follow':701 'format':672 'founder':591,722 'function':205 'get':80,84,629 'googl':196,255 'handl':96,100,330 'heartbeat':516 'higher':625 'hit':559,571,688 'hour':435,796 'id':157,160,170,209,212,230,348,377,400,758 'import':304,309 'includ':216 'indent':387 'indiehack':618 'insight':29,66,602 'integr':811 'iso8601':795 'issu':886 'javascript':191,204 'json':306,398,756 'json.dumps':385 'json.stringify':229 'karma':685 'l':190 'like':150,165,358,485,490,588,697,725,803 'limit':282,860 'linkedin':772 'log':144,839,876 'look':149,164 'loop':47 'measur':22,77 'media':52 'memory/analytics/engagement-log.json':397,542 'memory/yyyy-mm-dd.md':133,837 'method':888 'metric':6,35,56,176,228,295,394,439,458,547,800,878 'midday':648 'min':863 'mm':767 'morn':640 'multi':267,884 'multi-profil':266,883 'multipli':826 'name':328 'need':500 'notabl':453,511 'note':880 'notif':519 'null':879 'num':236 'number':799,802,804,806,808,810 'ok':517 'optim':72 'origin':15,777 'osascript':189,251 'outperform':642 'pattern':275 'per':550,581 'per-subreddit':549 'per-target':580 'perform':23,494,828 'permalink':241 'platform':410,761,769 'platform-date-seq':760 'point':102 'post':9,16,20,39,59,79,131,140,156,416,418,437,465,473,554,574,641,649,677,710,778,788,798,841 'principl':68 'print':384 'problem':853 'produc':24,64 'profil':268,885 'python3':302 'qualiti':626,636 'r':218 'r.json':219 'r/claudeai':463,496,730 'r/indiehackers':561,606,684,714,741 'r/sideproject':471,566,613 'rais':635 'rate':281,560,572,689,859 're':869 're-export':868 'read':132,538,819,835 'rebuild':716 'recommend':600,614,634,736 'reddit':11,146,174,179,278,401,411,459,495,533,552,655,676,738,770,781,843,855,895 'reddit-cultiv':277,894 'repli':14,162,237,294,339,364,371,374,442,470,478,481,503,515,521,528,558,586,652,656,694,720,723,735,747,776,807 'report':448,675,824 'repurpos':834 'respond':508,662,748 'respons':526 'result':342,386 'results.append':347 'retri':864 'return':258,857 'retweet':361,805 'review':818 'roi':744 'run':17,120,536 'schema':751 'score':232,627 'scrape':54,173,292 'screen':327 'second':285 'see':276 'seq':763 'set':93 'setup':731 'shift':604,737 'sideproject':415,621 'sinc':436,797 'skill':44,280,814 'skill-engagement-tracker' 'sleep':249 'social':51 'solut':854 'somebodi':483 'someon':488 'sourc':300 'source-phy041' 'spot':624 'step':126,171,290,391,444 'store':60,393 'str':355 'string':759,780,785,790,792 'structur':61 'subreddit':154,243,414,551,553,779 'summari':447,671,821 'sunday':537 'sweet':623 'system':272,890 't.created':356 't.favorite':359 't.id':349,383 't.in':373 't.reply':365 't.retweet':362 't.text':351 't.view':368 't07':430 't1':213 'tab':199,262 'tab.execute':203 'tabl':145 'target':582,783 'techperson':595 'tell':253 'text':350 'threshold':579 'time':639 'titl':259,417,419,789 'today':749 'top':493,708 'topic':466,474 'topic-agent-skills' 'topic-ai-agents' 'topic-automation' 'topic-claude' 'topic-founder' 'topic-indie-hacker' 'topic-openclaw' 'topic-social-media' 'track':4,34,81 'tracker':3,43 'trigger':30 'troubleshoot':852 'tweet':169,331,335,337,346,376 'twikit':105,109,115,298,308,851,865 'twitter':13,95,99,161,293,329,479,584,693,771,786,848 'twitter_cookies.json':321 'type':338,412,774 'tz':125 'unansw':653,658,746 'up':234 'upvot':440,468,476,499,556,576,633,680,692,718,733,801 'url':141,148,163,181,378,421,791,842 'us':318 'use':271,827,887 'user':322,325,334 'user.id':336 'usernam':167 'var':193,198,206,222 'venv/bin/activate':301 'via':185,845,850 'vibe':91 'view':367,487,492,590,705,728,809 'wait':283,861 'week':25,65,83,534,546,601,660,670,673,712,817,820 'weight':531,605,669,739 'went':657 'wherev':112 'window':265 'winner':832 'within':663 'worth':833 'www.reddit.com':152,423 'www.reddit.com/r/':151 'www.reddit.com/r/sideproject/comments/abc/comment/xyz/':422 'x':609,631,743 'x.com':166,381 'x.com/$twitter_handle/status/':380 'xhs':773 'yesterday':129,135,462,482 'yourhandl':101 'yyyi':766 'yyyy-mm-dd':765 'zero':514","prices":[{"id":"9d9f0a3e-a1c9-4879-8f15-8c5df50d9e46","listingId":"978a7cc1-336a-41fa-b918-ff23433d70cf","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"PHY041","category":"claude-agent-skills","install_from":"skills.sh"},"createdAt":"2026-04-19T00:41:07.290Z"}],"sources":[{"listingId":"978a7cc1-336a-41fa-b918-ff23433d70cf","source":"github","sourceId":"PHY041/claude-agent-skills/engagement-tracker","sourceUrl":"https://github.com/PHY041/claude-agent-skills/tree/main/skills/engagement-tracker","isPrimary":false,"firstSeenAt":"2026-04-19T00:41:07.290Z","lastSeenAt":"2026-04-22T13:03:31.904Z"}],"details":{"listingId":"978a7cc1-336a-41fa-b918-ff23433d70cf","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"PHY041","slug":"engagement-tracker","github":{"repo":"PHY041/claude-agent-skills","stars":13,"topics":["agent-skills","ai-agents","automation","claude","founder","indie-hacker","openclaw","social-media"],"license":null,"html_url":"https://github.com/PHY041/claude-agent-skills","pushed_at":"2026-02-24T15:25:20Z","description":"Collection of Claude Code Agent Skills for founders, indie hackers, and growth engineers","skill_md_sha":"732522073cec592fd5f9286029cc1dd2ff23087a","skill_md_path":"skills/engagement-tracker/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/PHY041/claude-agent-skills/tree/main/skills/engagement-tracker"},"layout":"multi","source":"github","category":"claude-agent-skills","frontmatter":{"name":"engagement-tracker","description":"Track engagement metrics on all posted content (Reddit comments, Twitter replies, original posts). Runs 24h after posting to measure performance. Produces weekly analysis with actionable insights. Triggers on \"check engagement\", \"track metrics\", \"how did my posts do\", \"engagement report\", \"performance analysis\"."},"skills_sh_url":"https://skills.sh/PHY041/claude-agent-skills/engagement-tracker"},"updatedAt":"2026-04-22T13:03:31.904Z"}}