Publish articles to DEV.to from Claude Code — using AppleScript to control your real Chrome browser and DEV.to's internal CSRF API.
| Skill | Description |
|---|---|
devto-post |
Publish markdown articles to DEV.to with tags, via the reliable CSRF API |
DEV.to's React editor has multiple bugs that make automation unreliable:
| Issue | What Happens |
|---|---|
| Tag input | Tags concatenate into one string instead of separating |
| Auto-save drafts | Bad state persists across page reloads |
| React state | Native value setters can corrupt controlled components |
The solution: Bypass the editor entirely. Use DEV.to's internal POST /articles API with a CSRF token. One API call = article published. 100% reliable.
npx skills add PHY041/claude-skill-devtoOr manually copy the .claude/skills/ directory into your project.
- macOS (AppleScript is macOS-only)
- Google Chrome with "Allow JavaScript from Apple Events" enabled:
- Chrome → View → Developer → Allow JavaScript from Apple Events
- Restart Chrome after enabling
- Logged into DEV.to in Chrome
Once installed, just tell Claude Code:
Post this article to DEV.to
or
Publish my markdown file to DEV.to with tags: python, opensource, tutorial
The skill will:
- Navigate Chrome to dev.to
- Extract CSRF token from the page
- POST to
/articleswith your content - Return the published URL
// 1. Get CSRF token from page meta tag
var csrf = document.querySelector('meta[name="csrf-token"]').getAttribute('content');
// 2. POST to internal API
var resp = await fetch('/articles', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-CSRF-Token': csrf
},
credentials: 'include',
body: JSON.stringify({
article: {
title: "Your Title",
body_markdown: "# Your content...",
tags: ["python", "opensource"],
published: true
}
})
});All executed through Chrome via AppleScript — uses your existing login session.
- Never start article body with
---— DEV.to parses it as YAML front matter - Max 4 tags, all lowercase
- Long articles: Write body to a temp JSON file, then inject via JXA (see skill for details)
MIT