Agent skill
Refresh X
Fetch a tracked X/Twitter account's latest tweets and save the gist to memory
Install this agent skill to your Project
npx add-skill https://github.com/aaronjmars/aeon/tree/main/skills/refresh-x
SKILL.md
${var} — The @handle to check (e.g. "@elonmusk", "vitalikbuterin"). Required — set this in aeon.yml or pass it when triggering the skill.
Read memory/MEMORY.md for context. Read the last 2 days of memory/logs/ to avoid logging duplicate tweets.
Steps
-
Fetch the latest tweets from the specified account over the past 24 hours:
bashFROM_DATE=$(date -u -d "yesterday" +%Y-%m-%d 2>/dev/null || date -u -v-1d +%Y-%m-%d) TO_DATE=$(date -u +%Y-%m-%d) ACCOUNT="${var}" # Strip @ if present ACCOUNT="${ACCOUNT#@}" if [ -z "$ACCOUNT" ]; then echo "Error: var must be set to a Twitter handle (e.g. 'elonmusk')" exit 1 fi 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 all tweets posted by @'"$ACCOUNT"' from '"$FROM_DATE"' to '"$TO_DATE"'. Return every tweet — not just popular ones. For each: the full tweet text, date/time posted, engagement stats (likes, retweets, replies), and the direct link (https://x.com/'"$ACCOUNT"'/status/ID). If it was a reply, note who it was replying to. If it was a quote tweet, include what was quoted. Return as a chronological list."}], "tools": [{"type": "x_search", "from_date": "'"$FROM_DATE"'", "to_date": "'"$TO_DATE"'"}] }'If
XAI_API_KEYis not set, skip and log that the skill requires it. -
Summarize what was posted:
- How many tweets/replies/quote tweets
- Top themes and topics covered
- Which tweets got the most engagement and why
- Any threads or multi-tweet arcs
- Tone/mood of the day (shitposting? serious? argumentative?)
-
Save the gist to memory/logs/${today}.md:
## Refresh X - **Account:** @ACCOUNT - **Tweets found:** N (X original, Y replies, Z quotes) - **Top themes:** theme1, theme2, theme3 - **Best performing:** "[tweet excerpt]" — X likes, Y RTs - **Gist:** [2-3 sentence summary of what they were talking about and the vibe] -
If there are tweets worth remembering (strong takes, announcements, threads), also note them in memory/MEMORY.md under a relevant section.
-
Send a brief summary via
./notify:x refresh: @ACCOUNT posted N tweets yesterday top themes: theme1, theme2 best: "[excerpt]" (X likes)
Environment Variables Required
XAI_API_KEY— X.AI API key for Grok x_search
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?