Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 3.5.0 - 2026-06-01

Claude Code support.

- Added `INSTALL.sh` to install the skill into `~/.claude/skills/wordpress-api-pro/` for [Claude Code](https://claude.ai/download), alongside the existing OpenClaw path.
- Added `wordpress-api-pro/requirements.txt` (`requests`) — needed only by the ACF / SEO / JetEngine / plugin-detection scripts; the core scripts remain stdlib-only.
- Documented the Claude Code workflow in `README.md` and `SKILL.md`, including local-dev sites and pairing with the Elementor MCP kit.
- Packaging: shipped `INSTALL.sh` + `requirements.txt`, bumped version to `3.5.0`.

## 3.4.0 - 2026-05-05

Security and packaging cleanup for ClawHub publication.
Expand Down
93 changes: 93 additions & 0 deletions INSTALL.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
#!/usr/bin/env bash
# =============================================================================
# WordPress API Pro — Claude Code Installer (Mac / Linux)
#
# Copies the skill payload into ~/.claude/skills/wordpress-api-pro/ so Claude
# Code discovers it automatically. The same payload also works as an OpenClaw
# skill (see README) — this installer only wires up the Claude Code path.
#
# Safe to re-run (asks before overwriting an existing install).
# =============================================================================

set -euo pipefail

BOLD=$'\033[1m'; GREEN=$'\033[32m'; CYAN=$'\033[36m'; YELLOW=$'\033[33m'
RED=$'\033[31m'; DIM=$'\033[2m'; RESET=$'\033[0m'

ok() { printf " ${GREEN}✓${RESET} %s\n" "$*"; }
warn() { printf " ${YELLOW}⚠${RESET} %s\n" "$*"; }
fail() { printf " ${RED}✗${RESET} %s\n" "$*"; }
step() { printf "\n${BOLD}${CYAN}▸ %s${RESET}\n" "$*"; }

HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SRC="$HERE/wordpress-api-pro"

[ -d "$SRC" ] || { fail "Cannot find $SRC — run this from the repo root."; exit 1; }
[ -f "$SRC/SKILL.md" ] || { fail "Missing SKILL.md in $SRC."; exit 1; }

cat <<'BANNER'

╭───────────────────────────────────────────────╮
│ WordPress API Pro — Claude Code Installer │
│ ───────────────────────────────────── │
│ Installs the skill into ~/.claude/skills/ │
│ so Claude Code can find and run it. │
╰───────────────────────────────────────────────╯

BANNER

DEST="$HOME/.claude/skills/wordpress-api-pro"

step "Installing to $DEST"
if [ -d "$DEST" ]; then
warn "An install already exists at $DEST"
printf " Overwrite? [y/N] "
read -r ans
if [[ ! "$ans" =~ ^[Yy]$ ]]; then
warn "Left existing install untouched. Nothing changed."
exit 0
fi
rm -rf "$DEST"
fi

mkdir -p "$DEST"
# Copy the payload contents (SKILL.md, scripts/, references/, config/, wp.sh,
# requirements.txt) to the skill root so relative `scripts/*.py` paths resolve.
cp -R "$SRC"/. "$DEST"/
chmod +x "$DEST/wp.sh" 2>/dev/null || true
ok "Installed skill payload"

step "Python dependency (optional)"
printf " ${DIM}The ACF / SEO / JetEngine / plugin-detection scripts need 'requests'.\n The core post/page/media/WooCommerce/batch scripts use the stdlib only.${RESET}\n"
if python3 -c "import requests" >/dev/null 2>&1; then
ok "'requests' already available"
else
warn "'requests' not installed. Install it when you need the plugin scripts:"
printf " ${CYAN}python3 -m pip install -r \"$DEST/requirements.txt\"${RESET}\n"
printf " ${DIM}(or use a venv: python3 -m venv .venv && .venv/bin/pip install -r requirements.txt)${RESET}\n"
fi

cat <<EOF

${BOLD}${GREEN}✓ Install complete${RESET}

${BOLD}Installed at:${RESET}
${DIM}$DEST/SKILL.md${RESET}

${BOLD}Next steps:${RESET}

1. Restart Claude Code so it picks up the new skill.

2. Provide credentials for the target site (one of):
${CYAN}export WP_URL="https://your-site.example"${RESET}
${CYAN}export WP_USERNAME="wp-api-user"${RESET}
${CYAN}export WP_APP_PASSWORD="xxxx xxxx xxxx xxxx xxxx xxxx"${RESET}
${DIM}— or set up config/sites.json for multi-site (see SKILL.md).${RESET}

3. Ask Claude to use it, e.g.:
${DIM}"use wordpress-api-pro to list draft posts on my site"${RESET}
${DIM}"upload this image to the media library and set it as featured"${RESET}

${BOLD}Safety:${RESET} writes default to drafts / dry-run. Review before --execute.

EOF
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ClawHub package directory: `wordpress-api-pro/`.

## Version

Current version: **3.4.0**
Current version: **3.5.0**

## Installation

Expand All @@ -49,6 +49,20 @@ openclaw skills install wordpress-api-pro
cp -R wordpress-api-pro ~/.openclaw/workspace/skills/wordpress-api-pro
```

### Via Claude Code

The skill also runs in [Claude Code](https://claude.ai/download). The installer copies the payload into `~/.claude/skills/` so Claude Code discovers it automatically:

```bash
git clone https://github.com/Digitizers/wordpress-api-pro.git
cd wordpress-api-pro
bash INSTALL.sh
```

Then restart Claude Code, export `WP_URL` / `WP_USERNAME` / `WP_APP_PASSWORD` (or set up `config/sites.json`), and ask Claude to use it. The ACF / SEO / JetEngine / plugin-detection scripts need `requests` (`pip install -r requirements.txt`); the core post/page/media/WooCommerce/batch scripts use the Python stdlib only.

> Pairs well with the [Elementor MCP kit](https://github.com/Digitizers/claude-elementor-pro): build pages with the MCP, then handle media uploads, SEO meta, custom fields, and WooCommerce with these scripts.

## Quick Start

### Option A: Multi-Site Setup — recommended for 2+ sites ⭐
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wordpress-api-pro",
"version": "3.4.0",
"version": "3.5.0",
"description": "WordPress REST API integration skill for OpenClaw - manage posts, pages, media, WooCommerce, Elementor, and metadata with explicit safety boundaries",
"private": true,
"main": "wordpress-api-pro/SKILL.md",
Expand Down Expand Up @@ -53,6 +53,8 @@
"wordpress-api-pro/references/**/*.md",
"wordpress-api-pro/scripts/**/*.py",
"wordpress-api-pro/wp.sh",
"wordpress-api-pro/requirements.txt",
"INSTALL.sh",
"README.md",
"CHANGELOG.md",
"LICENSE.txt"
Expand Down
13 changes: 11 additions & 2 deletions wordpress-api-pro/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: wordpress-api-pro
version: 3.4.0
version: 3.5.0
license: MIT-0
description: |
WordPress REST API integration for managing posts, pages, media, WooCommerce products, Elementor content, SEO meta, ACF, and JetEngine fields.
Expand All @@ -11,7 +11,16 @@ description: |

# WordPress API Pro

Manage WordPress sites through the REST API from an OpenClaw skill.
Manage WordPress sites through the REST API. Runs as an OpenClaw skill or in Claude Code.

## Running in Claude Code

This skill runs the `scripts/*.py` directly. From the skill directory (`~/.claude/skills/wordpress-api-pro/` after `bash INSTALL.sh`):

- **Auth:** export `WP_URL` / `WP_USERNAME` / `WP_APP_PASSWORD`, or use `config/sites.json` for multi-site.
- **Dependencies:** the ACF / SEO / JetEngine / plugin-detection scripts need `requests` (`python3 -m pip install -r requirements.txt`, ideally in a venv). The core post/page/media/WooCommerce/batch scripts use the stdlib only.
- **Local dev sites** (e.g. `http://site.local`) work — the private/HTTP restriction applies only to `--allow-remote-url` media downloads, not the WP API base URL.
- **Pairs with the Elementor MCP kit** (`claude-elementor-pro`): build page structure with the MCP, then do media uploads, SEO meta, custom fields, and WooCommerce here.

## Safety rules

Expand Down
5 changes: 5 additions & 0 deletions wordpress-api-pro/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Runtime dependency for the plugin-integration scripts only
# (acf_fields.py, detect_plugins.py, jetengine_fields.py, seo_meta.py).
# The core post/page/media/WooCommerce/batch scripts use the Python stdlib
# and need nothing here.
requests>=2.25.0
Loading