Add X (Twitter) Articles domain skill#460
Open
changtimwu wants to merge 1 commit into
Open
Conversation
Document publishing X Articles via the Draft.js editor, complementing the existing x/posting.md (auth + tweets): - URLs, longform-* block-type mapping, title textarea vs body composer - the synthetic-paste mechanic for injecting HTML (Draft converts to blocks) - markdown conversion rules (tables -> bullets, code -> blockquote) - the publish dialog flow and dismissing the paid Boost promo - field-tested traps: no API, Cmd+A clear, retina DPR, locate-by-rect Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4842424 to
04d1318
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
domain-skills/x/articles.mddocumenting how to publish long-form X Articles by driving the editor through the harness.Why
There is no public API for X Articles (the v2 API only posts a plain long-form post, not the formatted Article object), so the editor has to be browser-driven. The mechanics are non-obvious and cost several exploration steps to work out.
What it captures
/compose/articles(list),/compose/articles/edit/<id>(editor),/previewsuffix, and the/<handle>/status/<id>the post redirects to after publishing.[data-testid="composer"]); thelongform-*block-type class table; title is a separatetextarea.pasteClipboardEventcarryingtext/html— Draft.js converts HTML → block types far more reliably than per-line toolbar clicking. Includes the verified HTML→Draft mapping.[role="dialog"]— two Publish buttons on screen) and dismissing the paid "Boost" promo.getBoundingClientRect, not screenshots.No run narration, pixel coordinates, or secrets — just the durable site map.
🤖 Generated with Claude Code
Summary by cubic
Adds
domain-skills/x/articles.mdthat documents how to publish long-form X (Twitter) Articles by driving the Draft.js editor in the browser. It covers access, reliable HTML injection, markdown conversion limits, the publish flow, and UI pitfalls./compose/articles,/compose/articles/edit/<id>,/compose/articles/edit/<id>/preview, and final/<handle>/status/<id>; notes regular Premium access and login redirects.longform-*block classes, separate titletextarea, and toolbar limits (no tables/code blocks).text/htmlvia synthetic paste, and the verified HTML→Draft mapping; markdown rules (inline code → bold, code blocks → blockquote, tables → bullets; H1 goes to title).[role="dialog"], Boost promo dismissal, reliable button targeting via visible text +getBoundingClientRect(DPR-safe), delete-to-reset drafts, and cleaning throwaway drafts.Written for commit 04d1318. Summary will update on new commits.