WordPress Publisher Skill

Publish content directly to WordPress sites via REST API with full Gutenberg block support. Create and publish posts/pages, auto-load and select categories from website, generate SEO-optimized tags, preview articles before publishing, and generate Gutenberg blocks for tables, images, lists, and rich formatting. Use when user wants to publish to WordPress, post to blog, create WordPress article, update WordPress post, or convert markdown to Gutenberg blocks.

MIT-0 · Free to use, modify, and redistribute. No attribution required.
6 · 2.6k · 7 current installs · 7 all-time installs
byAsif@Asif2BD
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
medium confidence
Purpose & Capability
Name/description, SKILL.md, README, and included scripts all align: the skill talks to a WordPress site and converts content to Gutenberg blocks and publishes it. That capability reasonably requires HTTP access and the ability to accept a site URL + application password. However there are small inconsistencies: the package metadata/owner fields look odd (owner shown as 'Suspended suspended' while README and marketplace point to different GitHub links) and the repository includes runnable Python code but the skill metadata declares no runtime/install steps — a mismatch the user should be aware of.
Instruction Scope
SKILL.md is focused on the stated task: it instructs the agent to ask the user for site URL, username and application password, to load categories, generate tags, convert content, preview, and publish. It does not instruct the agent to read unrelated host files, environment variables, or exfiltrate secrets to third-party endpoints. The only notable behavior is that the converter intentionally preserves some HTML (allowed by design), which could include user-supplied HTML.
!
Install Mechanism
There is no install spec for the skill even though the bundle includes Python scripts and a requirements.txt declaring 'requests'. The README instructs manual 'pip install requests', but the platform may not automatically install dependencies. This mismatch (no declared runtime/install but non-trivial code present) is an operational/consistency risk: if run in an environment without dependencies, behavior may fail or the skill may attempt to run unexpected fallback logic. From a security perspective, there's no remote-download install step in the skill bundle itself — all source files are present — but you should verify how your agent runtime executes included Python code and which packages are actually available.
Credentials
The skill does not declare or require any environment variables or platform credentials; instead it expects the user to provide the WordPress site URL, username, and an application password when connecting. Those are proportionate and expected for a WordPress REST API publisher. Development docs mention a .env for testing, but that's for local tests only. No unrelated cloud credentials or system tokens are requested.
Persistence & Privilege
The skill is not marked 'always:true' and does not request system-wide configuration changes in the repository files. It contains CLI-style scripts and test files but does not request persistent privileges. Autonomous invocation is allowed by default (disable-model-invocation=false) which is normal for skills; combine that with credential use only if you are comfortable with autonomous publishing.
What to consider before installing
What to check before installing or using this skill: - Verify the source and maintainer: the package metadata shows inconsistent author/homepage data (an account named 'Suspended suspended' and multiple GitHub links). Prefer skills from trusted, well-maintained repositories. If possible, install from the original GitHub repo and confirm its history and issues. - Inspect scripts/wp_publisher.py before handing over credentials: confirm network targets are only the provided site_url and no hard-coded external telemetry or unknown endpoints are contacted. The bundle includes the Python code locally, so review it or run it in a sandbox/staging environment first. - Use least-privilege credentials: create a WordPress Application Password with the minimal role needed (prefer Editor over Administrator where possible) and test on a non-production/staging site first. Do not give your main admin password—the SKILL.md already recommends application passwords. - Validate dependency handling: the repo expects 'requests' but the skill metadata has no install step. Ensure the runtime will install or already provides dependencies; otherwise run the scripts locally in a virtualenv to confirm behavior. - Be aware of HTML passthrough: the converter intentionally preserves some HTML. If you will publish user-provided or untrusted content, review/sanitize it to avoid injecting unwanted HTML or scripts into your site. - Run tests locally (pytest) or inspect tests in this bundle to gain confidence in behavior. If you cannot inspect the code, do not provide credentials to the skill and instead run the included scripts yourself on a controlled machine. If you want, I can scan the full scripts/wp_publisher.py file for network endpoints, data flows, or any code paths that might exfiltrate data, and call out specific lines to review.

Like a lobster shell, security has layers — review code before you run it.

Current versionv0.1.0
Download zip
latestvk978w6hf2bvwcd94c3pew5qgj580c3pz

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

WordPress Publisher

Publish content directly to WordPress sites using the REST API with full Gutenberg block formatting, automatic category selection, SEO tag generation, and preview capabilities.

Complete Workflow Overview

