X/Twitter Browser Ops
Use this skill for all X/Twitter browser operations: browsing and analysis, follower/following collection, bookmark-folder management, content/profile management, and browser-driven troubleshooting.
When to Use
- User asks for X/Twitter follower, following, mutual follower, or verified follower analysis.
- User asks to rank X/Twitter accounts by followers, export CSV/Markdown/HTML, or build a dashboard from collected X data.
- User asks to organize bookmarks, create/rename/delete bookmark folders, or move bookmarks between folders.
- User asks to operate X/Twitter in the browser.
Do Not Use
- Do not use to evade X rate limits, bans, access controls, paywalls, or privacy settings.
- Do not save or expose login cookies, auth headers, HAR files, tokens, or browser profile data.
Safety and Session Rules
- Inspect available browser tool documentation before choosing a route. Verify the intended logged-in account for session-dependent lists; do not assume CDP, script evaluation, response observers, native input, or folder features exist.
- Treat the browser session as sensitive. Never persist cookies, CSRF tokens, Authorization headers, or HAR captures.
- Prefer read-only page navigation and response observation over replaying internal API calls.
- If screenshots or HTML outputs include notification badges, DMs, private handles, or unrelated personal data, mask or omit them.
- Every mutation (including bookmark changes, posts, replies, DMs, engagement, follow/unfollow, block/mute, list edits, and profile changes) requires explicit approval binding account, target, operation, exact body/field value, attachments, and visibility, including explicit absence where applicable. Reuse existing explicit approval only when ALL these dimensions are exactly unchanged; any change requires renewed approval before execution. Drafting, research, or inspection never authorizes sending or mutation.
- Bookmark folder creation, renaming, deletion, and assignment are permitted after the user explicitly approves the organization plan.
- Before any write or relationship-changing action, verify the acting account identity from the account switcher or profile UI and confirm it matches the intended account for this task.
- Reacquire the exact target and current controls before each mutation. Confirm persisted UI state independently afterward; a click, toast, or vanished element is insufficient. If a write result is uncertain, stop writes and inspect before retrying; never blindly repeat a send or toggle.
- Keep all collection and mutations within finite task-specific bounds. Stop on rate limits, repeated access failures, login redirects, or challenges; report partial results without bypassing refusals or replaying internal APIs with extracted credentials.
- Use task-owned tabs with stable identifiers when supported; preserve the user's foreground, unrelated tabs, and unsaved work. Close only task-owned tabs. If tool capabilities cannot safely bind a target or verify a write, stop that action as unverified rather than inventing a selector or API.
Post Draft Validation
- Before treating a draft as ready to post or entering it in the browser, measure it with a
twitter-textv3-compatible parser using the official configuration: https://raw.githubusercontent.com/twitter/twitter-text/master/config/v3.json - Require
valid === trueandweightedLength <= maxWeightedTweetLengthfrom that configuration for a standard post. For another composer/account format, verify actual constraints instead of treating 280 as universal. - Let the parser apply URL transformation and emoji parsing. An HTTP(S) URL uses
transformedURLLength(currently 23), while ZWJ emoji and variation selectors must not be counted by visible glyphs orString.length. - If a compatible parser or configuration is unavailable, report the draft as length-unverified rather than claiming it is ready to post.
- Do not install dependencies globally merely to validate a draft.
Bookmark Management
- Inspect existing folders plus representative unfoldered and folder-specific posts before proposing a minimal taxonomy.
- Show the proposed folder names, merges, renames, and classification priority before mutating bookmarks.
- Confirm each assignment from the UI before removing a post from its prior folder.
- In virtualized infinite-scroll feeds, operate in bounded batches using a post's canonical
/status/URL; re-resolve the post immediately before each mutation and never retain an element ref across scrolls or mutations. - Process one visible post at a time and re-scan canonical URLs after each folder-picker mutation; do not pre-capture a whole visible candidate batch because X can recycle the sibling articles immediately.
- On a shared logged-in browser, use a dedicated work tab and bind its stable identifier, not a positional tab index. Before every write batch, verify account, bookmark view, folder/search query, and exact post. Treat
/i/bookmarksas a live-verifiable hint, not a guaranteed route; do not assume CDP. - Folder membership hydrates after the picker shell. Wait for checkmark/icon state before deciding assigned vs unassigned; an immediately missing checkmark is unknown, not safe to click.
- X can render duplicate dialog shells. Use the current visible dialog; when geometry is exposed require positive width/height. Prefer its actual close control; use history back only after verifying the picker route (hint:
/i/bookmarks/add) and its effect. Never issue an extra back after closure. - Treat missing folder-picker options, modals, or navigations as unverified—not as success. Keep the source assignment until the destination is visibly confirmed.
- Never unsave a post to remove a folder assignment; check impact before deleting/merging folders. Log post ID, source, destination, and confirmed/unknown outcome. Deduplicate counts by post ID and report skipped/unverified memberships plus the last processed URL. Stagnant scrolling alone does not prove completion; require an end indicator or exposed cursor evidence.
X Page Semantics
Use URL path, not translated UI tab labels, to avoid tab mix-ups:
/followers= all followers./following= accounts the target follows./followers_you_follow= followers known to the logged-in user; for the target user's own account this is the useful mutual-follower view./verified_followers= verified followers only; this is not the same as all mutual followers.
For the logged-in user's own account, /followers_you_follow is a useful mutual view. For another target it does NOT prove that target follows those users: intersect that target's follower/following IDs or use relationship fields only after verifying their subject.
X changes DOM structure and GraphQL response shapes without notice. Re-verify these paths and field names against the live page instead of relying on remembered selectors.
Collection Workflow
- Open the profile and confirm the target handle and visible counts.
- Navigate to the correct path explicitly.
- Observe list responses only if actual tools expose read-only observation; otherwise use DOM/screen evidence and report missing fields. Verify live response schema and relationship subject before parsing.
- Scroll slowly in small batches. Suggested baseline: 4-5 scrolls per batch, 4-9 seconds between scrolls, and pause 30-60 seconds after large batches.
- If HTTP 429, repeated 403, forced redirects, login prompts, or unusual challenge pages appear, stop collection and report partial results instead of pushing harder.
- If stopping early, record a resume checkpoint: last collected
rest_id, canonical URL of the last processed post, and total collected count. - Deduplicate by stable user ID where exposed, otherwise canonical profile URL (handles can change). Keep available name/handle, follower count, URL, and relationship flags; absent fields stay unknown. A checkpoint does not guarantee resuming at the same row.
Verified / Non-Verified Split
- Collect mutual follower IDs from the mutual source.
- Collect verified follower IDs from
/verified_followers; filter those where the logged-in account also follows them when relationship flags are available. - Verified mutual = mutual IDs present in verified mutual collection.
- Non-verified mutual = mutual IDs minus verified mutual IDs ONLY when source coverage proves that comparison; absence from an incomplete verified list means unknown status. Report a separate unknown group.
- Do not assume a visible blue badge in the DOM is enough; prefer response fields such as
is_blue_verifiedor verified list membership.
Ranking and Output
- Sort descending by
legacy.followers_count/followers_count. - Rank only known counts; display missing counts explicitly, never as zero.
- Output rank, display name, handle, follower count, and profile URL.
- For Top 100, verify there are at least 100 rows; if fewer, say how many were collected.
- For HTML dashboards, keep styling minimal; polished visual artifact design is out of scope.
- Return analysis in chat unless files are requested or needed by the task; record source views, bounds, missing fields, and coverage alongside any exported rows.
- For PowerShell-generated HTML, embed JSON safely: use
ConvertTo-Json -Compress, place it in<script type="application/json">, and escape JSON<,>, and&as\u003c,\u003e, and\u0026. Do not HTML-encode JSON as"beforeJSON.parse.
Verification Checklist
Before final delivery, check:
- Acting account verified before mutation.
- Target handle and source paths used.
- Collected counts for all mutual, verified mutual, and non-verified mutual.
- Duplicate user IDs removed.
- Partial-stop output includes the resume checkpoint.
- Top rows are sorted by follower count descending.
- CSV/Markdown/HTML files open and contain the expected row counts.
- For HTML:
JSON.parsesucceeds, stats are not-, card/table DOM rows render, and browser console/page errors are zero. - Edge cases: zero results, fewer than 100 results, and missing follower counts are handled visibly rather than silently.