You wrote the post on your own blog. Now it should also live on Dev.to, where developers actually browse, with a link back so Google credits the original. Doing that by hand means pasting Markdown, re-adding the cover, retyping four tags and remembering the canonical URL field. It takes ten minutes, so it gets skipped, and the post sits in one place.
This recipe gives that chore to Claude Code. Once a week it reads your blog’s feed, finds the newest post you haven’t cross-posted, and creates it on Dev.to as a draft with the canonical URL, tags and cover already set. You open the draft, skim it, and either click Publish on Dev.to or tell the AI to.
When you’re done you’ll have:
- a
devtofolder with adevto-log.mdthat records every post the AI has handled, so nothing is posted twice, - a weekly scheduled task in Claude Code Desktop that creates the draft,
- a one-line switch to let it publish directly once you trust it.
Setup takes about 20 minutes, most of it signing in and one supervised first run. There is no Dev.to API key to generate and no CI secret to store: posting goes through the Dev.to session you’re already signed in to on your own computer.
Who this fits: a developer or technical writer with their own blog (with an RSS or Atom feed) who wants a steady Dev.to presence, on a computer that is on and awake at the scheduled time. Local scheduled tasks only fire while the Claude Desktop app is open and the computer is awake, per Anthropic’s docs.
Read this first: Dev.to’s rules for AI-assisted posts
Dev.to’s guidelines for AI-assisted articles (last updated April 8, 2024) shape how this recipe is built:
- Articles written or assisted by AI must say so, for example with the
#ABotWroteThistag or a line in the text. - The author must be able to stand behind the content and check it for accuracy.
- Bots and AI shouldn’t write comments on Dev.to.
So this recipe is for posts you wrote yourself. The AI is the logistics: it reformats and posts your article and sets the metadata. It does not write the article and it does not comment. If an AI did draft part of a post, disclose it, as the guidelines ask. The draft-first setup also exists for this reason: a person looks at every post before it’s live.
What the Dev.to command can do
I checked the PublishPort command set (publishport-opencli 1.0.40) so you don’t plan around something that isn’t there:
| Job | Supported | Worth knowing |
|---|---|---|
| Create an article from Markdown | Yes | A new article is saved as a draft unless the command is told to publish it |
| Tags | Yes | Up to 4, lowercase letters and digits only (no hyphens or spaces) |
| Cover image | Yes | Passed as an image URL |
| Canonical URL | Yes | Checked before submitting: Dev.to won’t let two articles on one account share a canonical URL, and the command refuses with the existing article’s link instead of creating a duplicate |
| Series, description | Yes | Optional |
| Update or unpublish an existing article | Yes | By article id; only the fields you pass are changed |
| Per-article views, reactions, comments | Yes | A stats command lists them, including drafts |
| Schedule for a future time | No | There is no schedule flag; the weekly task is the scheduler |
Step 0: Get three things ready
1. The PublishPort desktop app, signed in to Dev.to. Install it from the download page, open Platform accounts, click Sign in next to Dev.to, sign in the way you normally do in the window that opens, then click I’ve signed in (walkthrough).
2. The Claude desktop app with the Code tab. Local scheduled tasks need Claude Desktop 1.1.5368 or later (docs). The first run can be in the CLI, but the scheduled task itself is created in Desktop.
3. Node.js, an empty folder, and a feed URL. The publishing command runs on Node.js: check with node -v, or install the LTS release from nodejs.org. Create a folder named devto. Find your blog’s feed address (commonly /rss.xml, /feed or /atom.xml) and make sure each feed entry carries the full post or that the post URL opens a normal page. If your posts have a cover image, make sure it is a public image URL.
Step 1: Supervised first run
Open the Code tab, start a session in the devto folder, and paste the recipe, with your real feed address in place of YOURBLOG.com/rss.xml:
Read https://www.publishport.app/skill.md and follow it to set up PublishPort for me, then check that Dev.to is connected, read the feed at https://YOURBLOG.com/rss.xml, take my newest post that isn't in devto-log.md, and create it on Dev.to as a draft (not published) with the canonical URL set to the original post, up to four tags, and the post's cover image; show me the draft link and don't publish it. After that, help me turn it into a weekly Claude Code Desktop scheduled task.
The skill file is a short public instruction sheet. It tells the AI how to install itself, ask you for one authorization click, check which accounts your computer has connected, publish, and confirm the result. Every AI you authorize is listed on your account page, where you can revoke it.
What happens:
- Claude installs the PublishPort skill and runs the login. It gives you an authorization link and a confirmation code. Open the link, sign in or create a PublishPort account, check that the code matches, click Authorize. The link lasts 10 minutes; ask for a new one if it expires.
- It checks your computer and tells you whether Dev.to shows as signed in. If not, sign in again under Platform accounts and ask it to re-check.
- It reads the feed, picks the newest post, and shows you what it plans to create: title, tags, cover, canonical URL. Say yes.
- It creates the draft and gives you a link. Open it in Dev.to, check the code blocks, headings and images, and fix anything the Markdown conversion got wrong.
- It creates
devto-log.mdwith the post URL, the Dev.to article id and the date.
If you’re happy, tell it “publish that draft”. It updates the same article by id, so you don’t get a second copy.
Step 2: Create the weekly task
Claude will offer to create the task from the recipe; check what it made against the steps below. To build it by hand, in the Code tab click Scheduled, then New task. If a menu opens, choose Set up manually. Turn on Only on this computer (under Advanced settings), pick the devto folder, and set the schedule in the Trigger card: Weekly, a weekday morning of your choice (steps in Anthropic’s docs).
Name it devto-crosspost and use this prompt:
This is a pre-approved task. Don't ask me to confirm.
Mode: DRAFT (change this word to LIVE once I say I trust it)
1. Read devto-log.md, then read the feed at https://YOURBLOG.com/rss.xml. Find the newest post whose URL is not in the log. If there isn't one, stop and say "nothing new".
2. Only handle posts from the last 14 days. Older ones: skip and tell me.
3. Open that post and turn it into Markdown for Dev.to: keep headings, code blocks and links; convert relative image links to absolute URLs; don't rewrite the text.
4. Choose up to 4 tags (lowercase letters and digits only) from the post's own topics. Use the post's cover image as the cover.
5. Check publishport guide devto for the live options. Create the article through PublishPort with the canonical URL set to the original post. In DRAFT mode do not publish it; in LIVE mode publish it.
6. If the command fails or times out, do not run it again. Look at my Dev.to articles first (a draft counts) and retry once only if the article is not there. If it refuses because of a duplicate canonical URL, record the existing article in the log and stop.
7. Append date, original URL, Dev.to article id and link to devto-log.md, and give me a one-line summary with the link.
Never write comments on Dev.to. Never change the article's text beyond formatting.
Permission modes matter here. A task in Manual mode stalls on any tool it hasn’t been approved for. Anthropic’s tip: click Run now right after creating the task, watch for prompts, and choose “always allow” for the PublishPort commands. Later runs reuse those approvals, which you can review or revoke from the task’s Always allowed panel.
Step 3: Keep a weekly glance, then flip the switch
For the first two or three weeks, leave the mode on DRAFT and open the draft each time. You are checking three things: code blocks survived, images load, and the four tags make sense for Dev.to readers. When three drafts in a row needed no edits, change DRAFT to LIVE in the task prompt (the task’s Edit form).
Once a month, ask Claude: “Read my Dev.to stats and tell me which cross-posts got the most reactions and comments, and what they have in common.” The stats command includes views, reactions and comments per article, so the answer comes from your numbers. Use it to pick what to write next, not to change old posts.
Why the canonical URL is the part worth automating
When the same article exists on your blog and on Dev.to, search engines have to pick one. The canonical URL tells them yours is the original. It is one optional field that people forget, and forgetting it is how a cross-post ends up outranking the original. Putting it in the standing prompt means it is set every time, and the command’s duplicate check means a re-run can’t quietly create a second copy.
When it won’t run
- Nothing was created and there’s no run in History: the Claude desktop app was closed or the computer was asleep. If the app was only asleep, Desktop starts one catch-up run for the most recent missed time when it wakes. In Settings > This computer > System, turn on Keep computer awake if you want to avoid sleep.
- The run is waiting on a prompt: open it from History, approve, then choose always allow.
- The AI says no device is online: the PublishPort app isn’t running or is signed out. Start it.
- Dev.to reports you’re signed out: sessions expire. Sign in again under Platform accounts.
- “Too many tags” or “Invalid tag”: Dev.to allows four tags, lowercase letters and digits.
machine-learninghas to becomemachinelearning. - A brand-new Dev.to account: Forem applies tighter rate limits to accounts in their first days (admin docs), so don’t backfill a pile of old posts. This recipe deliberately handles one post per run.
Taking it further
The same pattern works for other writing platforms: see how to automate Dev.to posts for what Dev.to’s own API does and doesn’t give you, or the Substack recipe for a weekly newsletter. If you’d rather announce each post on social media the same week, the weekly LinkedIn cadence uses the same two-task pattern.
The free plan covers setting all of this up; plan limits are on the pricing page.
