Install
openclaw skills install @m-lwatcher/x-tag-responderDetects when a human tags their AI familiar in someone else's X/Twitter thread, fetches full conversation context, infers intent, and crafts an appropriate reply. Handles X API reply-chain restrictions gracefully.
openclaw skills install @m-lwatcher/x-tag-responderThis skill activates when your human tags you (their AI familiar) in someone else's X/Twitter thread. It fetches the full conversation, infers their intent, drafts a fitting reply, and handles X API reply-chain restrictions.
xurl CLI installed at /home/linuxbrew/.linuxbrew/bin/xurl (or on PATH as xurl)~/.xurl with valid OAuth1 or OAuth2 credentials~/.xurl contents to the LLM contextThis skill is relevant when the user says things like:
Extract the tweet ID or URL from the user's message. It will look like:
https://x.com/username/status/1234567890https://twitter.com/username/status/12345678901234567890If unclear, ask the user: "What's the tweet URL or ID you tagged me in?"
Read the tweet the human tagged you in:
xurl read TWEET_ID
This returns full tweet data including: text, author_id, conversation_id, in_reply_to_user_id, referenced_tweets.
Note the conversation_id — it identifies the root of the thread.
Pull the broader conversation using the conversation_id from Step 2:
xurl search "conversation_id:CONVERSATION_ID" -n 20
This retrieves recent tweets in the thread. Sort mentally by id (ascending = chronological).
Build a mental model of:
Read what the human wrote when they tagged you. Infer one of these intents:
| Cue in tag tweet | Likely intent |
|---|---|
| "What do you think?" / "Thoughts?" | Weigh in with a take |
| "Reply to this" / "Handle this" | Draft a reply on their behalf |
| "Is this true?" / "Fact-check" | Research and report back (don't post) |
| "lol check this out" | Just read/acknowledge, probably no reply needed |
| No cue text — just a tag | Ask the human what they want |
| "@agent check the math" | Analyze/verify, reply if appropriate |
When uncertain, default to: draft a reply and ask the human to approve before posting.
Craft a reply that:
Present the draft to the human for review before posting:
"Here's a draft reply. Should I post it?
[DRAFT TEXT]"
Once the human approves:
xurl reply TWEET_ID "Your reply text here"
Where TWEET_ID is the ID of the specific tweet you are replying to (usually the tweet the human tagged you in, or the thread root if instructed).
The X API only allows you to reply to a tweet if your account is mentioned somewhere in the reply chain.
This means:
xurl reply will fail with a 403 or silently not thread correctly.If reply succeeds: Report back with the posted tweet URL.
If reply fails (403 / authorization error / "not allowed"):
Report back clearly:
"I can't reply directly to that tweet — I'm not in the reply chain. Here's what I'd say though:
[DRAFT TEXT]Options:
- Tag me directly in the specific tweet you want me to reply to — that adds me to the chain.
- You post the reply yourself and I'll write it for you.
- I can quote-tweet instead (no chain restriction): just confirm."
Offering a quote-tweet fallback:
xurl quote TWEET_ID "Your reply text here"
Quote-tweets bypass the reply-chain restriction entirely.
| Error | Meaning | Fix |
|---|---|---|
| 403 Forbidden | Not in reply chain | Report + suggest re-tag or quote-tweet |
| 401 Unauthorized | Auth expired | Run xurl auth status; re-auth if needed |
| 429 Too Many Requests | Rate limited | Wait ~15 min and retry |
| Tweet not found | Deleted or private | Tell the human the tweet is inaccessible |
Human says:
"I tagged you in this tweet — weigh in: https://x.com/someuser/status/9876543210"
Agent workflow:
# 1. Read the tagged tweet
xurl read 9876543210
# → Note: conversation_id=1111111111, text="@quirk what do you think of this?", author=human
# 2. Fetch thread context
xurl search "conversation_id:1111111111" -n 20
# → Read thread: original author debating AI regulation, 5 replies
# 3. Infer intent: "What do you think?" → weigh in
# 4. Draft reply (280 chars max):
# "Regulation works best when it's targeted at outcomes, not methods.
# Banning specific architectures is a game of whack-a-mole —
# but liability frameworks? That actually scales. 🧵"
# 5. Present to human for approval
# 6. Post if approved:
xurl reply 9876543210 "Regulation works best when it's targeted at outcomes, not methods. Banning specific architectures is whack-a-mole — but liability frameworks scale. 🧵"
~/.xurl — it contains API keys and tokens.--verbose / -v in agent sessions — can expose auth headers.xurl internally; do not pass tokens as CLI flags in agent context.