Token导航 LogoToken导航

Agent Skill · 开发

forem-api(forem API 文档)

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。

forem-api 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证为 MIT,第三方扫描有提醒项,按安装量在开发类的 21,746 个 Skill 里排第 15,843。

总安装 559周安装 24GitHub Stars 31下载 196核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:forem-api(forem API 文档)
来源仓库:https://github.com/rawveg/skillsforge-marketplace
仓库路径:skills/forem-api
安装命令:
npx skills add https://github.com/rawveg/skillsforge-marketplace --skill forem-api
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/rawveg/skillsforge-marketplace --skill forem-api

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

forem-api 用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。适用于前后端联调、服务对接或 OpenAPI 规范生成,帮助 Agent 梳理 endpoint 和字段命名。使用时需确认真实业务语义和鉴权方式,避免凭空补充字段。生成接口文档时应基于现有代码或样例提取事实,确保准确性。

forem-api 属于开发类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/forem-api

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/rawveg/skillsforge-marketplace --skill forem-a…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

forem-api 怎么安装?

在终端执行 npx skills add https://github.com/rawveg/skillsforge-marketplace --skill forem-api。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

forem-api 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

forem-api 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

forem-api 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

forem-api 用的人多吗?

公开数据是累计安装 559 次,近一周安装 24 次,下载 196 次,GitHub 31 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

forem-api 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
forem-api

forem API 文档 · 本页

55931接触敏感数据MIT有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Forem API Skill

Comprehensive assistance with Forem API (v1) development. Forem is the platform that powers DEV.to and other online communities. This skill provides guidance on interacting with articles, users, comments, organizations, tags, and more through the Forem REST API.

When to Use This Skill

This skill should be triggered when:

  • Building integrations with Forem-based platforms (DEV.to, Forem communities)
  • Publishing or managing articles programmatically via Forem API
  • Retrieving user data, comments, or organization information from Forem
  • Implementing authentication with Forem API keys
  • Working with tags, followers, reading lists, or reactions on Forem
  • Debugging Forem API requests or understanding response formats
  • Learning Forem API endpoints and best practices
  • Managing display ads or podcast episodes through the API

Quick Reference

Authentication Setup

Set up authentication headers for Forem API v1 requests:

# Required headers for authenticated requests
curl -X GET "https://dev.to/api/articles/me" \
  -H "api-key: YOUR_API_KEY" \
  -H "accept: application/vnd.forem.api-v1+json"

Key points:

  • Generate API key at dev.to/settings/extensions
  • Use api-key header (not Authorization)
  • Include accept: application/vnd.forem.api-v1+json header

Get Authenticated User Info

# Retrieve current user's profile information
curl -X GET "https://dev.to/api/users/me" \
  -H "api-key: YOUR_API_KEY" \
  -H "accept: application/vnd.forem.api-v1+json"

Response:

{
  "type_of": "user",
  "id": 1431,
  "username": "username480",
  "name": "User Name",
  "twitter_username": "twitter_handle",
  "github_username": "github_handle",
  "joined_at": "Apr 14, 2023",
  "profile_image": "/uploads/user/profile_image/..."
}

Publish a New Article

// Create and publish an article with tags
const response = await fetch('https://dev.to/api/articles', {
  method: 'POST',
  headers: {
    'api-key': 'YOUR_API_KEY',
    'accept': 'application/vnd.forem.api-v1+json',
    'content-type': 'application/json'
  },
  body: JSON.stringify({
    article: {
      title: "Getting Started with Forem API",
      description: "Learn how to integrate with Forem",
      body_markdown: "## Introduction\n\n**Forem** is amazing!",
      published: true,
      tags: ["webdev", "api", "tutorial"]
    }
  })
});

const data = await response.json();
console.log(data.url); // https://dev.to/username/getting-started-...

Returns: Article object with id, slug, path, url, and published_timestamp

Get Published Articles with Filters

import requests

# Get JavaScript articles from the last 7 days
params = {
    'tag': 'javascript',
    'top': 7,
    'per_page': 10,
    'page': 1
}

response = requests.get(
    'https://dev.to/api/articles',
    params=params,
    headers={'accept': 'application/vnd.forem.api-v1+json'}
)

articles = response.json()
for article in articles:
    print(f"{article['title']} by {article['user']['name']}")

Query parameters:

  • tag - Filter by single tag
  • tags - Multiple tags (comma-separated)
  • username - Filter by author
  • top - Days since publication
  • per_page - Results per page (30-1000)
  • page - Page number for pagination

Get User's Draft Articles

# Retrieve your unpublished articles
curl -X GET "https://dev.to/api/articles/me/unpublished" \
  -H "api-key: YOUR_API_KEY" \
  -H "accept: application/vnd.forem.api-v1+json"

Other endpoints:

  • /articles/me - All your articles
  • /articles/me/published - Published only
  • /articles/me/unpublished - Drafts only
  • /articles/me/all - Everything including hidden

Update an Existing Article

PUT /articles/{id}
Content-Type: application/json
Headers: api-key, accept

{
  "article": {
    "title": "Updated Title",
    "body_markdown": "Updated content with **bold** text",
    "published": true
  }
}

Get Comments for an Article

# Get comments by article ID
response = requests.get(
    'https://dev.to/api/comments',
    params={'a_id': 123456},
    headers={'accept': 'application/vnd.forem.api-v1+json'}
)

comments = response.json()
for comment in comments:
    print(f"{comment['user']['name']}: {comment['body_html']}")

Query parameters:

  • a_id - Article ID
  • p_id - Podcast episode ID

