x-auto-engagement
Skill9 starsChanged 6 months agoApache-2.0View on GitHub
Automatically engage with X (Twitter) home timeline by liking and replying to relevant tweets. The agent reads a persona profile (X-PROFILE.md), fetches timeline via script, filters tweets by relevance, generates comments directly, and publishes via script. Designed to run as a scheduled cron job (3x daily). Use when the user asks to set up X auto-engagement, configure a commenter persona, run timeline engagement, or troubleshoot engagement failures.
- Reads credentials
- Installs packages
In this repository18 other files it gives its agents.
- archive-card-writerSkill
- article-to-scriptSkill
- blogSkill
- blog-style-htmlSkill
- brainstormSkill
- compareSkill
- curated-content-writerSkill
- deep-diveSkill
- diff-storySkill
- explore-siteSkill
- gemini-tts-fastSkill
- learnSkill
- quizSkill
- resumeSkill
- screenshotSkill
- script-to-remotionSkill
- terminal-slide-deckSkill
- user-insight-researchSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 13 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
Read X-PROFILE.md from the workspace root.
- Distinctive: line 32
If the file does not exist, stop and report the error.
- Distinctive: line 36
Run the fetch script:
- Very specific: line 54
If tweets is empty (all filtered out), write a skip report to output/ and stop.
- Distinctive: line 74
Keep comments under 280 characters
- Distinctive: line 75
Follow the tone, style, and guidelines from X-PROFILE.md
- Distinctive: line 78
Write in English only
- Distinctive: line 79
Do not use hashtags unless the original tweet uses them
- Distinctive: line 80
Do not @ mention the author
- Very specific: line 109
Create the output/ directory if it does not exist.
- Distinctive: line 113
NEVER publish more than 10 comments in a single run.
- Distinctive: line 114
NEVER skip the filtering step.
- Distinctive: line 115
If fetch returns 0 eligible tweets, exit gracefully with a skip report.
- Distinctive: line 116
If publish partially fails, still save the report.
- Distinctive: line 120
Create a cron job for automated execution (3x daily):
- Very specific: line 142
Create the agent (if not exists): openclaw agents add <name>
- Distinctive: line 149
Create cron job when satisfied with results
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
X Auto Engagement
Overview
This skill automates X (Twitter) timeline engagement. The agent itself is the brain: it reads a persona profile, judges tweet relevance, and generates comments. Python scripts handle X API I/O (fetching timeline, posting likes and replies).
Each openclaw agent corresponds to one X account. Per-user config lives in the agent workspace root:
X-PROFILE.md- persona background knowledge.env- X API OAuth 1.0a credentials
Prerequisites
- A
.envfile in the workspace root with OAuth 1.0a credentials. Seereference/env-example.txt. - An
X-PROFILE.mdfile in the workspace root with persona info. Seetemplates/X-PROFILE.md. - Python dependencies installed:
pip install -r .openclaw/skills/x-auto-engagement/scripts/requirements.txt
Workflow
Execute these steps in order. Do not skip any step.
Step 1: Read Persona Profile
Read X-PROFILE.md from the workspace root. This file defines who you are on X: your expertise, tone, topics of interest, comment guidelines, and example comments.
Internalize the persona. All subsequent filtering and comment generation must reflect this profile.
If the file does not exist, stop and report the error.
Step 2: Fetch Timeline
Run the fetch script:
python3 .openclaw/skills/x-auto-engagement/scripts/fetch_timeline.py --env .envThe script outputs JSON to stdout:
{
"fetched": 50,
"passed": 25,
"skipped_count": 25,
"skipped_reasons": [{"tweet_id": "...", "reason": "..."}],
"tweets": [{"tweet_id": "...", "text": "...", "author_username": "...", ...}]
}If tweets is empty (all filtered out), write a skip report to output/ and stop.
Step 3: Select Relevant Tweets
Review the fetched tweets against your persona profile. For each tweet, decide whether it is worth engaging with.
Selection criteria:
- The tweet topic overlaps with your expertise or topics of interest
- The tweet invites discussion (not just a link dump or promotion)
- The tweet author is someone worth engaging with
- The tweet does NOT touch on your avoid_topics
Select at most 10 tweets. Prefer quality over quantity.
Step 4: Generate Comments
For each selected tweet, generate a reply comment. You are the LLM. Write the comment directly based on your persona profile.
Rules:
- Each comment must be a direct reply, written as if posting on X
- Keep comments under 280 characters
- Follow the tone, style, and guidelines from X-PROFILE.md
- Match the quality of the example comments in your profile
- Be genuine and add value. No generic responses
- Write in English only
- Do not use hashtags unless the original tweet uses them
- Do not @ mention the author
Step 5: Save Comments and Publish
Save the generated comments as a JSON file:
[
{"tweet_id": "123456", "generated_comment": "Your reply text here"},
{"tweet_id": "789012", "generated_comment": "Another reply here"}
]Save this to a temporary file (e.g., /tmp/xae-comments.json), then run:
python3 .openclaw/skills/x-auto-engagement/scripts/publish.py --comments /tmp/xae-comments.json --env .envThe script will like each tweet then reply, with random delays (30-120s) between posts.
Step 6: Save Report
Save the publish report output to:
output/engagement-{YYYY-MM-DDTHH-MM-SS}Z.jsonCreate the output/ directory if it does not exist.
Safety Rules
- NEVER publish more than 10 comments in a single run.
- NEVER skip the filtering step.
- If fetch returns 0 eligible tweets, exit gracefully with a skip report.
- If publish partially fails, still save the report. Do not retry failed items in the same run.
Cron Job Setup
Create a cron job for automated execution (3x daily):
{
"name": "X-Auto-Engagement",
"schedule": "0 9,14,21 * * *",
"sessionTarget": "isolated",
"payload": {
"kind": "agentTurn",
"message": "Use x-auto-engagement skill. Follow SKILL.md workflow steps 1-6 exactly. Read X-PROFILE.md, fetch timeline, select relevant tweets, generate comments, publish, and save the report to output/.",
"model": "ppio/pa/gemini-3-flash-preview",
"timeoutSeconds": 600
}
}Adjust schedule times as needed. The model uses gemini-3-flash from the openclaw provider config.
First-Time Setup
To set up a new X engagement agent:
- Create the agent (if not exists):
openclaw agents add <name> - Copy the .env template to the workspace:
cp .openclaw/skills/x-auto-engagement/reference/env-example.txt users/<name>/.env - Fill in the OAuth 1.0a credentials and X_USER_ID in
.env - Copy the profile template:
cp .openclaw/skills/x-auto-engagement/templates/X-PROFILE.md users/<name>/X-PROFILE.md - Edit
X-PROFILE.mdto match the desired persona - Install dependencies:
pip install -r .openclaw/skills/x-auto-engagement/scripts/requirements.txt - Test manually:
openclaw agent --agent <name> --message "Use x-auto-engagement skill. Run steps 1-6." - Create cron job when satisfied with results
References
- Standard operations:
reference/runbook.md - Failure diagnosis:
reference/troubleshooting.md - Environment template:
reference/env-example.txt - Profile template:
templates/X-PROFILE.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

