agentleFS
ihuzaifashoukatihuzaifashoukat/x-use/SKILL.md

x-use

Skill186 starsChanged 49 days agoMITView on GitHub

Install, register, and configure x-use, the browser-native MCP server for X (Twitter) automation that needs no X API key. Covers pip install, MCP client registration for Claude Desktop, Claude Code, Codex, Cursor and Windsurf, cookie-based account setup, keywords, and persona. Use when the user wants to set up x-use, add an X account, connect X or Twitter automation to their agent, or when x-use tools are unavailable or unconfigured.

  • Reads credentials
  • Installs packages

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. dalroot/x-use★ 4same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repositoryOne other file it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 3 are distinctive, and 12 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 12

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read this first: the steps split at the client restart.

    line 12
  2. Very specific:

    If Python is missing, explain the prerequisite.

    line 27
  3. Distinctive:

    Do not treat that as a broken install.

    line 54
  4. Very specific:

    If x-use is not found after installing, it is a PATH problem, not a failed install.

    line 57
  5. Very specific:

    Use x-use-inbox for reading incoming activity and sending contextual DMs.

    line 70
  6. Very specific:

    Use the full executable path and absolute data directory printed by the installer.

    line 77
  7. Very specific:

    If this client cannot reload MCP servers in the current session, tell the user to restart the client and pause tool-dependent setup until …

    line 113
  8. Very specific:

    When connected, confirm with list_accounts.

    line 115
  9. Very specific:

    Ask for a short account id, something like main or brand.

    line 122
  10. Very specific:

    Only auth_token and ct0 are required.

    line 132
  11. Very specific:

    Verify with get_account_health(account="main").

    line 142
  12. Distinctive:

    Ask what niche they are in, which keywords to watch, which profiles they want to engage with, and their actual X handle.

    line 149
  13. Very specific:

    Ask how they want to sound.

    line 168
  14. Very specific:

    Run x-use doctor, read the actual error, fix that cause, and only then continue.

    line 214
  15. Distinctive:

    Do not automatically retry a timeout or unknown outcome.

    line 221

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Set up x-use

x-use is an MCP server that automates X (Twitter) through a real logged-in Chrome session instead of the paid X API. This skill takes a machine from nothing to a configured, working account.

Read this first: the steps split at the client restart. Everything before it is shell work, because x-use's MCP tools do not exist yet. Everything after it is tool work. Do not try to call add_account before step 4 has completed.

Explain each step briefly as you go. The setup request authorizes routine local installation and registration; ask only for missing choices or credentials.

1. Check the prerequisites

Python 3.11 or newer with venv support. Check Python:

python --version

If Python is missing, explain the prerequisite. Setup installs the Chromium browser matching the default Patchright driver. Installed Chrome or Edge is also supported through mcp.browser_channel.

2. Install

pip install x-use-mcp
python -m patchright install chromium

This provides the x-use command and matching Chromium. Inside a checkout, prefer the one-command uv setup: py -3 scripts/setup_uv.py on Windows or python3 scripts/setup_uv.py on macOS/Linux. It installs missing uv locally, uses the dependency lock and creates .venv; use that environment's full x-use executable path for registration. Linux system libraries are explicit with --with-system-deps, which can require OS permission.

Then verify:

x-use doctor

doctor prints one PASS, FAIL, or SKIP line per check: config files, browser binary, driver, per-account cookies, LLM key, proxies. On a fresh machine the cookie and config checks are expected to fail, since nothing is configured yet. Do not treat that as a broken install. A FAIL on the browser or driver line is the one that actually blocks progress.

If x-use is not found after installing, it is a PATH problem, not a failed install. pip show -f x-use-mcp locates the console script; use its full path everywhere below, for example .venv/bin/x-use or .venv\Scripts\x-use.exe.

3. Install the workflow skills

x-use skills install

This writes seven skills to ~/.claude/skills/ and ~/.agents/skills/, so Claude Code and Codex-style agents both pick them up. They cover engagement, content, daily review, inbox/messages/notifications, account setup, and X thread workflows. Use x-use-inbox for reading incoming activity and sending contextual DMs. --force overwrites existing copies, and x-use skills list shows what landed.

4. Register the MCP server, then restart the client

Work out which client you are running inside and register x-use in that one. Use the full executable path and absolute data directory printed by the installer. Set X_USE_HOME in the server environment so settings, accounts and state stay stable when the client starts from another working directory.

  • Claude Code:

    claude mcp add --scope user x-use --env X_USE_HOME=/absolute/path/to/x-use-data -- /absolute/path/to/x-use/.venv/bin/x-use mcp
  • Claude Desktop (claude_desktop_config.json), Cursor, Windsurf, and any other client taking JSON:

    {
      "mcpServers": {
        "x-use": {
          "command": "/absolute/path/to/x-use/.venv/bin/x-use",
          "args": ["mcp"],
          "env": {"X_USE_HOME": "/absolute/path/to/x-use-data"}
        }
      }
    }
  • Codex (~/.codex/config.toml):

    [mcp_servers.x-use]
    command = "/absolute/path/to/x-use/.venv/bin/x-use"
    args = ["mcp"]
    
    [mcp_servers.x-use.env]
    X_USE_HOME = "/absolute/path/to/x-use-data"

