Loading...
Loading...
Create and manage a Notion-based tweet performance tracking system for "poor man's reinforcement learning"
npx skill4agent add different-ai/agent-bank tweet-rl-tracker1. WRITE -> Draft tweet with a hypothesis (hook type, topic, etc.)
2. POST -> Publish to Twitter/X
3. LOG -> Record in Notion after 24-48hrs with metrics
4. SCORE -> Mark "Worked?" based on engagement rate
5. REVIEW -> Weekly: compare winners vs losers, extract patterns
6. REPEAT -> Apply learnings to step 1| Property | Type | Purpose |
|---|---|---|
| Tweet | title | The tweet text |
| Likes | number | Primary engagement signal |
| Impressions | number | Reach/views |
| Score | formula | |
| Worked? | checkbox | Binary gut-check - was this a win? |
| Property | Type | Options |
|---|---|---|
| Hook | select | Question, Bold Claim, Story, List, How-To, Contrarian, Data/Stats |
| Topic | select | (customize to your niche) |
| Posted | date | When you posted |
| Property | Type | Purpose |
|---|---|---|
| Replies | number | Conversation signal |
| Retweets | number | Amplification signal |
| Link | url | Link to original tweet |
| Notes | rich_text | Why did it work/fail? |
notion_notion-create-pages with:
- title: "Tweet Lab" (or your preferred name)
- content: Brief intro about the system
Then inside that page, create a database with:
notion_notion-create-database with the schema above{
"pages": [
{
"properties": { "title": "Tweet Lab" },
"content": "## Tweet Performance Tracker\n\nA simple system to track what works and improve over time.\n\n### The Loop\n1. Post tweet\n2. Log metrics after 24-48hrs\n3. Mark if it \"Worked\"\n4. Weekly: review patterns\n\n<database>Tweets</database>"
}
]
}{
"parent": { "page_id": "<page-id-from-above>" },
"title": [{ "type": "text", "text": { "content": "Tweets" } }],
"properties": {
"Tweet": { "type": "title", "title": {} },
"Likes": { "type": "number", "number": { "format": "number" } },
"Impressions": { "type": "number", "number": { "format": "number" } },
"Score": {
"type": "formula",
"formula": {
"expression": "if(prop(\"Impressions\") > 0, prop(\"Likes\") / prop(\"Impressions\") * 100, 0)"
}
},
"Worked?": { "type": "checkbox", "checkbox": {} },
"Hook": {
"type": "select",
"select": {
"options": [
{ "name": "Question", "color": "blue" },
{ "name": "Bold Claim", "color": "red" },
{ "name": "Story", "color": "green" },
{ "name": "List", "color": "yellow" },
{ "name": "How-To", "color": "purple" },
{ "name": "Contrarian", "color": "orange" },
{ "name": "Data/Stats", "color": "pink" }
]
}
},
"Topic": {
"type": "select",
"select": { "options": [] }
},
"Posted": { "type": "date", "date": {} }
}
}| Goal | Primary Metric | Formula |
|---|---|---|
| Virality | Retweets / Impressions | Amplification rate |
| Engagement | (Likes + Replies) / Impressions | Interaction rate |
| Growth | Profile clicks / Impressions | Curiosity rate |
| Community | Replies / Impressions | Conversation rate |
Screenshota6913492-bfdc-4f6a-b539-ea98b57a2738https://x.com/username/status/1234567890// Open new page with the tweet
new_page({ url: 'https://x.com/username/status/1234567890' });
// Wait for tweet to load
wait_for({ text: 'Reply' }); // or wait for specific tweet content// Take full page screenshot
take_screenshot({ fullPage: false });
// Or screenshot specific element (the tweet article)
take_snapshot(); // Get element uids first
take_screenshot({ uid: 'tweet-article-uid' });// 1. Find and click the video to start playing
take_snapshot();
click({ uid: 'video-player-uid' });
// 2. Wait 10 seconds for video to play
// (Use evaluate_script to seek if possible)
evaluate_script({
function: `() => {
const video = document.querySelector('video');
if (video) {
video.currentTime = 10;
video.pause();
return { success: true, duration: video.duration };
}
return { success: false };
}`,
});
// 3. Take screenshot of the video frame
take_screenshot({ fullPage: false });evaluate_script({
function: `() => {
// Extract tweet text
const tweetText = document.querySelector('[data-testid="tweetText"]')?.textContent || '';
// Extract author
const author = document.querySelector('[data-testid="User-Name"]')?.textContent || '';
// Extract metrics (likes, retweets, etc.)
const metrics = {};
document.querySelectorAll('[data-testid="like"], [data-testid="retweet"]').forEach(el => {
const label = el.getAttribute('aria-label') || '';
if (label.includes('like')) metrics.likes = parseInt(label) || 0;
if (label.includes('repost')) metrics.retweets = parseInt(label) || 0;
});
// Check if video exists
const hasVideo = !!document.querySelector('video');
const hasImage = !!document.querySelector('[data-testid="tweetPhoto"]');
return {
text: tweetText,
author,
metrics,
mediaType: hasVideo ? 'Video' : hasImage ? 'Image' : 'None'
};
}`,
});User: Add this tweet to the tracker: https://x.com/unvalley_/status/2005899617775542298
Agent workflow:
1. new_page({ url: 'https://x.com/unvalley_/status/2005899617775542298' })
2. wait_for({ text: 'Reply' })
3. take_snapshot() - to see page structure
4. evaluate_script() - extract tweet text, author, media type
5. If video: seek to 10s and pause
6. take_screenshot() - capture the visual
7. Save screenshot to local file (screenshot is returned as base64)
8. Create Notion page with extracted data + screenshot file// After taking screenshot, you'll get base64 data
// Save it locally first:
const fs = require('fs');
const screenshotPath = `/tmp/tweet-${Date.now()}.png`;
fs.writeFileSync(screenshotPath, Buffer.from(base64Data, 'base64'));
// Then upload to your preferred hosting and get URL
// Finally, create Notion page with the screenshot URL| Tool | Purpose |
|---|---|
| Navigate to tweet URL |
| Wait for tweet to load |
| Get accessibility tree (find element uids) |
| Capture visual screenshot |
| Extract tweet data, control video playback |
| Click play button on video |
wait_forsetTimeoutfullPage: true