Agent skill
Fetch Tweets
Search X/Twitter for tweets by keyword, username, or both
Install this agent skill to your Project
npx add-skill https://github.com/aaronjmars/aeon/tree/main/skills/fetch-tweets
SKILL.md
${var} — Search query for X/Twitter — keyword, @user, or #hashtag. Required — set your query in aeon.yml.
Today is ${today}. Search X for tweets matching ${var}.
Steps
-
Search tweets via X.AI API using curl:
bashFROM_DATE=$(date -u -d "7 days ago" +%Y-%m-%d 2>/dev/null || date -u -v-7d +%Y-%m-%d) TO_DATE=$(date -u +%Y-%m-%d) curl -s -X POST "https://api.x.ai/v1/responses" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $XAI_API_KEY" \ -d '{ "model": "grok-4-1-fast", "input": [{"role": "user", "content": "Search X for: ${var}. Date range: '"$FROM_DATE"' to '"$TO_DATE"'. Return 10 tweets — prioritize the most interesting, insightful, or highly-engaged posts. For each tweet include: @handle, the full text, date posted, engagement (likes/retweets if available), and the direct link (https://x.com/handle/status/ID). Return as a numbered list."}], "tools": [{"type": "x_search", "from_date": "'"$FROM_DATE"'", "to_date": "'"$TO_DATE"'"}] }'Parse the response JSON to extract the assistant's output text.
-
Save the results to
memory/logs/${today}.md. -
Log to memory what was fetched.
-
Send a notification via
./notifywith a quick summary.
Usage Examples
query=AI agents— latest tweets about AI agentsquery=from:elonmusk— tweets from a specific userquery=solana NFT— tweets about a topicquery=from:vaborsh ethereum— tweets from a user about a topicquery=#DeFi— tweets with a hashtag
Environment Variables Required
XAI_API_KEY— X.AI API key (required)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
Polymarket
Trending and top markets on Polymarket — volume, new markets, biggest movers
Daily Article
Research trending topics and write a publication-ready article
DeFi Monitor
Check pool health, positions, and yield rates for tracked protocols
Skill Evals
Evaluate skill output quality against assertion manifests — detects regressions before users notice
Monitor Polymarket
Monitor specific prediction markets for 24h price moves, volume changes, and fresh comments
Self Review
Weekly audit of what Aeon did, what failed, and what to improve
Didn't find tool you were looking for?