post-editing

A browser script for changing an existing X post or undoing a post shortly after publishing it. Both actions require an X Premium subscription.

In plain words
What is it for?
Use edit mode to replace the text of an existing post, or undo mode within 30 seconds of publishing.
Why use it?
It provides a way to correct a post after publishing or quickly take back a post when you notice a mistake.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/nirholas/xactions/post-editing
Any agent
npx skills add nirholas/XActions --skill post-editing
Clone the repo
git clone --depth 1 https://github.com/nirholas/XActions

Made for: Claude Code, Codex.

Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 614 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00049 $0.00614
Opus 5 $0.00024 $0.00307
Sonnet 5 $0.00010 $0.00123
Haiku 4.5 $0.00005 $0.00061

Measured 2d ago against content hash 524b755ace22, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

post-editing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/post-editing/SKILL.md · 78 lines

What it actually says

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

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
  • content-posting — Post new tweets and threads
  • content-cleanup — Delete tweets entirely
  • premium-subscriptions — Manage X Premium features
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 78 lines · 49 tokens per session scan A 524b755ace22

Subscribe to this mod's changes

post-editing is a skill published in the GitHub repository nirholas/XActions (496 stars, last pushed 5d ago), licensed Apache-2.0. It adds 49 tokens to every session and 614 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

peekaboo

Capture and automate macOS UI with the Peekaboo CLI.

the-open-agent/openagent · 17 tokens

browser-test

Validate a feature works by driving a real browser with Playwright MCP. No test files — just interactive verification.

langwatch/langwatch · 25 tokens

drive-the-ui

Drive the page the user has open through live UI actions. List the actions a page accepts, call them with typed payloads, and read the live state including unsaved edits. Use when the user is looking at a page you can operate, such as the evaluations workbench, and a change should happen in front of them rather than…

langwatch/langwatch · 75 tokens

browser-pair

Collaborative headed browser session for UI work. Launch Playwright Chromium visible to the user, handle auth, then interactively drive the browser while the user watches and gives real-time visual feedback. Edit code and refresh to verify fixes live. Use when the user says 'browser pair', 'paired browser', 'let's…

langwatch/langwatch · 87 tokens

debug-frontend-with-browser

Frontend diagnosis extension for the acceptance skill. Use for intermittent rendering, ordering, stale-state, navigation, virtual-list, React/Zustand, optimistic-update, refresh-dependent, or browser-only failures where the first broken boundary may be DOM, component input, derived state, client cache, network data…

lobehub/lobehub · 118 tokens

design-prototype

Produce an interactive single-file HTML design prototype using the REAL LobeHub design system (@lobehub/ui + antd + antd-style tokens) with production-style React — no build step, opens directly in a browser. Use when asked for a design prototype / interactive mockup / 交互原型 / 出个原型 / 设计稿 HTML for a page or flow, or to…

lobehub/lobehub · 92 tokens