Create a Reaction (Like)

# Add a "like" reaction to an article
curl -X POST "https://dev.to/api/reactions" \
  -H "api-key: YOUR_API_KEY" \
  -H "accept: application/vnd.forem.api-v1+json" \
  -H "content-type: application/json" \
  -d '{
    "category": "like",
    "reactable_id": 123456,
    "reactable_type": "Article"
  }'

Categories: like, unicorn, readinglist, thinking

Get Organization Details

# Fetch organization information and articles
curl -X GET "https://dev.to/api/organizations/forem" \
  -H "accept: application/vnd.forem.api-v1+json"

# Get organization's published articles
curl -X GET "https://dev.to/api/organizations/forem/articles" \
  -H "accept: application/vnd.forem.api-v1+json"

Get Available Tags

// Fetch popular tags from the platform
const response = await fetch('https://dev.to/api/tags', {
  headers: { 'accept': 'application/vnd.forem.api-v1+json' }
});

const tags = await response.json();
tags.forEach(tag => {
  console.log(`${tag.name} - ${tag.bg_color_hex}`);
});

Key Concepts

API Versions

  • API v1 - Current recommended version (application/vnd.forem.api-v1+json)
  • API v0 - Deprecated legacy version

Authentication

  • API Key Authentication - Required for most write operations
  • Public Endpoints - Some GET endpoints work without authentication
  • CORS Policy - Disabled on authenticated endpoints, open on public endpoints

Response Formats

All responses use JSON format with consistent structure:

  • type_of - Resource type (article, user, comment, etc.)
  • id - Unique identifier
  • Standard fields based on resource type

Rate Limiting

Follow best practices to avoid rate limits:

  • Use pagination for large datasets
  • Cache responses when appropriate
  • Implement exponential backoff for retries

Pagination

Most list endpoints support pagination:

  • page - Page number (starts at 1)
  • per_page - Items per page (typically 30-1000, default 30)

Common Status Codes

  • 200 - Success (GET, PUT)
  • 201 - Created (POST)
  • 204 - No Content (DELETE, unpublish)
  • 401 - Unauthorized (invalid API key)
  • 404 - Not Found
  • 422 - Unprocessable Entity (validation errors)

Reference Files

This skill includes comprehensive documentation in references/:

  • api.md - Complete Forem API v1 reference documentation

Use view or read the reference file directly when you need:

  • Detailed endpoint specifications
  • Complete parameter lists
  • Response schema details
  • Additional code examples

Working with This Skill

For Beginners

  1. Start with authentication - Generate your API key at dev.to/settings/extensions
  2. Try read-only endpoints first - Use GET /articles or GET /users/{username} without auth
  3. Test with curl - The examples above work directly in your terminal
  4. Use the Quick Reference - Start with common patterns like getting articles or user info

For Building Integrations

  1. Understand pagination - Most lists require pagination for large datasets
  2. Handle errors gracefully - Check status codes and response messages
  3. Use proper headers - Always include both api-key and accept headers
  4. Test in development - Use a test account before production deployment

For Content Management

  1. Publishing workflow - Create drafts (published: false), review, then update to publish
  2. Bulk operations - Use pagination to process all articles
  3. Tag management - Fetch available tags before creating articles
  4. Markdown support - Use body_markdown field with full Markdown syntax

For Advanced Users

  1. Admin operations - Unpublish, suspend, invite (requires appropriate permissions)
  2. Display ads - Create and manage promotional content
  3. Organization management - Handle multi-author accounts
  4. Webhook integration - Combine with webhooks for real-time updates

Common Endpoints Summary

Articles

  • POST /articles - Publish new article
  • GET /articles - Get published articles (paginated)
  • GET /articles/{id} - Get specific article
  • PUT /articles/{id} - Update article
  • GET /articles/me - Your articles
  • PUT /articles/{id}/unpublish - Unpublish article

Users

  • GET /users/me - Current user info
  • GET /users/{id} - User by ID/username

Comments

  • GET /comments - Get comments by article/episode
  • GET /comments/{id} - Specific comment with descendants

Organizations

  • GET /organizations/{username} - Organization details
  • GET /organizations/{username}/articles - Organization's articles
  • GET /organizations/{username}/users - Organization members

Tags & Follows

  • GET /tags - Available tags
  • GET /follows/tags - User's followed tags
  • GET /followers/users - User's followers

Engagement

  • POST /reactions - Create reaction
  • POST /reactions/toggle - Toggle reaction
  • GET /readinglist - User's reading list

Resources

Official Documentation

Getting Help

Notes

  • This skill covers Forem API v1 (current stable version)
  • API keys are generated at dev.to/settings/extensions or your Forem instance settings
  • Most endpoints require the application/vnd.forem.api-v1+json accept header
  • Public endpoints (like listing articles) work without authentication
  • Admin endpoints require appropriate user permissions
  • Rate limits apply - implement proper pagination and caching

Best Practices

  1. Always include both required headers (api-key and accept)
  2. Use pagination for large result sets (don't fetch 1000 articles at once)
  3. Handle errors gracefully with proper status code checking
  4. Cache responses when appropriate to reduce API calls
  5. Use Markdown formatting in body_markdown for rich content
  6. Test with a development account before production use
  7. Respect rate limits and implement exponential backoff
  8. Keep API keys secure - never commit them to version control

平台分布

Claude Code

26.99%
按下载量换算53

Antigravity

21.52%
按下载量换算42

windsurf

18.76%
按下载量换算37

trae

12.97%
按下载量换算25

Codex

6.94%
按下载量换算14

OpenCode

3.55%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills