闲社服务运行正常AI智能体自动化平台
w

WordPress OAuth 技能

技能标识:wordpress-oauth

Start and complete WordPress.com OAuth and publish posts through the WordPress.com REST API. Use when you need to generate an authorization URL, exchange callback code for an access token, validate token health, or publish draft/published posts to a WordPress.com or Jetpack-connected site.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

WordPress OAuth 技能

WordPress OAuth 技能

使用此技能运行人工参与的OAuth流程,并通过存储的Bearer令牌发布文章。

技能文件

  • - 脚本:{baseDir}/wpoauthskill.py
  • OAuth状态存储:{baseDir}/oauth_state.json
  • 凭证存储:{baseDir}/credentials.json

该技能将状态和凭证存储在本技能目录的文件中。

命令

使用Python 3运行脚本:

bash
python3 {baseDir}/wpoauthskill.py --help

1) 开始OAuth

bash
python3 {baseDir}/wpoauthskill.py begin-oauth \
--client-id $WPCOMCLIENTID \
--redirect-uri $WPCOMREDIRECTURI \
--scope posts media \
--blog $WPCOM_SITE

返回 auth_url 和 state。打开URL,批准访问,然后复制回调URL。

2) 交换令牌

bash
python3 {baseDir}/wpoauthskill.py exchange-token \
--client-id $WPCOMCLIENTID \
--client-secret $WPCOMCLIENTSECRET \
--redirect-uri $WPCOMREDIRECTURI \
--callback-url https://example/callback?code=...&state=...

验证CSRF state,将授权码交换为令牌,并将凭证写入 {baseDir}/credentials.json。

3) 令牌信息

bash
python3 {baseDir}/wpoauthskill.py token-info --client-id $WPCOMCLIENTID

通过WordPress令牌信息端点检查令牌有效性。

4) 发布文章

bash
python3 {baseDir}/wpoauthskill.py publish-post \
--site $WPCOM_SITE \
--title 我的文章 \
--content

来自OpenClaw的问候

\
--status draft

使用存储的令牌通过 POST /rest/v1.1/sites/$site/posts/new 发布文章。

推荐流程

  1. 1. 运行 begin-oauth。
  2. 在浏览器中打开 auth_url 并授权。
  3. 将回调URL粘贴到 exchange-token。
  4. 可选运行 token-info。
  5. 运行 publish-post。

安全说明

  • - 切勿分享 credentials.json 或客户端密钥。
  • 首次测试文章保持为 draft(草稿)状态。
  • 如果回调状态失败或授权码过期,请重新运行 begin-oauth。

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 wordpress-oauth-1776066739 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 wordpress-oauth-1776066739 技能

通过命令行安装

skillhub install wordpress-oauth-1776066739

下载

⬇ 下载 wordpress-oauth v1.0.0(免费)

文件大小: 4.74 KB | 发布时间: 2026-4-15 15:00

v1.0.0 最新 2026-4-15 15:00
Initial release of wordpress-oauth skill.

- Enables human-in-the-loop OAuth flow for WordPress.com and Jetpack-connected sites.
- Supports generating authorization URLs, exchanging callback codes for access tokens, and validating tokens.
- Allows publishing draft or published posts through the WordPress.com REST API.
- Stores OAuth state and credentials securely within the skill directory.
- Provides CLI commands for each step: begin-oauth, exchange-token, token-info, and publish-post.
返回顶部