Install
openclaw skills install publish-mateFetch global news from RSS/API sources, auto-generate articles with images, and publish to WordPress or custom CMS platforms
openclaw skills install publish-mateYou are an automated content publisher agent. Your job is to fetch global mainstream news, compose well-formatted articles with featured images, and publish them to the user's configured CMS platform.
When a user first invokes /auto-publisher, check if {baseDir}/config.json exists.
If config is missing, run the interactive setup:
WP_APP_PASSWORD environment variable with their WordPress Application Password{baseDir}/config.json from their answers using {baseDir}/config.example.json as templateIf config exists, proceed to the command router below.
/auto-publisher or /auto-publisher publish — Full pipeline: fetch → compose → upload images → publish/auto-publisher setup — Interactive configuration wizard (re-run setup)/auto-publisher preview — Fetch news and show preview, do NOT publish/auto-publisher status — Show recent publishing history/auto-publisher config — Display current config (mask sensitive values)When publishing, execute the integrated pipeline script:
python3 {baseDir}/scripts/auto_publish.py --config {baseDir}/config.json
Options:
--max N — Limit to N articles (overrides config posts_per_day)--dry-run — Preview mode, no actual publishingThe script handles the complete flow:
{baseDir}/data/published_history.jsonImage sourcing priority:
media:content or enclosure image URLs{baseDir}/data/images/ and cached by content hash./wp-json/ vs ?rest_route= URL formatfeatured_media)After the pipeline completes, report to the user:
For advanced usage, the pipeline can also be run as separate steps:
# Fetch news only
python3 {baseDir}/scripts/fetch_news.py --config {baseDir}/config.json --max 5
# Fetch images for an article
python3 {baseDir}/scripts/fetch_image.py --config {baseDir}/config.json --title "Article Title"
# Publish a pre-composed article
python3 {baseDir}/scripts/publish.py --config {baseDir}/config.json --article article.json
Config file: {baseDir}/config.json (copy from {baseDir}/config.example.json)
{
"platform": {
"type": "wordpress",
"url": "https://your-site.com",
"username": "your-username",
"app_password_env": "WP_APP_PASSWORD"
},
"news_sources": [
{"type": "rss", "url": "https://feeds.bbci.co.uk/news/world/rss.xml", "name": "BBC World", "max_items": 5},
{"type": "newsapi", "category": "general", "api_key_env": "NEWS_API_KEY", "max_items": 5}
],
"publishing": {
"posts_per_day": 5,
"categories": ["News"],
"default_tags": ["news"],
"status": "publish",
"language": "zh"
},
"images": {
"source": "unsplash",
"api_key_env": "UNSPLASH_API_KEY",
"fallback_from_rss": true
}
}
NEVER store passwords or API keys in config.json. All secrets are loaded from environment variables.
| Variable | Purpose | Required |
|---|---|---|
WP_APP_PASSWORD | WordPress Application Password | Yes |
UNSPLASH_API_KEY | Unsplash image search | No |
PEXELS_API_KEY | Pexels image search | No |
PIXABAY_API_KEY | Pixabay image search | No |
NEWS_API_KEY | NewsAPI.org headlines | No |
Configure in OpenClaw settings (~/.openclaw/openclaw.json):
{
"skills": {
"entries": {
"auto-publisher": {
"enabled": true,
"env": {
"WP_APP_PASSWORD": "xxxx xxxx xxxx xxxx"
}
}
}
}
}
{baseDir}/logs/auto_publish.log| Platform | Status | Auth Method |
|---|---|---|
| WordPress | Full support | Application Passwords (REST API v2) |
| Custom REST API | Basic support | Bearer token / custom headers |
Users can customize article format via templates in {baseDir}/templates/:
default.md — Standard news article with source attributionbrief.md — Short news brief format