Agent skill

post-editing

Edit existing posts or undo a recently posted tweet on X/Twitter. Post editing and undo are X Premium features. Use when users want to edit a tweet they already posted or undo a tweet within the 30-second window.

Stars 197
Forks 39

Install this agent skill to your Project

npx add-skill https://github.com/nirholas/XActions/tree/main/skills/post-editing

Metadata

Additional technical details for this skill

author
nichxbt
version
1.0

SKILL.md

Post Editing & Undo

Browser console script for editing existing posts or undoing a recently posted tweet.

⚠️ X Premium required — Post editing and undo are Premium-only features.

Script Selection

Goal File Navigate to
Edit an existing post src/editPost.js x.com
Undo a post within 30 seconds of posting src/editPost.js x.com

Quick Start

Edit a post

  1. Go to x.com
  2. Open DevTools (F12) → Console
  3. Set mode: 'edit', postUrl, and newText in CONFIG
  4. Paste src/editPost.js → Enter

Undo a post (must run within 30 seconds of posting)

  1. Post your tweet
  2. Immediately open DevTools (F12) → Console
  3. Set mode: 'undo' in CONFIG
  4. Paste src/editPost.js → Enter

Configuration

js
const CONFIG = {
  mode: 'edit',         // 'edit' or 'undo'

  // Edit mode:
  postUrl: 'https://x.com/nichxbt/status/123456789',  // Post to edit
  newText: 'Updated tweet content here',               // New text

  // Timing:
  minDelay: 1000,
  maxDelay: 2000,
  navigationDelay: 3000,  // Wait for page/modal to load
};

Selectors Used

Element Selector
Post options (⋯) [data-testid="caret"]
Edit tweet option [data-testid="editTweet"]
Tweet textarea [data-testid="tweetTextarea_0"]
Submit button [data-testid="tweetButton"]
Undo banner [data-testid="undoTweet"]

Notes

  • Edit window: X allows unlimited edits on Premium (unlike Bluesky's 5-minute limit)
  • Undo window: The undo banner only appears for ~30 seconds after posting
  • Edit history is publicly visible — a small edit badge appears on edited posts
  • Script navigates to the post URL automatically when postUrl is set

Related Skills

  • content-posting — Post new tweets and threads
  • content-cleanup — Delete tweets entirely
  • premium-subscriptions — Manage X Premium features

Expand your agent's capabilities with these related and highly-rated skills.

nirholas/XActions

articles-longform

Compose, preview, publish, and manage long-form Articles on X/Twitter. Premium+ feature. Includes article creation, formatting, media insertion, and performance tracking. Use when users want to write, publish, manage, or analyze X Articles.

197 39
Explore
nirholas/XActions

x-pro-management

Navigate to X Pro (TweetDeck), set up monitoring columns, and manage multi-column view. Use when users want to use X Pro / TweetDeck features or set up a multi-column dashboard.

197 39
Explore
nirholas/XActions

business-ads

Manages X/Twitter business intelligence including brand monitoring, audience insights, competitor analysis, tweet A/B testing, auto-plug replies for promotion, and content performance optimization. Use when users want brand monitoring, audience analysis, competitor comparison, or promotion optimization on X.

197 39
Explore
nirholas/XActions

engagement-interaction

Automates X/Twitter engagement actions — like, unlike, reply, bookmark, hide replies, and auto-like by keyword. Also bulk-unlikes all posts. Use when users want to automate likes, send replies, manage bookmarks on tweets, hide replies, or clear their entire likes history.

197 39
Explore
nirholas/XActions

unfollow-management

Mass unfollow on X/Twitter via browser console scripts. Unfollows everyone, only non-followers, non-followers with username logging, smart time-based unfollow with whitelists, and follow/following ratio management. Use when cleaning up a following list, removing non-followers, bulk unfollowing accounts, or optimizing your follow ratio.

197 39
Explore
nirholas/XActions

follower-monitoring

Monitors X/Twitter follower changes using browser console scripts. Detects who unfollowed, tracks new followers with welcome messages, monitors any public account, runs continuous monitoring with alerts, tracks follower growth over time, and analyzes follower demographics. Use when tracking follower changes, detecting unfollowers, or monitoring Twitter accounts.

197 39
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results