If this client cannot reload MCP servers in the current session, tell the user to restart the client and pause tool-dependent setup until the tools appear. When connected, confirm with list_accounts. An empty list is the correct answer before the first account is added.

5. Add the account

Everything from here is MCP tool calls.

Ask for a short account id, something like main or brand. It is an internal label, not the X handle.

Then walk the user through the cookie export, which is how x-use authenticates:

  1. Install a cookie-export browser extension, for example Cookie-Editor.
  2. Log into x.com in that browser.
  3. Open the extension while on x.com and export as JSON.
  4. Save the file on this machine and give you the path.

Only auth_token and ct0 are required; unusable optional cookies are skipped, x-use doctor lists them by name and reason, and the add_account/update_account result lists them in skipped_cookies.

add_account(account_id="main", cookie_file="/path/to/cookies.json")

The file is validated and copied server-side. Never ask the user to paste cookie contents into the conversation. The path-only design exists precisely so the values never cross the wire, and pasting them defeats it.

Verify with get_account_health(account="main"). This checks the local cookie file and configuration without logging into X; valid cookie structure does not prove a live authenticated session. Inspect reported problems, then use a bounded browser read to verify the session. Stop for a login or account challenge.

6. Configure the account

Ask what niche they are in, which keywords to watch, which profiles they want to engage with, and their actual X handle.

update_account(
  account="main",
  target_keywords=["..."],
  competitor_profiles=["https://x.com/..."],
  self_handles=["theirhandle"],
)

self_handles matters more than it looks. Without it the own-post guard cannot fire, and x-use cannot identify the account's historical posts from this configuration. For a published thread, use get_thread_run to retrieve the confirmed post URLs.

7. Set the persona

Ask how they want to sound. The repo ships three starting points under presets/personas/ (builder, founder, curator), so offer them or write one together. Cover voice, topics, reply style, what to avoid, and one or two example replies. Under 4000 characters, markdown.

update_account(account="main", persona="...")

Batch the config edits where you can. Every update_account closes the warm browser session, so the next action pays a cold start.

8. Optional, only if it applies

  • More accounts: repeat from step 5. If they want separate network routes, add_proxy(pool, proxy_url) then update_account(account, proxy="pool:<name>").
  • An LLM key: interactive use needs none. You are the writer, and the server drives the browser. A key is only needed for unattended background automation and "auto" text, set under llm in the data home's config/settings.json.

9. Prove it works

With the default mcp.draft_mode=true, stage one requested reply or post and show its full payload with get_draft or list_drafts. If draft mode has been disabled, ordinary post/reply tools execute immediately and cannot serve as a draft-only smoke check. prepare_thread, messages, and follows always stage, but do not create unrelated work solely to test the installation.

Explain the execution boundary: ordinary writes draft by default, and approve_draft(draft_id) executes a reviewed draft. Messages, follows and threads always require that approval. Queued work executes through process_queue or an explicitly enabled auto-drain worker; the legacy run_cycle executes immediately. Honor prior authorization for an exact action and payload; setup alone does not authorize publication or outreach.

For requested inbox verification, get_inbox(account="main", folder="inbox", inbox_filter="unread", limit=5) reads only the visible folder. Requests and other folders are separate; reads do not accept requests. Unknown read state stays unknown. Opening a conversation or visiting get_notifications may mark items read. An encrypted inbox uses unlock_inbox(account="main", pin_env_var="XUSE_INBOX_PIN") after the owner sets the PIN in the server environment; never request the PIN in chat.

When something fails

Run x-use doctor, read the actual error, fix that cause, and only then continue. Tools carry {"ok": true, ...} or {"ok": false, "error": {"type", "message"}}; media reads can also attach images. Inspect returned state even on success envelopes: partial context, unavailable analytics or a blocked thread is not completed work. For an uncertain write, read get_account_safety, inspect X and its action ID, and use resolve_action_outcome only with observed succeeded or not_sent evidence. Do not automatically retry a timeout or unknown outcome.

After setup

The installed skills take over: x-use-engage for research and replies, x-use-content for original posts, x-use-review for the daily digest, and x-use for tool routing and conventions.

Clients without skill support get the same workflows as MCP prompts (research_niche, draft_replies, review_and_publish, daily_check, setup_account, outreach_message, thread_workflow), plus read-only resources (xuse://accounts, xuse://accounts/{account_id}, xuse://accounts/{account_id}/persona, xuse://drafts/pending) for context worth attaching rather than fetching.

Full tool reference: docs/MCP_GUIDE.md.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.