Agent Skills: Follow & Unfollow on X

Use when the user wants to follow or unfollow accounts on X (Twitter), or check whether one account follows another. Single-target only; bulk follow operations require explicit per-account confirmation.

UncategorizedID: Xquik-dev/x-twitter-scraper/follow-unfollow

Install this agent skill to your local

pnpm dlx add-skill https://github.com/Xquik-dev/x-twitter-scraper/tree/HEAD/skills/follow-unfollow

Skill Files

Browse the full folder contents for follow-unfollow.

Download Skill

Loading file tree…

skills/follow-unfollow/SKILL.md

Skill Metadata

Name
follow-unfollow
Description
"Use when the user wants to follow or unfollow accounts on X (Twitter), or check whether one account follows another. Single-target only; bulk follow operations require explicit per-account confirmation."

Follow & Unfollow on X

Follow and unfollow accounts as a connected user, and check follow state.

Endpoints

| Endpoint | Purpose | Cost | |---|---|---| | POST /x/users/{id}/follow | Follow a user (numeric ID) | Write tier | | DELETE /x/users/{id}/follow | Unfollow a user (numeric ID) | Write tier | | GET /x/users/{username} | Resolve @handle to numeric user ID | Read tier | | GET /x/followers/check?source=<a>&target=<b> | Does A follow B? | Read tier |

Base URL: https://xquik.com/api/v1. Auth: x-api-key: xq_... header.

Quick reference

POST /x/users/{id}/follow
{ "account": "<connected_username>" }
-> { followed: true }

DELETE /x/users/{id}/follow
{ "account": "<connected_username>" }

The {id} path segment is the numeric user ID. Resolve a @handle with GET /x/users/{username} first.

Typical flow

  1. GET /x/accounts to pick the acting account.
  2. GET /x/users/{username} to resolve each target handle to a numeric id.
  3. Show the user the target handle and the acting account. Wait for approval.
  4. Call POST /x/users/{id}/follow to follow, or DELETE /x/users/{id}/follow to unfollow.

Bulk operations

If the user asks to follow or unfollow many accounts at once, list every target first, require explicit confirmation for the full list, then iterate with a short delay (1-2s) between calls to avoid rate limits. Never silently batch.

Hard no:

  • Mass-following random accounts based on a scrape
  • "Follow everyone who liked my tweet" workflows without user review of the full list
  • Unfollowing loops that run in the background

Errors

| Status | Code | Meaning | |---|---|---| | 403 | target_blocked_you | Cannot follow a user who blocked this account | | 422 | login_failed | Reconnect in dashboard | | 429 | x_api_rate_limited | Backoff |

Related

Follower extraction: extract-followers. Full API: x-twitter-scraper.