/publishing:publishingfrom publishing
Guides publishing technical articles to AWS Builder Center, dev.to, Medium, Substack, and LinkedIn, handling format incompatibilities, cover images, and pre-flight validation.
Ships in publishing. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
This skill works in Antigravity (agy), Codex, and Claude Code. Locate bundled resources relative to
this SKILL.md and invoke scripts by absolute path; do not assume scripts/ is
inside the user's current working directory. Keep article arguments relative to
the user's working directory. Browser-only workflows require browser automation
that can evaluate JavaScript in the page, inspect the DOM,
upload a local file, click/type, and read the result back. Tool names vary by
host; descriptions such as javascript_tool, file_upload, find, computer type, and browser_batch below name capabilities, not required tool names.
If those capabilities are unavailable, generate and validate the artifacts, then
hand the user the file and the specific remaining manual browser steps. Never
claim that a browser draft or post was created when it was not.
Five destinations, five different artifacts, not five copies of one. They disagree about tables, about code blocks and about cover images. LinkedIn renders no markup at all. Every disagreement fails silently: you get a plausible-looking file that the destination quietly mangles.
Run scripts/preflight.py <article>.md --live before publishing anything. It runs
every check and exits non-zero. Without --live nothing fetches a published URL,
and local state has been wrong before.
Every check here exists because something shipped broken. These three are the shapes those failures keep taking, and each one was hit more than once. Check for them before adding a fourth check.
1. One observation generalised into a rule. Builder Center preserves newlines inside a paragraph — measured, true, and written up as a Builder Center quirk. The unstated half was that dev.to therefore folds them, which nobody measured, and 47 of 62 paragraphs in a published article had been rendering ragged for months. The cover was "1376x768, the house size" without anyone asking what dev.to displays; it displays a 2.381:1 crop and had been cutting the eyebrow and footer off every article. A property of one destination is evidence about that destination only.
2. Identity mistaken for freshness. Three times, in three places. A cover was
tracked by git, so the check passed, while the published URL served an older
image because it had been regenerated after its commit. Every host installs this
skill as a snapshot, and the updater measured here compared version strings
rather than content, so it answered "already at the latest version" for a
worktree six commits newer; assume a host's updater has the same gap until its
own behaviour is measured. skill-footprint.py shipped that same bug on its
first day, which is why it labels a projection with the version it actually
measured and only reports the installed snapshot when asked. "Is it the right
thing" and "is it the current thing" are different questions, and the second one
is the one that breaks silently.
3. A measurement with no control. A first read of a published article counted
23 "bare" fences and looked like proof that dev.to does not relabel them — they
were closing fences, and parsed as pairs the article proved the opposite. The
checksum recommended below cried corruption on a payload that had transferred
perfectly, because one side counted UTF-16 units and the other counted code
points. Before believing a negative result, prove the test can produce a
positive one. The Medium wrap test pasted a control paragraph with real <br>
in it for exactly this reason, and that control is why its zero means something.
A corollary that follows from all three: simulate the destination, do not assert
about it. check-article.py no longer compares the cover against a remembered
geometry, it computes the band dev.to would crop and looks for ink in it.
check-links.py does not reason about whether a file was pushed, it fetches the
URL and compares the bytes.
This is the split that decides the whole workflow. One destination has a real API. Three have none and need a browser driven for them. One has an API that cannot draft.
| Destination | How the article gets there | Draft state |
|---|---|---|
| dev.to | REST API, and it is complete — create, update in place, list, and set organization_id. No browser, ever. | published: false |
| Medium | Browser automation. Paste -hosted.html into the editor. No publishing API exists. | editor draft |
| Substack | Browser automation. Paste Medium's -hosted.html through ss.prepare(), which adapts it in the page. Read back from the stored draft. | editor draft |
| AWS Builder Center | Browser automation. One JS-bridge paste into the contenteditable — chunking is not needed. A WAF drops saves whose body matches an attack signature; see references/browser-publishing.md. No publishing API exists. | autosaved draft |
| LinkedIn (post) | API exists, but PUBLISHED is the only state accepted on creation, so posting through it is publishing. | composer only |
| LinkedIn (article) | Browser automation. Paste Medium's -hosted.html, adapted by lia.stash() on 127.0.0.1 before the tab reaches LinkedIn. Read back after a reload. | saved draft |
So the browser work is not laziness about reading API docs — for Medium, Substack
and Builder Center there is no API to read. Everything in
references/browser-publishing.md exists because those three destinations can only
be reached by driving their editors, and driving an editor is where the clipboard
races, the duplicate pastes and the silent data: stripping all live.
The corollary is the rule worth remembering: before reaching for the browser on any destination, check whether that destination has an API. dev.to's was sitting unused in eight directories while a browser flow was built around it.
Every browser session has been rediscovering the same quirks. On 2026-09-15 one article hit, in order: typing dropped in a hidden tab, ref clicks swallowed, upload inputs inside shadow roots, a CSP that blocks fetching the image, a publish gate that reports its failures in batches, and a tab group that dissolves when a tab closes — most already half-known, none written where the next session would look first. So, before touching a destination's editor:
| Destination | Paste first | Read first |
|---|---|---|
| AWS Builder Center — editor | scripts/browser/builder-editor.js (window.bc) | references/browser-publishing.md → "Editing a Builder Center draft in place" |
| AWS Builder Center — publish gate | scripts/browser/builder-gate.js (window.gate) | SKILL.md → "Links" and references/browser-publishing.md → "Publishing runs a gate" |
| LinkedIn composer | scripts/browser/linkedin-composer.js (window.li) | references/linkedin.md → "Attaching the cover and posting" |
| LinkedIn article editor | scripts/browser/linkedin-article.js (window.lia), on 127.0.0.1 first and again in the editor | references/linkedin-article.md |
| Medium | — | references/browser-publishing.md → "Medium" and references/medium.md |
| Substack | scripts/browser/substack-editor.js (window.ss) | references/substack.md |
| Kaggle benchmark page | scripts/browser/kaggle-benchmark.js (window.kg) | references/kaggle.md |
On Medium, do not open the publish dialog on a draft. Its topic field is
inside that dialog, so "set the topics" and "publish the story" are one journey,
and the dialog's default action is the irreversible one. MEASURED 2026-09-21: a
draft published because the topic field refused focus and the typed topic
reached the page with Publish still focused. Topics after publishing, or leave
them to Medium — references/browser-publishing.md → "Opening Medium's publish
dialog to set topics can publish the story".
Quirks that apply to every editor, all measured:
document.visibilityState. When it is
hidden, computer type can report success and insert nothing, ref clicks can
do nothing, and screenshots time out. Act through JS (select + synthetic paste,
or execCommand("insertText") on LinkedIn) and read the result back.shadowRoot recursively in JS. For a
file input inside one, add a light-DOM proxy input, file_upload to that, and
copy its files across with a DataTransfer.javascript_tool script is real; an assertion inside a
browser_batch is not. Every helper above refuses in-script.When a quirk costs a retry, it is not done until it is written down: add it to
the reference section in the table with MEASURED <date>, and fold the working
route into that destination's helper script, so the next session pastes the fix
instead of finding it again.
python3 scripts/check-article.py <article>.md --repo-root <repo>
It enforces, in order of how silently each fails:
cover_image: and the file is actually there.published: false.title / description / tags present.-hosted.html matches a fresh build of the article. MEASURED
2026-10-05: the kit's own walk-through went to Substack from a hosted HTML
older than its markdown, with every check passing. The check rebuilds into a
temporary directory and compares text and image names; it fails on the stale
file that shipped and passes on all three articles in articles/.
Correction. That rebuild compared text and image names and took its cover
from the hosted file, and the result was two holes, MEASURED 2026-10-31: a
changed table cell left both unchanged, because table text lives only in a
PNG with a positional name, and a wrong cover matched itself. It now compares
image bytes and rebuilds with the front matter's cover. A Pillow or font
upgrade fails this loudly; re-running make-medium.py clears it.
Every <img> in the file must also be absolute: a relative one fails.AWS Builder Center refuses to publish with two messages and no detail:
Broken Links — A URL link you have shared is broken. Please correct to publish. Malicious Links — A URL link you have shared violates our AWS Builder Terms. Please remove to publish.
Each renders twice; that is the UI repeating itself, not two separate hits.
Do not guess which link it means. The gate names them, and the UI hides it.
MEASURED 2026-09-15: Publish calls POST https://api.builder.aws.com/cs/v2/content/submit-review,
then .../review-status, and both responses carry
contentIssues.{brokenLinks,maliciousLinks,profanityDetection}.violatedFragments —
arrays of the exact offending URLs. To read them, paste
scripts/browser/builder-gate.js into the draft's preview page, click Publish
on a draft you know fails, then await gate.wait(); gate.verdict(). A failing
draft is not published, so the capture costs nothing — but a passing gate
publishes on its own, so never run it on a draft that might pass.
To then fix the draft in place, paste scripts/browser/builder-editor.js into
the editor page: bc.replaceBlock(...) swaps a link, bc.replaceText(...) a
phrase, bc.replaceInCodeBlock(...) text inside a code block, and bc.audit()
re-counts images, code blocks, tables, links and tags. Each helper refuses rather
than acts when its precondition fails. Why each one exists is in
references/browser-publishing.md.
What that capture showed, on a draft that still failed:
| Link | Gate verdict |
|---|---|
ai.google.dev/gemini-api/docs/interactions-breaking-changes-may-2026 (markdown link) | brokenLinks and maliciousLinks |
ai.google.dev/gemini-api/docs/interactions-overview (markdown link) | brokenLinks and maliciousLinks |
two dev.to links (403 to a client with no User-Agent) | passed |
github.com, docs.cloud.google.com, py.sdk.modelcontextprotocol.io | passed |
ai.google.dev/gemini-api/docs/api-key as plain text, not linked | passed that run — flagged broken and malicious on the next |
The gate does check plain text, and it does not report everything at once.
MEASURED 2026-09-15, second capture on the same draft after the two links above
were replaced: brokenLinks was ["/", "https://ai.google.dev/gemini-api/docs/api-key"]
and maliciousLinks the same api-key URL. That URL had been plain text in both
runs. The "/" matched a lone slash left outside inline code
(`.kiro/skills/<name>`/). So a clean capture proves only that the reported
fragments are bad, not that nothing else is: fix, re-capture, repeat until
reviewStatus passes — and keep every ai.google.dev URL out of the body,
linked or not. Both flagged links load fine in a browser. The likely mechanism, inferred and not
confirmed: a client with no cookies is bounced through
ai.google.dev/oauth2callback and never gets a 200.
Correction. This section previously listed three "measured causes": a URL in
pasted code ending ',, an aistudio.google.com/apikey link that redirects to
Google sign-in, and SKILL.md being a live domain. They were removed before
the gate's response was captured, so whether it counted any of them is unknown.
Only the two ai.google.dev links are confirmed.
check-links.py (run by preflight.py --live) now checks the gate's profile:
oauth2callback hop…',) is dead; filenames in the
prose that resolve as domainsThe same rule applies to links.txt, which it did not until 2026-09-16. That
loop failed anything but a 200, so a published Medium URL was a warning as an
anchor in the body and a build failure as a links.txt entry — and Medium answered
403 on one run and 200 on the next for the same story. One source for the verdict
now, in both paths.
Fix a flagged ai.google.dev link by unlinking it (plain text passed) or by
linking an equivalent page that does not bounce. Re-run the capture to confirm —
it is the only answer that is not a guess.
An article is a set of assertions, and the ones that embarrass you are numbers carried in from memory. Never restate a figure from prose — not from another article, not from a code comment, not from a chat log. Prose is not evidence. Figures that live only in prose have repeatedly turned out to have no artifact behind them at all.
python3 scripts/check-facts.py article.md --evidence run.json results.csv logs/
It extracts every checkable claim — prices, measurements, quantities, versions, cloud identifiers, arch strings — and reports which appear in no evidence file. It cannot tell you a number is true; it tells you which numbers you are asserting without an artifact, which is where wrong numbers come from. Fenced code blocks are skipped, because pasted tool output is itself evidence.
Scope --evidence to text artifacts, or the check lies to you. It compares on
digits alone, so pointing it at a run directory containing compressed traces and
protobufs (*.trace.json.gz, *.xplane.pb, read with errors="ignore") produces
coincidental matches against binary noise. A first pass reported 15 traced, 0 untraced; re-run against only the .md / .json / .txt artifacts it became 14 traced, 1 untraced, and that one was a real drifted figure that had no artifact
anywhere. Two other "traced" claims were also false: 4.35 s matched 4.355 (a
kernel duration in ms) and an SM 8.9 claim matched 8.976 inside a file for the
other GPU.
So: a green result from a directory full of binaries is not evidence of anything. Feed it text, and sanity-check which file each claim traced to — the tool reports the first match, not the best one.
Correction. The two paragraphs above describe a comparison on digits alone,
and that was the defect, not a usage hazard. MEASURED 2026-10-31: every number in
a file was concatenated, so 12 then 3.4 traced a claim of 123.4 ms and rows 147 and 629 traced 47 of 62. This kit's own 320px had been traced to
plugin-install.txt, a file with no 320 in it, and failed the moment the match was
fixed. A claim now matches whole numbers, a multi-number claim needs them adjacent
and in order, and evidence must decode as UTF-8, so binaries are skipped outright.
Checking which file a claim traced to is still worth doing.
And a green result from a path that does not exist is worse. preflight.py
defaulted --evidence evidence/ and --repo-root .. relative to the current
directory, so they were right only when run from the scripts directory. Run from
the repo root, check-facts read an evidence directory that was not there and
printed 0 claim(s) against 0 evidence file(s) / 0 untraced — a clean pass over
nothing — while check-article called a committed cover uncommitted. Both defaults
now anchor to the article (git rev-parse --show-toplevel from its directory, and
<article dir>/evidence), preflight prints all three resolved paths before it
runs anything, and check-facts now exits 1 if an evidence path is missing or
holds no readable file rather than reporting success for having read nothing.
Every untraced claim is exactly one of three things:
Standing exemptions go in a .factsignore beside the article, one per line with
the reason written above it. If you cannot write the reason, the claim needs an
artifact instead, not an exemption.
A fourth state, for a claim measured earlier and deliberately not re-run.
MEASURED 2026-09-16: collapsing that into "untraced" made this kit's own article
fail on a figure its ledger already labelled, dated and explained, and a check that
can never go green stops being read — the genuinely unsourced claim sitting beside
it went unfixed for a week. So a claim may now cite a dated row under a ## LOG
heading in the article's ledger (CLAIMS.md beside it, or --ledger), and the run
prints it as LOG <date>, not re-measured and counts it apart from both traced and
untraced. It is a claim about provenance, not a measurement, and it is worth
exactly as much as the ledger it came from.
Two guards, because a fourth state is a hole by design. The row must carry a date,
and the claim must appear in it literally — the digit-only match the evidence
files get would let a row's own 2026-08-30 stand in for half the counts in an
article. And the ledger may not sit inside --evidence: it restates every
number, so a ledger in the evidence set traces everything by construction. This
article's ledger was first written into evidence/ and scored a perfect run, which
is why the check now refuses a ledger-shaped file there. The first version of that
guard only checked the --ledger path and did not fire on a CLAIMS.md copied
into the evidence directory — the control caught it, which is the whole argument
for running one.
A fifth state, for an article about a paper: DISPUTED. When the article
reports someone else's paper, audit the paper first and pass the audit's JSON in
--evidence. Any JSON object with a paper_value, a computed and a verdict
(VERIFIED, MISMATCH, NOT CHECKABLE) is read as an audit record; the
research-kit plugin's math-sandbox and ablation-stat-auditor write them. MEASURED 2026-11-15: on
that kit's Gemma 4 LoopBreaker run, the explainer narration states the paper's
Fisher p of 4.2e-9 twice, and check-facts reported it as neither traced nor
untraced, because no pattern read scientific notation; the comic states the
Wilson bound 48.1%, which the audit recomputes to 48.2%, and that traced ok to
the audit file because the paper's value is written in it. A claim equal to the
paper value of a MISMATCH or NOT CHECKABLE record now fails as DISPUTED,
whatever other file it also appears in. Where a record's paper value and
recomputed value hold the same count of numbers, only the numbers that differ at
the paper's printed precision are disputed, so 39.5% from "39.5% [31.5, 48.1]"
still traces. To state a disputed number on purpose, write the recomputed value
beside it and add a row containing the claim under ## DISPUTED in the ledger;
the run then prints it as NOTED.
Correction. "A claim equal to the paper value" was implemented as any one
number of the claim equal to any one number a disputed record stores, and most
of what it flagged was coincidence. MEASURED 2026-11-16 over five outputs audited
by research-kit: 34 flags, 22 of them about something else — 2.381:1 against a
record of exit status 1, 4px against code-block line counts, 95px against a
record about 95 columns, and stylesheet lengths on an HTML page. A claim now has
to match a record's numbers as a sequence, covering a disputed one; a single
number with a word unit (95px) must carry that unit in the record's statement
when it has one; and an HTML page's <style> is not read. The same five outputs
now raise 12 flags, every one a real dispute.
Two other things a script cannot do, so do them by hand:
There is no path where skipping it is correct, and nothing fails locally when
you skip it — dev.to only fetches the cover_image: URL at render time, so a
missing file shows up as a broken image on a published post. The check treats an
absent or unreferenced cover as a hard failure.
Author at the ratio that is displayed. MEASURED 2026-08-31: dev.to does not
show the cover you upload. Its proxy renders width=1000,height=420,fit=cover — a
2.381:1 centre crop. A 1376x768 cover loses 95px off the top and 95px off the
bottom, which sliced the eyebrow through its letterforms and cut the footer
entirely, in every article shipped at that size. --mode devto now emits
1376x578, which is 2.381:1, so nothing is cropped.
The pre-flight simulates the crop: it fails when ink falls in the bands dev.to would discard, and warns when the ratio is wrong but nothing is drawn there.
The two destinations disagree:
| dev.to | AWS Builder Center | |
|---|---|---|
| Size | 1376x578 | 1200x675, max 2 MB |
| Delivery | cover_image: URL, fetched at render | uploaded in the editor |
| Text in image | fine | "Text in images is not recommended" |
python3 scripts/make-cover.py --out devto-cover.jpg --mode devto \
--eyebrow "..." --headline "line one|line two" --subhead "..." \
--tile "name|sub|$0.42|per hour|CHEAPEST PER HOUR|orange" \
--tile "name|sub|$0.60|per M tokens|CHEAPEST PER TOKEN|blue" \
--footer "..."
python3 scripts/make-cover.py --out builder-cover.jpg --mode builder
--mode builder defaults to --no-text to respect AWS's guidance.
What --no-text actually draws is two abstract bars, and --flow does not
apply in that mode. MEASURED 2026-09-20: --mode builder --ratio 24:4 and the
same run with a full --flow description (--source, seven --dest, a
--legend) produced the identical two-bar image, and the script's own
legibility line reported FAIL nothing on this cover is readable in a feed card.
Two bars are a comparison. On an article that does not compare two things, that
cover asserts something the piece does not say, so it is worse than shipping no
cover at all. When the subject has a shape rather than a magnitude -- one source
fanning out to seven destinations, a pipeline, a before-and-after -- draw it and
keep it textless, which is what AWS asks for anyway; the covers for papers 1 to 3
in lakehouse-iceberg-2026 are illustrations for this reason.
Correction. The paragraph above said --flow does not apply under
--no-text. MEASURED 2026-10-02 after a change to make-cover.py: the same
--mode builder --ratio 24:4 run with seven --dest now draws a textless
fan-out — one page, light to one shape per destination in its colour — and its
bytes differ from the two-bar run of the same command without --flow
(sha256 9a131515… against 0c8e26d2…). --sizes also keeps --no-text now;
it used to force text back on at every size. The two-bar image is still what
--no-text draws without --flow.
Two articles with the same --flow shape get the same cover. MEASURED 2026-11-04: --mode devto --no-text --flow with three --dest (blue, orange, muted) wrote devto-cover.3ce8c43b.jpg, the hash already published on the TorchTPU native-Rust article, because the textless flow draws one page and one shape per destination and ignores every label. A content-addressed name that matches another article's is that article's cover. Check the hash against the other covers in the repo before using it, and vary the destinations or draw the article's own subject when it collides.
Which cover to draw is the author's choice, not the kit's. The house style
sets the default (references/house-style.md → "Covers"); for this author it is
a textless picture drawn for each article's own subject, with the --flow
fan-out kept for articles whose subject is a fan-out. Illustrations come from
the nb21 plugin (mcp__plugin_nb21_nb21__generate_image, Nano Banana 2.1 at
1K, aspect_ratio="16:9") or from Pillow code; crop the result to each
destination's size rather than padding it.
make-cover.py and make-linkedin.py both need Pillow, and nothing warns you
until a run dies on ModuleNotFoundError: No module named 'PIL' -- check-article.py
merely degrades to WARN Pillow not installed; skipped geometry check, so a cover
can pass the pre-flight without its geometry ever being looked at.
A cover URL is a mutable name, and dev.to treats it as permanent. MEASURED
2026-08-31: dev.to does not re-host a cover, it proxies it, with your URL
embedded in theirs —
media2.dev.to/dynamic/image/.../https%3A%2F%2Fraw.githubusercontent.com%2F....
So the URL you hand it is load-bearing for the life of the post, and a proxy keyed
on that URL decides for itself when to look again.
Two failures follow, both silent. Regenerate a cover in place and the published article may keep serving the old image. Reuse a filename across articles and the older one silently repaints.
python3 scripts/make-cover.py --out devto-cover.jpg --mode devto \
--content-address --url-base "https://raw.githubusercontent.com/<u>/<repo>/main/<dir>"
wrote devto-cover.6d805f0f.jpg 1376x578 84 KB
cover_image: https://.../devto-cover.6d805f0f.jpg
A hashed name is a URL nothing has cached, and the old file stays put so published
articles keep rendering. Same reasoning as Medium's importer cache in
references/medium.md, where ?v=2 does not bust it either. Regenerating
identical bytes yields the identical name, so the flag is idempotent.
The pre-flight checks that a hashed name still matches its bytes, and warns on a cover without one. Do not edit a content-addressed file in place.
Rules the generator already follows, worth knowing if you edit it: colour rides on chips and swatches, never on numerals or labels — text wears ink tokens. The two-colour pair must pass an available palette/contrast validator rather than an eyeball check. Draw at 2x and downsample or the type looks soft. Render it and open it — a validator checks colour, not layout, and the first pass usually has a label collision.
Markdown with YAML front matter. Tables, fenced code and emoji all render natively, so this is the source article the other formats are derived from.
---
title: "..."
published: false
description: "..."
tags: aws, vllm, cuda, machinelearning
cover_image: https://raw.githubusercontent.com/<user>/<repo>/main/<dir>/devto-cover.jpg
---
published: false unless told otherwise.
Unwrap paragraphs before posting. dev.to renders with hard breaks on, so a
hard-wrapped source publishes with a line break at every wrap. publish-devto.py
unwraps on the way out and leaves the repo copy readable; --no-unwrap opts out.
MEASURED 2026-09-28 on the dev.to Kaggle Benchmarking Challenge:
dev.to/new?prefill=<urlencoded markdown> URL. Decode its prefill
query value to get the template (front matter, the submission line, the ##
headings with their prompts) instead of guessing from the page text.publish-devto.py --update
prints (it contains -temp-slug-), and publish only on the author's word.check-links.py reports it until then (references/kaggle.md).This repo ships the wrapper: scripts/publish-devto.py.
python3 scripts/publish-devto.py --list
python3 scripts/publish-devto.py --create <article>.md --org-slug gde
python3 scripts/publish-devto.py --update <id> <article>.md
python3 scripts/publish-devto.py --org <id> aws-builders
The pre-flight gates the publish. --create and --update run
check-article.py first and refuse on any FAIL, because every check in it
describes something invisible locally and permanent once published. --force is
deliberate and should be rare.
Correction. "The pre-flight" here meant check-article.py alone, so the number
check never ran on the way out. MEASURED 2026-11-16: with research-kit's audit
records staged in its evidence/, the walk-through as published failed
preflight.py on 3 disputed numbers, and --create would have posted it.
--create and --update now also run check-facts.py over the article's
evidence/ and refuse on a disputed or untraced number, or a missing evidence/.
The same --create now prints refusing to publish: check-facts failed and
creates nothing.
The key is read from $DEV_TO_API_KEY or ~/.devto.key, never from the command
line, where it would land in shell history and process listings. --org-slug on
create routes the article in the same run.
dev.to has a REST API and this repo already wraps it. publish-devto.sh takes
any article path — but the copies are not all the same script. MEASURED
2026-08-30 in gemma4-dev: of seven copies, only gpu-vllm-g5g-2b/publish-devto.sh
implements the flags; the other six take one positional argument and always POST a
new draft, so --update is read as a filename and dies with missing --update.
Check before reaching for a flag:
grep -l -- --update */publish-devto.sh # which copies can update
bash <any-rig>/publish-devto.sh <article>.md # create a NEW draft (all copies)
bash <flagged-rig>/publish-devto.sh --list # ids + published state
bash <flagged-rig>/publish-devto.sh --update <id> <file> # overwrite in place
published is not a settable field. MEASURED 2026-09-01:
PUT {"article": {"published": true}} returns 200 and changes nothing — the
article stays in /articles/me/unpublished. dev.to reads the flag from the front
matter inside body_markdown, so publishing means resending the body with
published: flipped. The 200 is the trap: it reports success for a request that
did nothing, and only the listing shows the truth.
publish-devto.py --publish <id> does it properly — fetches the current body,
flips the front matter in the payload only, and then verifies from the listing
rather than trusting the response. The source file stays published: false so the
pre-flight keeps meaning something. --unpublish goes back, and is the only way
back, since there is no delete.
--publish can answer 500 and do nothing. MEASURED 2026-11-04 on article 4972235: the first --publish returned 500 {"status":500,"error":"Internal Server Error"} and --list still showed it as a draft; the same command a minute later printed published and the listing agreed. Read --list after a 500 before retrying, so a publish that did land is not sent twice.
A slug is fixed at creation and a rename does not move it. A draft made under
a working title keeps that title's URL after you retitle it, so create it with the
title you mean to publish under. Replacing the draft is the only fix, and the two
creates need five minutes between them: the same title twice inside that window is
refused with 422 Title has already been used in the last five minutes.
A draft will never be byte-identical to its source file. dev.to labels bare
``` fences with a detected language (```shell, ```plaintext) on the way
in, so diff the two below that substitution rather than concluding the upload
drifted.
--update UNPUBLISHES a published article. MEASURED 2026-09-01, on two live
ones at once. Front matter is part of body_markdown, so the source's
published: false — which the pre-flight requires — is pushed with everything
else and flips the article back to draft. It reports updated <id> and says
nothing about the state change; only --list shows it. After updating anything
already live, re-run --publish <id> and confirm with --list. The slug and
the id survive, so links keep working once it is back.
Correction. The instruction above was written down and nothing enforced it.
--update now reads the listings first and sends a live article's front matter as
published: true, then confirms it is still in the published listing, and exits
non-zero if it is not; an id in neither listing refuses. This is tested against a
fake API only: no live article has been updated through this path, so it stays
unmeasured until one has. Keep confirming with --list until then.
And the public page can keep serving a 404 after it is back. MEASURED
2026-10-05: one of four articles updated and re-published that afternoon
answered 404 to a public fetch for more than 28 minutes afterwards, with
x-cache: HIT and a rising age: header, while the API returned it published
with the new body at the same URL. A query string did not get past the cache.
The other three served 200. --publish on it refuses, since the listing already
has it published, so nothing in the API reaches that cache. Check each page after
a re-publish, and read age: before calling a 404 a broken article.
Front matter is part of body_markdown, so title, tags and
cover_image all transfer — no field-filling, no cover upload, no title retyping.
--update rewrites those too, and does not change the slug of an already-published
article, so existing links survive.
MEASURED 2026-08-31 against this account's own back catalogue: the same piece
posted to two communities is byte-identical. "Build an MCP server in Rust
with rmcp" is 18,234 characters under gde and 18,234 characters under
aws-builders, same title, and diff on the bodies returns nothing.
So one source file goes to both, and organization_id is the only difference.
Writing a second, differently-angled version for the other community doubles the
maintenance and guarantees drift — which is exactly what it did here before
anyone checked the back catalogue. Rotate the angle only when the subject
differs, the way an ADK piece and a Bedrock piece genuinely do.
An article's community channel (dev.to/<org>/<slug> rather than dev.to/<user>/<slug>)
is set with organization_id, so it needs no browser either:
curl -s https://dev.to/api/organizations/<slug> # the org's numeric id
curl -s -X PUT https://dev.to/api/articles/<id> -H "api-key: $KEY" \
-H "Content-Type: application/json" -d '{"article":{"organization_id":<n>}}'
There is no "list my organizations" endpoint. Recover the ones the account belongs
to by scanning its own back catalogue — /api/articles/me carries an organization
object on every article that has one:
curl -s -H "api-key: $KEY" "https://dev.to/api/articles/me?per_page=40" \
| python3 -c "import json,sys;print({(x.get('organization') or {}).get('username') for x in json.load(sys.stdin)})"
MEASURED 2026-08-30: gde (11939) and aws-builders (2794) for this account, and the
back catalogue also shows the routing convention — Gemma/JAX pieces to gde, EC2/AWS
pieces to aws-builders. Front matter cannot express this, so it is a separate call
after the article exists. A later --update from source does not clear it (tested),
and the old /<user>/<slug> URL keeps resolving after the move, so links already handed
out survive.
Two odd things about published articles' ids. GET /api/articles/<id> returns
{"error":"not found","status":404} for some published articles even with a valid key,
while the same article appears normally in /api/articles/me — so read state from the
listing, not the by-id endpoint, before concluding an article is gone. And dev.to
allows at most four tags; adding a fifth silently keeps the first four.
Do not drive dev.to's editor in a browser. It is slower, it needs the clipboard or a JS bridge, it silently splits front matter across separate title/tag/cover widgets depending on which editor version the account has, and it is entirely unnecessary. Before reaching for the browser on any destination, check the repo for an existing publish script — this one was sitting in eight directories while a whole browser flow was built around it.
Do not write a Medium markdown file by hand. Medium's importer strips
markdown tables entirely and flattens <pre> to a single line while stripping
<br>, so anything depending on alignment cannot survive as text.
python3 scripts/make-medium.py devto-<slug>.md medium
It renders every table and box-drawing diagram to PNG at 2x and emits two files:
| File | Use |
|---|---|
<slug>-embed.html | Do not paste this into Medium. Images are inlined as base64, and Medium silently strips data: URIs on paste — every image in the article disappears, with no error and no placeholder. Useful only where a self-contained single file is wanted for something other than Medium. |
<slug>-hosted.html | Use this for both paste and import. Real https:// image URLs, which Medium fetches and re-hosts. Requires medium/img/*.png committed and pushed first. Pasting it (rather than importing) additionally preserves multi-line code blocks, which the importer flattens. |
Always pass --cover=<file>. With no --cover the script takes the first
*cover*.{jpg,png} alphabetically from the article's directory. A directory
holding covers for several articles will therefore put the wrong art on the story,
and since the first body image becomes Medium's cover, that is what ships.
Correction. The default is now the local file named by cover_image:, and
the alphabetical pick applies only when that is absent. MEASURED 2026-10-31: on
this kit's own article the pick was the superseded cover.77acc7c4.jpg.
--cover is needed only for a cover the front matter does not name, and the
pre-flight now fails that as stale.
Type the title in by hand. No paste or import route fills Medium's Title field,
even though the hosted variant carries an <h1 class="title">.
The image base URL is derived from git. This is the
single most repeated bug in this toolchain: a per-project copy of the script used
to hardcode its own project path, so a copy taken elsewhere pointed every <img>
at the original project's URLs — all 404 — while the embed variant hid it
completely because its images are inlined. make-medium.py asks git for the origin remote, the branch and the article's path
inside the repo, and builds the base from those. Override with --img-base=<url>
only when the images will be served from somewhere other than that repository.
More importer quirks — the silent killers around figure captions, the URL-keyed
cache, canonical-link resolution, heading sizes — are in references/medium.md.
Generate with THIS script, never with a per-article fork of it. MEASURED
2026-08-30: a build-gde.py written beside one article borrowed only the table
rendering from an older copy of this script, so it never inherited the heading
demotion — it emitted 19 <h2>, and Medium renders #/## at title size, so the
story read as 19 titles. A fork does not receive later fixes and nothing warns you;
the defect is visible only in the published rendering. If a wrapper is genuinely
needed, have it call this script rather than copy pieces out of it.
Driving any of these editors in a browser: read references/browser-publishing.md
first. It carries the post-paste verification checklist (images, title, code,
tables, last paragraph — each checked separately, because they fail independently),
why the system clipboard must never be used, the base64 JS-bridge injection, the
file:// restriction, and the paragraph-unwrapping that Builder Center's editor
needs.
No new generator. Substack's editor has no table node either, so the
-hosted.html from make-medium.py is the input, and ss.prepare() in
scripts/browser/substack-editor.js makes three changes on the way in, all
MEASURED 2026-10-05:
code mark excludes
every other mark, so [`path`](url) pastes as code with no link and no
error. prepare() unwraps the <code>.<h4> sections are promoted to <h3>. Substack has six heading
sizes and renders h4 at 21px against 19px body text.```text block becomes a maths block. <pre class="text"> saves as
Substack's latex_block; prepare() clears the classes on <pre>.ss.setTitle() handles one more:
ss.setTitle() refuses one. The textarea's maxLength is 200, so
typing or pasting by hand keeps only the first 200 characters, cut mid-word
(MEASURED 2026-10-16); ss.setTitle() bypasses that.Multi-line code blocks and image alt text both survive the paste, unlike Medium.
Audit from the saved draft with ss.audit(), which reads the stored document
through the editor's own endpoint, rather than from the DOM. Title and subtitle
(the front matter's description) are separate fields: ss.setTitle(). The route,
the counts and what is not yet measured are in references/substack.md.
Publishing emails every subscriber by default. MEASURED 2026-10-05: the
Publish modal opens with "Send via email and the Substack app" on and a button
that reads "Send to everyone now", and a second modal ("Add subscribe buttons")
holds the publish at Publishing... until answered (MEASURED 2026-10-16: on a
later post it did not appear, the tab moved at once and the in-page script
died; confirm with ss.published(), never re-click). Ask the author about the
email before the click; ss.publish() refuses without an explicit answer. The
slug is cut short (/p/streamline-publishing-with-a-claude), so take the URL from
ss.published().
Add substack = <url> to links.txt once it is published; the LinkedIn, Slack
and Google Chat posts carry it. A links.txt with no substack line leaves it out.
LinkedIn's Posts API cannot create a draft. lifecycleState documents DRAFT
as content "accessible only to the author and is not yet published", then states
that PUBLISHED is the only accepted field during creation. Anything that
posts through the API is publishing. So the artifact is a text file for the
composer, which does have drafts.
python3 scripts/make-linkedin.py devto-<slug>.md --api
It reads <article>.links.txt beside the article, falling back to links.txt —
key = url, one per line — and writes
linkedin-<slug>.txt, plus linkedin-<slug>-cover.jpg — the article's own
cover fitted to 1200x627 for the post's image, attached in the composer as an
upload. A missing cover fails the run (--no-cover opts out). Six checks, exits
non-zero:
The per-article name exists because a directory can hold two articles: part 1
and part 2 of a series side by side would otherwise share one links.txt, and
the same file feeds make-slack.py, make-gchat.py, make-advocu.py,
check-links.py and the pre-flight.
PENDING is written into the file as a visible
placeholder and fails the run, so a post with an unpublished link cannot go
out by accident. Each URL is also fetched, with the same verdict
check-links.py gives. MEASURED 2026-10-05: before that, "resolved" meant
only "not PENDING", and the run passed a post carrying a dev.to URL that
answered 404 to the public. --no-fetch skips the fetch; preflight.py
passes it when run without --live.
A destination the article will not reach (an account Medium will not
publish from, say) is SKIP, never a deleted line: the post, the Slack
announcement and check-links.py leave it out, and its label goes with it.
MEASURED 2026-10-02: medium = SKIP dropped the Medium block from the Slack
post and the Medium line from the LinkedIn post, with PENDING still failing
both runs for the LinkedIn link.Post text takes no formatting. The commentary field is LinkedIn's little
format, whose whole element set is text, mentions and hashtags. No bold, no
italics, no lists, no link markup — **bold** and [label](url) arrive as their
own punctuation.
For the API only, every reserved character must be backslash-escaped, whether or
not it is used as markup: | { } @ [ ] ( ) < > # \ * _ ~. An
article body is full of them. --api writes the escaped variant beside the plain
one. Text pasted into the composer needs no escaping.
Every post links the GitHub repo. The author's standing rule, 2026-11-10.
make-linkedin.py takes repo from links.txt, else from the article's git
origin when it is on github.com, and renders it last as GitHub: <url>. No
repo line and no GitHub origin fails the run; repo = SKIP is the way to post
without one, for an article with no public repo.
Label the two dev.to links differently. Two articles routed to two organizations are two different URLs, and "dev.to" twice reads as a duplicate.
The shape of the post is templates/linkedin-post.txt, not code. An
announcement is the same few moves every time, and rewriting them per article is
how they drift. Wrap anything that should vanish when empty in [[key]] … [[/key]], so an article with no ## Summary drops the lead-in line instead of
stranding it above the links. Swap that one file and every post changes shape —
the same arrangement references/house-style.md has with the articles.
Which figures here are first-party and which are third-party consensus, plus the
mention-matching rules, are in references/linkedin.md.
The long-form article at linkedin.com/article/new/, a separate thing from
the post above. No new generator: the editor has no table node, so the
-hosted.html from make-medium.py is the input. All of it MEASURED 2026-11-19
on one article, in a visible tab, to a saved draft. Nothing was published,
so Publish and everything after it is unmeasured and is the author's click.
Correction. The same article was published later that day, so Publish, the
URL and the public fetch are now measured (below). Publishing remains the
author's decision; lia.publish() refuses without the settings read out first.
The order is forced by one property: HTML cannot be parsed on the editor
page. DOMParser there returned no elements for a source of 269 tags, and the
paste that followed went in as one paragraph of plain text. So
scripts/browser/linkedin-article.js runs twice: lia.stash() on 127.0.0.1
adapts the file and puts it in window.name, then the same file is evaluated
again in the editor for lia.paste(), lia.setTitle() and lia.audit().
Evaluate the file's text each time; eval of a carried copy threw on one load.
What lia.stash() and lia.paste() change, and why:
Heading (level 2), set on the nodes after the paste.<code> are
unwrapped. Every other inline <code> stays in the paste although the saved
draft keeps none of it: without the mark the editor links bare file names
(make-medium.py → http://make-medium.py, 41 link marks for 4 targets).lia.coverInput(), file_upload, lia.coverNext()). A 1376x578 cover
previewed as 1027x578.media.licdn.com from their URL.<p> 1 of 1 and 0 of 9, <figure> 9 of 9 and 0 of 2). Pasted alone at a
marker paragraph, each one arrived, so that is what lia.paste() does.Audit after a reload. The editor's document after the paste still shows
inline code and any heading level; after a reload it is what LinkedIn stored.
lia.audit() compares it with the stash and returns problems, which read []
on the final run: 4 of 4 link targets, 3 code blocks with their line counts,
7 headings, and the same 7,527 non-space characters on both sides.
Check that the stash is the current build. MEASURED 2026-11-19: the tab's
HTTP cache served the previous -hosted.html from 127.0.0.1, the old version
was pasted, and the audit agreed with it because the stash was equally stale.
lia.stash() now fetches with no-store and returns first and inkChars;
read them against the file just built.
Next in the editor opens a post box whose button reads Publish, and the
preview page (Manage → Preview, a real click) has a Publish button of its
own. MEASURED 2026-11-19: Publish is enabled with the post box empty, one
click publishes and moves the tab to /pulse/<slug>/?published=t, and the slug
is LinkedIn's own (streamline-publishing-claude-code-skill-<author>-kay8c), so
take the URL from lia.published(). Record it as linkedin-article = <url> in
links.txt. A /pulse/ slug that does not exist answers 200 after a
redirect to an article-not-found page, which check-links.py now fails. The
route, the probe table and the unmeasured list are in
references/linkedin-article.md.
builder.aws.com. This is AWS, not Google. Searching for "Builder Center" as
a Google property finds nothing.
builder.aws.com/profile/content?tab=draftmake-builder.py strips it and fails if one remains.Tags are a searchable fixed vocabulary, not free text — you pick from their list.
amazon-ec2, generative-ai, cost-optimization, graviton and python exist;
gpu does not, nor benchmark/benchmarking, nor a usable inference (the
matches are application-inference-profile and aws-elemental-inference, both
unrelated). Search before assuming a tag exists.
The picker is virtualised: with nothing typed the DOM holds only the first alphabetical page, so reading the options out of the DOM to check whether a term exists returns nothing useful. Type the term first, then read. And the field collapses — clicking where the search box was lands on the AWS global search in the masthead, which silently swallows the keystrokes.
The cover uploads through a real <input type=file>: locate it with find, then
use the upload tool with its ref. Never click a file input — that opens a
native picker you cannot see.
Title and Description are ordinary inputs — click and type. The body is harder.
The clipboard is shared with whoever else is at the machine. A synthetic Ctrl+C loses the race silently, and Ctrl+V then pastes their content into your editor — while your Ctrl+C clobbers what they had copied, which is the more expensive half. MEASURED 2026-08-30: someone else's article landed in this draft twice, and nothing anywhere reported a failed copy.
And never hand the paste to a human. Automate it.
The route that works — fully automated, self-verifying, no clipboard:
Carry the payload in with window.name. It survives a cross-origin
navigation in the same tab, so load the body same-origin from serve-body.py
on localhost, stash it in window.name, navigate that tab to the editor, and
set window.__p = window.name there. One step, no size limit to work around:
18,405 characters held across a Builder Center draft, 34,715 into Medium. The
code is in references/browser-publishing.md.
Only if you cannot navigate the tab, fall back to appending JSON-escaped
~1400-character chunks to window.__p, checking the cumulative length after
every one and never proceeding past a mismatch.
Verify the whole payload before using it. Checksum it in the page and compare against the same computed locally. Use a NUMERIC checksum: a hex or base64 SHA can be redacted in transit and tell you nothing.
let a=0,b=0;
for(let i=0;i<window.__p.length;i++){a=(a+window.__p.charCodeAt(i))%65521;b=(b+a)%65521;}
({chars:window.__p.length, adler_a:a, adler_b:b})
Compute the local side over UTF-16 code units, not code points.
charCodeAt is UTF-16; Python iterates code points; every emoji counts 2
against 1. A document with three 🔎 reported 34,715 characters in the browser
against 34,712 in Python and the checksums disagreed on data that had
transferred perfectly. references/browser-publishing.md has the Python that
matches.
Clear the editor with the KEYBOARD, not execCommand.
document.execCommand("delete") over a selected range silently does nothing
here and the paste then APPENDS — you get the entire article twice, which
only a landmark count will catch. Click the body, then Ctrl+A, Delete.
Assert the editor is empty, then dispatch the paste. The assertion is what prevents the duplicate:
const ed = document.querySelector('[contenteditable="true"]');
if (ed.innerText.length > 50) throw new Error("not empty, refusing to paste");
ed.focus();
const dt = new DataTransfer();
dt.setData("text/plain", window.__p);
ed.dispatchEvent(new ClipboardEvent("paste", {clipboardData: dt, bubbles: true, cancelable: true}));
Count landmarks afterwards. The opening sentence, the summary heading and the closing line must each appear exactly once.
dispatchEvent returns false — that is preventDefault, not refusal. Judge by
the landmark count, never by the return value.
Closed routes, so you do not spend time on them: cross-origin fetch into
the editor page (CSP connect-src — adding a CORS header does NOT help, and the
failure is an identical bare "Failed to fetch" either way); file:// navigation
(blocked by the extension); wl-copy/xclip (both hang the shell holding the
selection, even detached with setsid/nohup).
Strip the # title and any *Subtitle:* line first — separate fields. Watch the
line numbering: sed '1,2d' removes the title and the blank line after it,
leaving the subtitle behind.
Builder Center's paste handler preserves the source's newlines inside a paragraph,
so a file hard-wrapped at ~95 columns renders with a ragged break every ~95
characters. serve-body.py unwraps before serving.
This was written up as a Builder Center quirk and it is not one. MEASURED
2026-08-31, re-measured against the live article 2026-09-16: dev.to renders with
hard breaks ON too. A published article had <br> in 47 of its 62
paragraph-level blocks — 58 <p> and 4 <li> — from a source with zero lines
ending in the two spaces that mean an explicit markdown break. The ragged rendering
had been shipping for months, in every article, unnoticed. The artifact is
articles/publishing-kit-skill/evidence/devto-hardwrap.txt; it had none until
2026-09-16, and the kit restated the number in four places meanwhile.
Where each destination stands, all measured 2026-08-31:
| Destination | Hard-wrapped source | Unwrap needed |
|---|---|---|
| dev.to | <br> at every wrap — 47 of 62 paragraphs in a published article | yes, publish-devto.py does it |
| AWS Builder Center | preserved on paste | yes, serve-body.py does it |
| Medium | collapsed to spaces, 0 <br> in the editor, positive control passed | no |
Assume every destination preserves your newlines until you have checked that one.
The unwrap logic is in scripts/bodytext.py — one implementation, imported by
serve-body.py, publish-devto.py and check-article.py, and the pre-flight
warns when an article still has hard-wrapped paragraphs.
Keep tables to about five columns. Seven get squeezed until cells break
mid-token — g4dn.2x/large, g6.xlarg/e. Move what the prose can carry out of
the table.
Go to the published URL, open the "..." menu on the article itself → Edit.
Do NOT navigate to /create/content/<id> — that silently creates a new empty
draft instead of editing the existing piece.
Never click Publish. Leave it as a draft and hand back the link.
Optional, and after the fact. One message in a community channel with a link to each destination.
python3 scripts/make-slack.py <article>.md --hashtags "#A #B"
The format is the author's own, read out of the channel rather than invented —
two or three lines of plain context, then Builder Center Article is here:,
Medium is here:, Dev.to is here:, Linked In is here:, each with a bare URL
on its own line, then hashtags. That order matters, and so does one detail the
script enforces: the dev.to link is the aws-builders one, never the GDE
copy. It is an AWS channel.
Slack renders no markdown. Its markup is mrkdwn — *bold* with single
asterisks, <url|label> for links — so the script strips markdown rather than
translating it, matching what the existing posts do.
It does not post. It writes a file. The channel had 656 members, and nobody
who has read a message unreads it — and a script cannot send it anyway. MEASURED
2026-09-21: Slack accepts insertText and the cover upload, then clears the
composer and posts nothing for both a synthetic click on texty_send_button and
a synthetic Enter. Stage it and hand it over; references/slack.md has the
routine and what each failed attempt costs.
If you do stage it in the browser: the composer is a plain Quill editor at
[data-qa="texty_input"] — no shadow root — so execCommand("insertText") puts
the whole message in at once. Do that rather than typing, because Enter sends
in Slack. Then press Escape: the trailing hashtags leave Slack's channel
picker open, and Enter would insert a channel link instead of sending.
Attach the cover rather than counting on the unfurl. MEASURED 2026-09-16: the
page has exactly one input[type=file], it is in the light DOM, and it needs none
of the shadow-root work Medium and Builder Center do — it carries no accessible
name, so give it an aria-label and upload straight to it. Attach before
inserting the text — MEASURED 2026-09-24, an upload after insertText blanked
the composer a few seconds later, because the scripted text never reached Slack's
draft (references/slack.md). After a
successful upload input.files reads 0, because Slack consumes the file into
its own attachment state, so a re-read of the input looks exactly like a failed
upload — judge it by the thumbnail above the composer toolbar instead.
references/slack.md has the rest.
Optional, and after the fact. The same job as the Slack post, for the other community.
python3 scripts/make-gchat.py <article>.md
Same shape — the author's own format, a few lines of context then one labelled
link per destination — because a reader in either room should see something
familiar. What changes is which copy of the article the room gets: the AWS
Slack channel gets dev.to/aws-builders, the GDE space gets dev.to/gde, and
make-gchat.py fails on the swap exactly as make-slack.py does in the other
direction. The link order flips for the same reason — lead with the copy that
belongs to the room.
The shape is that room's, read out of it: paragraphs separated by blank lines and
links inline ("Dev.to is here: <url>") rather than on their own line. No
lede — a manufactured "just posting in case this helps anyone else" opening was
the default for exactly one post and got cut before sending, because that opening
belongs to a favour, not to an article announcement. --lede is there for the
piece that needs one. The space is threaded, so a post is a new
conversation rather than a line in a stream.
No hashtags, and that is measured, not taste. In Google Chat a # opens the
same People/Files picker @ does, with all / Notify all first in the list —
Enter with it open inserts a notify-everyone. The control is what makes this
trustworthy: @ alone and # alone both open nothing, so testing only those
would have produced the opposite rule. Both need a following letter.
With a thread open there are two composers, and only one of them is a reply.
MEASURED 2026-09-16. A /topic/ URL leaves the space's own stream on the left and
the thread in a right-hand panel; both are [contenteditable="true"][role="textbox"]
and they are told apart by aria-label, not by position or by first match.
History is on is the space's composer and sending there starts a new top-level
topic; Reply is the thread's. Getting that wrong is a new conversation in a
live community space, not a formatting slip. A thread composer can also already
hold the author's own text, so the emptiness guard refuses — ask before replacing
it — and after inserting, check the other composer is still empty.
Either composer is a plain contenteditable with no shadow root, so
execCommand("insertText") puts the message in at once — and it does not open
the pickers that real keystrokes do. Assume Enter sends. references/gchat.md
has the rest.
Optional, and unrelated to getting the article out. app.advocu.com is where
a Google Developer Expert records activities, and it runs after publication
rather than as part of it.
python3 scripts/make-advocu.py <article>.md --reach <n>
python3 scripts/make-advocu.py <article>.md --draft --tag "Open Source"
Use the API first, and the browser form when it fails. MEASURED 2026-11-12:
--draft posts the sheet to Advocu's Personal API (token in $ADVOCU_API_KEY or
~/.advocu.key) and a draft appears in the Drafts tab with all seven fields
set, date and tags included. The API has no image field and no submit, so the
run still ends in the browser: open the draft, attach the WebP cover on step 2,
then Submit. Drafts cannot be listed or deleted through the API, so the sheet
keeps draft id: and a second --draft refuses. Tags are Advocu's own
vocabulary and the server rejects any other with a 400 that names the tag. Exit
code 2 means the API route did not work and the sheet is complete: file it
through the form.
MEASURED 2026-09-01. Add new activity → New activity → Content creation
offers Generate your activity with AI, which asks you to "paste the link to
the activity you want to add" — a URL field, not your post's text — or a
Regular form with seven fields, of which Link to Content is required.
Either way the article has to be public first: there is no route that accepts
prose alone. So Advocu inverts this kit's usual order, where publishing is last.
make-advocu.py fails rather than emitting a sheet with a placeholder, and
rejects a dev.to -temp-slug- URL because that link changes on publish.
Reach is written as a labelled estimate, not as a counter reading. "How many
people read your content?" cannot be measured for an article that ran in five
places: only dev.to exposes a count, it reads 0 for hours after publishing, and
the copies are separate URLs that cannot be summed. So the sheet says
3000 (standing estimate, not a counter reading) — the author's standing figure,
marked as what it is — and reports dev.to's page_views_count beside it without
substituting it. --reach N overrides. Date published still comes from that
same response's published_at, because that one is a measurement. MEASURED
2026-10-31: the lookup read one page of a 481-article account and missed this
kit's article on page 2. It reads every page now, and a date it cannot find is a
FAIL, since Advocu requires one.
The distinction is worth holding on to: the rule against invented figures is about passing an estimate off as a measurement. Silently copying a count that covers one destination of five would break it harder than a labelled estimate, because it looks sourced.
The form has Save as draft, so an activity parks like everything else here.
Field list and the two other activity types are in references/advocu.md.
Sprints and programs often track published work in a shared Google Sheet, so a run can end with "add a row". Do not improvise it: Google Sheets breaks every technique the editors in this kit use, and the ways it breaks are silent.
The grid is a single <canvas> with no readable DOM, so reading means driving the
Name Box (#t-name-box) and reading the formula bar (#t-formula-bar-input).
Writing means a synthetic paste of tab-separated values — computer type sends
literal tab characters, not Tab keys, and puts the whole row into one cell.
references/google-sheets.md has the code, the timeouts to respect, and the
read-back check that tells a written row apart from a mangled one.
Read references/house-style.md before drafting a single paragraph. Its
"Prose" section lists what the author has had to correct in four sessions running
— narrating the work instead of the finding, "X is not Y" contrast lines, filler
like "honest" and "actually", and internal jargon — and check-prose.py, run by
preflight.py, fails the build on every one of them. Fixing them after the draft
is the pattern that kept repeating; write them out of the first draft.
Voice, section order, opener and closing formulas live in
references/house-style.md. Swap that one file to retarget this skill to a
different author or publication; nothing else here depends on it.
agents/openai.yaml (opens in a new tab)references/advocu.md (opens in a new tab)references/browser-publishing.md (opens in a new tab)references/gchat.md (opens in a new tab)references/google-sheets.md (opens in a new tab)references/house-style.md (opens in a new tab)references/kaggle.md (opens in a new tab)references/linkedin-article.md (opens in a new tab)references/linkedin.md (opens in a new tab)references/medium.md (opens in a new tab)references/slack.md (opens in a new tab)references/substack.md (opens in a new tab)scripts/bodytext.py (opens in a new tab)scripts/browser/builder-editor.js (opens in a new tab)scripts/browser/builder-gate.js (opens in a new tab)scripts/browser/kaggle-benchmark.js (opens in a new tab)scripts/browser/linkedin-article.js (opens in a new tab)scripts/browser/linkedin-composer.js (opens in a new tab)scripts/browser/substack-editor.js (opens in a new tab)scripts/check-article.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub xbill9/publishing-kit --plugin publishing