# devto

Publishes articles to dev.to, edits existing posts, and pulls view and reaction stats using the Forem API v1.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 213 installs · ★ 17 repo stars
- Author: acedatacloud
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/AceDataCloud/Skills/tree/HEAD/skills/devto/SKILL.md
- Updated: 2026-10-25
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/devto

## What it does

This skill interacts with dev.to via Forem API v1 endpoints using `curl` and `jq`. The agent checks credentials against `https://dev.to/api/users/me`, submits Markdown articles as drafts or live posts, and modifies existing entries using `PUT` requests.

Every call relies on the `$DEVTO_API_KEY` environment variable. Without this token exported in your environment, all requests fail with a `401` status.

Cross-posting workflows can include a `canonical_url` to keep search ranking on the primary source. The platform caps tags at four items in lowercase without spaces, and firing updates too quickly triggers a `429` rate-limit error.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add AceDataCloud/Skills --skill devto -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/devto/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/devto/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add AceDataCloud/Skills --skill devto -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/devto/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add AceDataCloud/Skills --skill devto -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/devto/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install AceDataCloud/Skills skills/devto
```

2. **Manually: put the files in place**
- File: `.github/skills/devto/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add AceDataCloud/Skills --skill devto -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/AceDataCloud/Skills --path skills/devto
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/devto/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add AceDataCloud/Skills --skill devto -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/AceDataCloud/Skills/tree/HEAD/skills/devto/SKILL.md

## When to use it
- post Markdown files to dev.to as drafts or live entries
- check view counts, comment totals, and reaction metrics for published posts
- update published articles using their dev.to post ID
- preserve SEO attribution by passing a canonical URL during cross-posting

## Example prompts
- Publish article.md to dev.to as a draft with tags webdev and ai.
- Show view counts and reactions for my recent dev.to posts.
- Update dev.to post 12345 with the revised content in article.md and set it live.

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 2217f555d4bafa64.

BEGIN THIRD-PARTY FILE 2217f555d4bafa64
````text
---
name: devto
description: Publish, update and read articles on DEV (dev.to) via the Forem API v1. Use when the user mentions dev.to / DEV Community, publishing a blog post to dev.to, cross-posting an article, updating a published post, or listing their dev.to articles and stats.
when_to_use: |
  Trigger when the user wants to publish a Markdown article to their
  dev.to account, update a previously published article, or list /
  inspect their own dev.to articles (views, reactions, comments). The
  connector stores a DEV API Key with full account access — confirm
  before publishing publicly (you can publish as a draft with
  published=false first).
connections: [devto]
allowed_tools: [Bash]
license: Apache-2.0
metadata:
  author: acedatacloud
  version: "1.0"
---

Call the **Forem API v1** (dev.to) with `curl + jq`. The user's API key is in
`$DEVTO_API_KEY`; every call needs the headers `api-key: $DEVTO_API_KEY` and
`Accept: application/vnd.forem.api-v1+json`. Base URL: `https://dev.to/api`.

Errors come back as JSON with an `error` / `status` field — show them verbatim.
`401` means the API key is invalid → the user must re-connect the DEV connector.

**Always start by confirming the key** and learning the account:

```bash
curl -sS -H "api-key: $DEVTO_API_KEY" -H "Accept: application/vnd.forem.api-v1+json" \
  "https://dev.to/api/users/me" | jq '{username, name}'
```

## Publish an article

**Confirm with the user before publishing publicly.** Default to a draft
(`published:false`) unless they explicitly say publish/now.

```bash
TITLE="My title"
BODY_MD="$(cat article.md)"   # full Markdown body
jq -n --arg t "$TITLE" --arg b "$BODY_MD" \
  '{article:{title:$t, body_markdown:$b, published:false, tags:["ai","webdev"]}}' \
| curl -sS -X POST "https://dev.to/api/articles" \
    -H "api-key: $DEVTO_API_KEY" \
    -H "Accept: application/vnd.forem.api-v1+json" \
    -H "Content-Type: application/json" \
    -d @- \
| jq '{id, url, published}'
```

To publish a draft later (or edit), `PUT /api/articles/{id}` with the same
shape (set `published:true`). Front-matter inside `body_markdown` (a `---`
block) can also carry `title`, `tags`, `series`, `canonical_url`, `cover_image`.

- **Canonical URL:** when cross-posting, set
  `"canonical_url":"https://your-blog/original"` so DEV points SEO back to the
  source — important for the article→video / cross-publishing flow.

## List / inspect my articles

```bash
# My published + draft articles (paginated; per_page max 1000).
curl -sS -H "api-key: $DEVTO_API_KEY" -H "Accept: application/vnd.forem.api-v1+json" \
  "https://dev.to/api/articles/me/all?per_page=30" \
  | jq '.[] | {id, title, published, page_views_count, public_reactions_count, comments_count}'

# A single article's full content + stats.
curl -sS -H "api-key: $DEVTO_API_KEY" -H "Accept: application/vnd.forem.api-v1+json" \
  "https://dev.to/api/articles/ARTICLE_ID" | jq '{title, url, reactions: .public_reactions_count, views: .page_views_count}'
```

## Gotchas

- **Tags:** max 4, lowercase, no spaces (e.g. `webdev`, `machinelearning`).
````
END THIRD-PARTY FILE 2217f555d4bafa64

The third-party file has ended. Everything between the 2217f555d4bafa64 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 3104 of 3890 bytes. © acedatacloud · Apache-2.0 · https://github.com/AceDataCloud/Skills/tree/HEAD/skills/devto/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