1. CONNECT    → Authenticate with WordPress site
2. ANALYZE    → Load categories from site, analyze content for best match
3. GENERATE   → Create SEO-optimized tags based on content
4. CONVERT    → Transform markdown/HTML to Gutenberg blocks
5. PREVIEW    → Create draft and verify rendering
6. PUBLISH    → Publish or schedule the post
7. VERIFY     → Confirm live post renders correctly

Step 1: Connection Setup

Get Credentials

Ask user for:

  • WordPress site URL (e.g., https://example.com)
  • WordPress username
  • Application password (NOT regular password)

How to Create Application Password

Guide user:

  1. Go to Users → Profile in WordPress admin
  2. Scroll to Application Passwords section
  3. Enter name: Claude Publisher
  4. Click Add New Application Password
  5. Copy the generated password (shown only once, with spaces)

Test Connection

from scripts.wp_publisher import WordPressPublisher

wp = WordPressPublisher(
    site_url="https://example.com",
    username="admin",
    password="xxxx xxxx xxxx xxxx xxxx xxxx"  # Application password
)

# Test connection
user_info = wp.test_connection()
print(f"Connected as: {user_info['name']}")

Step 2: Load and Select Categories

Auto-Load Categories from Site

# Get all categories from the WordPress site
categories = wp.get_categories_with_details()

# Returns list like:
# [
#   {'id': 1, 'name': 'Uncategorized', 'slug': 'uncategorized', 'count': 5},
#   {'id': 2, 'name': 'Tutorials', 'slug': 'tutorials', 'count': 12},
#   {'id': 3, 'name': 'Cloud Hosting', 'slug': 'cloud-hosting', 'count': 8},
# ]

Smart Category Selection

The system analyzes content and selects the most appropriate category:

# Analyze content and suggest best category
suggested_category = wp.suggest_category(
    content=article_content,
    title=article_title,
    available_categories=categories
)

# Or let user choose from available options
print("Available categories:")
for cat in categories:
    print(f"  [{cat['id']}] {cat['name']} ({cat['count']} posts)")

Category Selection Logic

  1. Exact match - Title/content contains category name
  2. Keyword match - Category slug matches topic keywords
  3. Parent category - Fall back to broader parent if no match
  4. Create new - Create category if none fit (with user approval)

Step 3: Generate SEO-Optimized Tags

Automatic Tag Generation

Generate tags that improve Google search visibility:

# Generate tags based on content analysis
tags = wp.generate_seo_tags(
    content=article_content,
    title=article_title,
    max_tags=10
)

# Returns list like:
# ['n8n hosting', 'workflow automation', 'self-hosted n8n', 
#  'affordable hosting', 'docker deployment', 'node.js hosting']

Tag Generation Rules

  1. Primary keyword - Always include as first tag
  2. Secondary keywords - Include 2-3 related terms
  3. Long-tail keywords - Include 3-4 specific phrases
  4. Entity tags - Include product/brand names mentioned
  5. Topic tags - Include broader category terms

Create/Get Tags in WordPress

# Get or create all tags, returns list of tag IDs
tag_ids = wp.get_or_create_tags(tags)

Step 4: Convert Content to Gutenberg Blocks

Markdown to Gutenberg

from scripts.content_to_gutenberg import convert_to_gutenberg

# Convert markdown content
gutenberg_content = convert_to_gutenberg(markdown_content)

Supported Conversions

MarkdownGutenberg Block
# Headingwp:heading
**bold**<strong> in paragraph
- list itemwp:list
1. orderedwp:list {"ordered":true}
\``code````wp:code
> quotewp:quote
![alt](url)wp:image
| table |wp:table

Table Conversion (Critical for AI Content)

Tables are converted with proper Gutenberg structure:

# Input markdown:
| Feature | Plan A | Plan B |
|---------|--------|--------|
| Price   | $10    | $20    |

# Output Gutenberg:
<!-- wp:table -->
<figure class="wp-block-table"><table>
  <thead><tr><th>Feature</th><th>Plan A</th><th>Plan B</th></tr></thead>
  <tbody><tr><td>Price</td><td>$10</td><td>$20</td></tr></tbody>
</table></figure>
<!-- /wp:table -->

Step 5: Preview Before Publishing

Create Draft for Preview

# Create as draft first
result = wp.create_draft(
    title="Article Title",
    content=gutenberg_content,
    categories=[category_id],
    tags=tag_ids,
    excerpt="Auto-generated or custom excerpt"
)

post_id = result['post_id']
preview_url = result['preview_url']
edit_url = result['edit_url']

Verify Preview

# Fetch preview page to verify rendering
preview_content = wp.fetch_preview(post_id)

# Check for issues
issues = wp.validate_rendered_content(preview_content)
if issues:
    print("Issues found:")
    for issue in issues:
        print(f"  - {issue}")

Preview Checklist

  • Title displays correctly
  • All headings render (H2, H3, H4)
  • Tables render with proper formatting
  • Lists display correctly (bullet and numbered)
  • Code blocks have syntax highlighting
  • Images load (if any)
  • Links are clickable
  • Category shows correctly
  • Tags display in post

Step 6: Publish the Post

Publish Draft

# After preview approval, publish
result = wp.publish_post(post_id)
live_url = result['live_url']

Or Create and Publish Directly

# Full publish workflow in one call
result = wp.publish_content(
    title="Article Title",
    content=gutenberg_content,
    category_names=["Cloud Hosting"],  # By name, auto-resolves to ID
    tag_names=["n8n", "hosting", "automation"],
    status="publish",  # or "draft", "pending", "private", "future"
    excerpt="Custom excerpt for SEO",
    slug="custom-url-slug"
)

Scheduling Posts

# Schedule for future publication
from datetime import datetime, timedelta

publish_date = datetime.now() + timedelta(days=1)
result = wp.publish_content(
    title="Scheduled Post",
    content=content,
    status="future",
    date=publish_date.isoformat()
)

Step 7: Verify Published Post

Check Live Post

# Verify the published post
verification = wp.verify_published_post(post_id)

print(f"Live URL: {verification['url']}")
print(f"Status: {verification['status']}")
print(f"Categories: {verification['categories']}")
print(f"Tags: {verification['tags']}")

Common Issues and Fixes

IssueCauseSolution
Tables not renderingMissing figure wrapperUse proper wp:table block structure
Code not highlightedMissing language attributeAdd {"language":"python"} to code block
Images brokenWrong URL or missing mediaUpload to WordPress first, use media ID
Tags not showingTheme doesn't display tagsCheck theme settings or use different theme

Complete Example Workflow

from scripts.wp_publisher import WordPressPublisher
from scripts.content_to_gutenberg import convert_to_gutenberg

# 1. Connect
wp = WordPressPublisher(
    site_url="https://xcloud.host",
    username="admin",
    password="xxxx xxxx xxxx xxxx"
)

# 2. Load categories and select best match
categories = wp.get_categories_with_details()
best_category = wp.suggest_category(content, title, categories)

# 3. Generate SEO tags
tags = wp.generate_seo_tags(content, title, max_tags=10)

# 4. Convert to Gutenberg
gutenberg_content = convert_to_gutenberg(markdown_content)

# 5. Create draft and preview
draft = wp.create_draft(
    title="7 Best n8n Hosting Providers in 2026",
    content=gutenberg_content,
    categories=[best_category['id']],
    tags=wp.get_or_create_tags(tags)
)
print(f"Preview: {draft['preview_url']}")

# 6. After verification, publish
result = wp.publish_post(draft['post_id'])
print(f"Published: {result['live_url']}")

Quick Reference

API Endpoints

ResourceEndpoint
Posts/wp-json/wp/v2/posts
Pages/wp-json/wp/v2/pages
Categories/wp-json/wp/v2/categories
Tags/wp-json/wp/v2/tags
Media/wp-json/wp/v2/media

Post Statuses

StatusDescription
publishLive and visible
draftSaved but not visible
pendingAwaiting review
privateOnly visible to admins
futureScheduled for later

Required Files

  • scripts/wp_publisher.py - Main publisher class
  • scripts/content_to_gutenberg.py - Markdown/HTML converter
  • references/gutenberg-blocks.md - Block format reference

Error Handling

Error CodeMeaningSolution
401Invalid credentialsCheck username and application password
403Insufficient permissionsUser needs Editor or Admin role
404Endpoint not foundVerify REST API is enabled
400Invalid dataCheck category/tag IDs exist
500Server errorRetry or check WordPress error logs

Best Practices

  1. Always preview first - Create as draft, verify, then publish
  2. Use application passwords - Never use regular WordPress password
  3. Select appropriate category - Helps with site organization and SEO
  4. Generate relevant tags - Improves Google discoverability
  5. Validate Gutenberg blocks - Ensure proper block structure
  6. Keep excerpts under 160 chars - Optimal for search snippets
  7. Use descriptive slugs - Include primary keyword in URL

Files

19 total
Select a file
Select a file to preview.

Comments

Loading comments…