Add Medium publishing domain skill#462
Open
changtimwu wants to merge 1 commit into
Open
Conversation
Document publishing a Medium story via the classic graf editor, complementing the read-oriented scraping.md / article-hydration.md: - URLs (new-story -> /p/<id>/edit -> /submission -> canonical) - graf block structure and HTML -> graf paste mapping - the synthetic-paste mechanic; title handling (first <h1> -> graf--title) - multi-line code = one <pre> per line (newlines collapse) - tag commit via JS focus + char-less trusted Enter - traps: no API, new-draft throttling, execCommand-clear corrupts save, beforeunload freeze, Cmd+A not registering, retina DPR Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
agent-workspace/domain-skills/medium/publishing.md— the write path for Medium, complementing the existing read-orientedscraping.md(APIs) andarticle-hydration.md(DOM extraction).Why
There is no public API for publishing to Medium (the legacy API stopped issuing integration tokens), so a story has to be composed by driving the editor. The mechanics are non-obvious and cost a lot of exploration to work out.
What it captures
/new-story→/p/<id>/edit→/p/<id>/submission→/@handle/<slug>-<id>, plus the drafts list + delete path..js-postFieldcontenteditable and the.graf--*block-type table (graf--title,graf--h3/h4,graf--p,graf--li,graf--pre,graf--blockquote).pasteClipboardEventcarryingtext/html— Medium converts HTML → graf blocks. Includes the verified HTML→graf mapping (incl. inline<code>surviving as monospace).<h1>of a fresh-editor paste becomesgraf--title; or JS-place the caret in the title block and type (clicking the empty title block won't focus it).<pre>collapse (also<br>and<pre><code>), so emit one<pre>per line..focus()+ a char-less trusted Enter —press_key("Enter")doesn't commit and comma is rejected.execCommand('delete')clearing corrupts the save model;beforeunloadfreezes navigation;Cmd+Awon't register via CDP; retina DPR.No run narration, pixel coordinates, or secrets — just the durable site map.
🤖 Generated with Claude Code
Summary by cubic
Adds a Medium publishing domain skill that documents how to compose and publish stories by driving the classic editor (no public publish API). Complements the read skills and shares the reliable write flow and pitfalls.
agent-workspace/domain-skills/medium/publishing.md./new-story→/p/<id>/edit→/p/<id>/submission→ canonical URL.<pre>per line) and committing tags with a focused Enter.execCommand('delete')save issues,beforeunloaddialogs,Cmd+Avia CDP, and DPR tips.Written for commit ad39448. Summary will update on new commits.