wordpress-publish
Skill2 starsChanged 6 months agoMITView on GitHub
Publish articles to a WordPress site via the REST API. Multi-site (azvai, quecafe, ecomm, ai-tutor, notegpt). Creates posts as drafts or published, uploads featured images, sets categories/tags. Use when the user asks to publish, push, upload, or send an article to WordPress. Natural follow-up to research-writing-assistant Stage 5.
- Reads credentials
1 other project uses a version of this.
Adopted by
Most recently taken up by
- william0348/GenAI-MCP-x-WordPresstheir own version, first seen Oct 5, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- william0348/GenAI-MCP-x-WordPress★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- article-imagesSkill
- field-inspection-prepSkill
- financial-model-auditSkill
- gsc-auditSkill
- recycling-capacity-scanSkill
- research-writing-assistantSkill
- sustainable-business-modelSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 1 is distinctive, and 12 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
Run python scripts/publish.py list-sites to see what's set up.
- Very specific: line 28
Ask if any of these are missing: target site (slug), title, status (draft or publish, default draft), featured image (optional path), …
- Very specific: line 30
If the working dir is from research-writing-assistant, infer the site from brief.json.brand_profile (which equals the brand slug, which …
- Very specific: line 34
Resolve site: Run scripts/publish.py list-sites if unclear.
- Very specific: line 35
Resolve source: If directory: read article.html as content, pick title from titles.md (the one marked recommended — ask if ambiguous), read …
- Very specific: line 39
Create post: Run scripts/publish.py --site <slug> create with the resolved inputs.
- Very specific: line 44
If the user asks to update a post they previously published, use scripts/publish.py --site <slug> update --id <post_id> with whichever …
- Very specific: line 49
Default to draft: Only --status publish when the user explicitly says "publish live" / "publish it" / "go live".
- Very specific: line 51
Strip
<html>/<head>/<body>wrappers: if present before sending — WP expects a content fragment (see … - Very specific: line 52
Preserve the
<style>block: if the article uses per-article CSS mode. - Very specific: line 56
All commands below read credentials from the project .env file.
- Distinctive: line 83
All commands exit non-zero on API error and print the WP error body to stderr.
- Very specific: line 88
Add three lines to .env:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
WordPress Publish
You publish articles to a configured WordPress site using the REST API. Multi-site setup — pick the target site with --site <slug> on every call.
Configured sites
Run python scripts/publish.py list-sites to see what's set up. Each site is identified by a lowercase slug (e.g. azvai, quecafe, ecomm). Slug is derived from the env vars WP_<UPPERCASE_SLUG>_URL, _USER, _APP_PASSWORD.
The research-writing-assistant brand profile slug should match the site slug (so azvai brand → --site azvai). For ecomm.design the convention is ecomm.
Inputs
The user points you at an article. Typically one of:
- A directory from
research-writing-assistantcontainingarticle.html+meta.json+titles.md - A single HTML or Markdown file
- An explicit title + body
Ask if any of these are missing: target site (slug), title, status (draft or publish, default draft), featured image (optional path), categories/tags (optional names).
If the working dir is from research-writing-assistant, infer the site from brief.json.brand_profile (which equals the brand slug, which equals the site slug). Confirm with the user before publishing.
Workflow
- Resolve site. Run
scripts/publish.py list-sitesif unclear. Confirm slug with user. - Resolve source. If directory: read
article.htmlas content, pick title fromtitles.md(the one marked recommended — ask if ambiguous), read meta description frommeta.json. - Confirm. Show the user: site URL, title, status, featured image (if any), categories, tags. Wait for approval.
- Upload featured image (if provided): run
scripts/publish.py --site <slug> upload-media --file <path>. Capture the returned media ID. - Resolve taxonomy IDs (if category/tag names given): run
scripts/publish.py --site <slug> resolve-terms --categories "A,B" --tags "X,Y". Script creates any missing terms. - Create post. Run
scripts/publish.py --site <slug> createwith the resolved inputs. Script writes the response to stdout as JSON. - Report back. Show the user the post ID, edit URL (
{site_url}/wp-admin/post.php?post=<id>&action=edit) and preview URL.
Updating an existing post
If the user asks to update a post they previously published, use scripts/publish.py --site <slug> update --id <post_id> with whichever fields changed. Do not re-upload media unless the image itself changed.
Rules
- Always pass
--site. The legacy single-site fallback (WP_URL/WP_USER/WP_APP_PASSWORDwithout prefix) still works for backwards compat, but for multi-site setups always pass an explicit slug to avoid publishing to the wrong site. - Default to draft. Only
--status publishwhen the user explicitly says "publish live" / "publish it" / "go live". - Never publish without showing the user the final title + meta description first.
- Strip
<html>/<head>/<body>wrappers if present before sending — WP expects a content fragment (seeresearch-writing-assistant/references/wordpress-output.md). - Preserve the
<style>block if the article uses per-article CSS mode.
Script reference
All commands below read credentials from the project .env file. The --site flag goes BEFORE the subcommand.
# Discover what's configured
python scripts/publish.py list-sites
# Per-site operations
python scripts/publish.py --site azvai create \
--title "Post title" \
--content-file path/to/article.html \
--status draft \
--excerpt "Meta description here" \
--slug "post-slug" \
--featured-media 123 \
--categories 5,12 \
--tags 7,8
python scripts/publish.py --site ecomm update --id 456 --status publish
python scripts/publish.py --site quecafe upload-media --file path/to/image.jpg --alt "Alt text"
python scripts/publish.py --site azvai resolve-terms --categories "SEO,Guides" --tags "beginner"
python scripts/publish.py --site ecomm list --per-page 10
python scripts/publish.py --site azvai get --id 456All commands exit non-zero on API error and print the WP error body to stderr.
Adding a new site
- Generate a WordPress Application Password:
Users → Profile → Application Passwordson the WP admin - Add three lines to
.env:WP_<SLUG>_URL=https://example.com WP_<SLUG>_USER=username WP_<SLUG>_APP_PASSWORD=xxxx xxxx xxxx xxxx xxxx xxxx - Confirm with
python scripts/publish.py list-sites - (If the article-images skill needs it) create a matching brand profile in
.claude/skills/article-images/brands/<slug>.json
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

