/palladius-public-goodies:publish-to-mediumfrom palladius-public-goodies
Validates, stages, and cross-posts technical blog articles to Medium and LinkedIn as unpublished drafts using Chrome DevTools Protocol. Preserves canonical SEO links, auto-uploads CDN images, and enforces a strict draft-only gate.
Ships in palladius-public-goodies. 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.
publish-to-medium)Automates the pre-flight audit and browser-assisted staging of technical articles from a primary static blog (e.g., Hugo, Astro, Jekyll) to Medium (medium.com) and LinkedIn Articles (linkedin.com/article/new/).
NEVER PUBLISH)CRITICAL RED LINE: Publishing triggers follower emails, social notifications, and public syndication.
- NEVER click the final "Publish", "Publish now", "Submit", or "Schedule" confirmation button on Medium or LinkedIn under any circumstances.
- ALWAYS stop as soon as the draft status shows
Saved, capture verification screenshots, and return the private draft edit URL (e.g.,https://medium.com/p/<id>/edit) to the human author.- Sandbox Iteration (
[TEST - DELETE ME]): When testing formatting on a secondary/sandbox account, prefix the draft title with[TEST - DELETE ME]and runcleanup-test-draftsonce verification finishes.
Load the target platform reference before interacting with the browser:
medium.com): Read references/medium.md for the battle-tested single-connection CDP workflow (cdp_medium_draft.py), Method B native Blink Copy+Paste (auto-uploading 200 OK images to cdn-images-1.medium.com) vs. Method A (/p/import), exact DOM selectors, Canonical URL settings, and 5-topic tagging.linkedin.com/article/new/): Read references/linkedin.md for LinkedIn's rich-text article editor, 1920x1080 cover banner requirements, code/diagram workarounds, and companion feed-post single-row @mention rules.$SKILL_DIR/scripts/):
preflight_article.py: Pure Python 3 stdlib pre-flight validator checking localhost/relative assets, corrupted <pre><code>, Mermaid/table/video/LaTeX warnings, and live HTTP 404 checks on <img src> and <a href>.render_blocks.py: Offline-cached local rasterizer turning ```mermaid diagrams (3x Retina via headless Chrome + cached mermaid.min.js) and LaTeX math ($$...$$ / $...$ via 300-DPI pdflatex + pdftoppm or KaTeX) into crisp PNGs with zero external data exfiltration.cdp_medium_draft.py: Pure Python 3 stdlib RFC 6455 WebSocket CDP stager connecting directly to the user's authenticated Chrome via DevToolsActivePort over a single persistent WebSocket session — auto-uploading 200 OK remote images on paste, uploading local/un-deployed PNGs & GIFs directly via Page.setInterceptFileChooserDialog + DOM.setFileInputFiles, polling until every data-image-id commits to Saved, and verifying persistence after a full server reload.Always run the zero-dependency pre-flight validator before launching browser automation:
python3 "$SKILL_DIR/scripts/preflight_article.py" \
--html path/to/out/medium/index.html \
--canonical-url "https://example.com/posts/my-article/" \
--platform medium \
--check-remote
Add --json when extracting structured metadata (title, canonical_url, topics, blockers, warnings).
❌ — Fix Before Staging)localhost / 127.0.0.1 URLs in <img src> or <a href>.<img src> paths or HTTP 404 remote images (Medium's editor auto-uploads 200 OK HTTPS images onto cdn-images-1.medium.com, whereas a single 404 image triggers "Uh oh! Something went wrong uploading the image").TODO_MEDIUM_URL, Note for Medium:, leaked HTML comments, or private/internal URLs).<pre><code> tags (e.g., Markdown italic * or link [] regexes accidentally producing <em> or <a href> inside code blocks).⚠️ — Convert or Replace)<table> elements: Medium has zero native <table> support and converts every <th>/<td> cell into disconnected <blockquote> blocks. Convert Markdown tables into semantic <ul><li><strong>Key</strong> — ...</li></ul> lists or crisp PNG cards before staging.mermaid (graph LR, sequenceDiagram, flowchart). Pre-render diagrams to high-DPI .png images with captions..mp4 / <video> tags: Medium strips <video> tags. Upload videos to YouTube (Unlisted or Public) and place the bare https://www.youtube.com/watch?v=... URL on its own line for native Embedly auto-embedding (animated .gif files < 25 MB at HTTP 200 work natively as <img>).$...$ / $$...$$): Not rendered natively on Medium or LinkedIn Articles; use Unicode math symbols for inline expressions and rendered images for multi-term equations.cdp_medium_draft.py)Isolated automation browsers (--enable-automation) are blocked by Google OAuth ("This browser or app may not be secure") and Cloudflare Turnstile. Always attach to the user's already-authenticated Chrome (chrome://inspect/#remote-debugging enabled once, open a dedicated https://medium.com tab):
# Stage compiled HTML into a saved Medium draft + set Canonical URL (single 'Allow' prompt)
python3 "$SKILL_DIR/scripts/cdp_medium_draft.py" paste-html \
--html path/to/out/medium/index.html \
--url "https://example.com/posts/my-article/" \
--title-prefix "" \
--out-dir /tmp/medium_stage_out
For sandbox testing on a secondary account, keep the default --title-prefix "[TEST - DELETE ME] " and pass --cleanup-after to automatically delete temporary test drafts after screenshots and JSON reports are captured.
images/, assets/, demos/) resolve HTTP 200 on your primary blog URL.cdp_medium_draft.py paste-html (or import-url), which stages the draft and sets Story Settings → Advanced Settings → Customize Canonical Link to your primary blog URL./p/<id>/edit Draft URL + screenshots (method_b_editor.png, method_b_settings.png) + suggested 5 Topics (data-topics) to the human author to click Publish.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
cross-posting, blogging, medium, linkedin, seo, chrome-devtools
Other plugins' skills for the same job
palladius-public-goodies@palladius-skills is listed by palladius/skills — review the source before installing
npx claudepluginhub palladius/skills --plugin palladius-public-goodies68 skills in this plugin
/a2ui(💛) Build and render portable, declarative Generative UIs with Google A2UI (Agent-to-User Interface). Use whenever the user asks to generate, design, or wire interactive UI widgets, cards, forms, or dashboards using A2UI./add-to-portfolio-app(💛) Adds or syncs Talks, Keynotes, Workshops, Articles, Codelabs, Slides, and Videos in Riccardo's personal portfolio application (apps-portfolio) and companion bio repo (my-sessions-and-bio), including SQLite sync, TDD checks, default speaker images, and automated Cloud Run deployment./adk-python(💛) Create and manage AI agents using Google's Agent Development Kit (ADK) for Python. Use when the user wants to build single or multi-agent systems, evaluate agents, or deploy them. Includes instructions for fetching fresh ADK documentation and links for TypeScript and Go development./agy-cli-to-t3-import(💛) Import, resuscitate, and migrate historical or interrupted Antigravity CLI sessions (`agy --conversation <cid>`) into native T3 Code threads with standard title formatting `[agy2t3] 🪦 <Topic> (<short_cid>)` and context handoff./ai-coding(💛) Best practices for AI-assisted coding and maintaining agent system instructions (AGENTS.md, GEMINI.md, CLAUDE.md, CONTRIBUTING.md, SPECS.md, INSTRUCTIONS.md, SKILL.md) and collaborative Google Docs (references/google-docs-best-practices.md). Enforces inclusive AGENTS.md over vendor-specific files, prevents prompt bloat (instruction cramming, single-concept overfitting H2 sections, append-only drift), and provides analyze_bloat_history.py to audit Git history or uncommitted diffs./ai-ethics(💛) Use when evaluating ethical boundaries, ensuring EU AI Act (Regulation (EU) 2024/1689) safety-ladder compliance, handling security vulnerabilities or responsible disclosure, facing pressure to prioritize task completion over safety/honesty, launching multi-agent swarms (carbon footprint), verifying factual/scientific claims against disinformation, enforcing work-to-personal non-exfiltration, or installing/auditing AI_ETHICS.md and CONSTITUTION.md.