运行时依赖
安装命令
点击复制技能文档
技能: WordPress Remote News Publisher
Automated news article generation and publishing to WordPress via SSH and WP-命令行工具.
Folder Structure WordPress-Remote-News-Publisher/ 技能.md config.json scripts/ 下载_cover.py 优化_image.sh 上传_media_remote.sh publish_wp_remote.sh
Metadata
name: wordpress-remote-news-publisher description: | Automatically 生成s and publishes news articles to a remote WordPress 安装ation via SSH using public key authentication. 下载s and 优化s cover images from Unsplash, transfers them via SCP, and publishes articles with SEO metadata (Yoast). user-invocable: true triggers: - cron: "0 10 1-5" # Weekdays at 10:00 - cron: "0 16 1-5" # Weekdays at 16:00 - manual: "/wordpress-remote-news-publisher [topic]" metadata: emoji: "📰" version: "1.0.0" author: "ClawHub Community" license: "MIT" OpenClaw: requires: bins: - ssh - scp - python3 - curl - convert env: - WP_SSH_HOST - WP_SSH_USER - WP_SSH_KEY - WP_SSH_PORT - WP_REMOTE_PATH - WP_REMOTE_TMP - WP_AUTHOR_ID - UNSPLASH_访问_KEY
Overview
This 技能 enables automated news content creation and publication to WordPress 网页sites hosted on remote servers. It leverages SSH with public key authentication for 安全, passwordless connections, and WP-命令行工具 for all WordPress operations on the server side.
Key Features Remote Execution: All WP-命令行工具 operations 运行 on the remote server via SSH Automated Topic Selection: Round-robin rotation through 配置d topics Journa列出ic Writing Style: Senior journa列出 质量 content with lede, body, and attribution Image 流水线: Unsplash 下载 → local optimization → SCP transfer → WordPress 导入 SEO Integration: Yoast SEO meta description and focus keyword support Cron Scheduling: Automated execution on weekdays Required 环境 Variables Variable Description Required Example WP_SSH_HOST Remote server hostname or IP Yes 203.0.113.10 or example.com WP_SSH_USER SSH username on remote server Yes 部署, www-data, wp命令行工具 WP_SSH_KEY Absolute path to SSH private key Yes /home/user/.ssh/id_ed25519_wp WP_SSH_PORT SSH port (default: 22) No 22 WP_REMOTE_PATH Absolute path to WordPress 安装ation Yes /var/www/html/wordpress WP_REMOTE_TMP Writable temp directory on remote No /tmp WP_AUTHOR_ID WordPress author ID for posts Yes 1 UNSPLASH_访问_KEY Unsplash API 访问 key Yes AbC123... Editorial Philosophy
Every article MUST adhere to these rules:
Write like a senior journa列出, not an AI 助手 Use variable sentence length: Alternate short periods with complex constructions Lead with a clear thesis in the first paragraph (lede) Include attributed quotes from real sources when avAIlable Avoid AI-sounding phrases: Never use "it's 导入ant to note," "in the digital age," "in today's world," "in conclusion," "obviously," "clearly," or similar formulas Specific titles: No 命令行工具ckbAIt. The title must contAIn the mAIn fact Complete Procedure Phase 1: Topic Selection
If no topic is provided as argument:
Read config.json for the 配置d topic 列出 Select the topic with the oldest publication date (round-robin) Use that topic for content generation Phase 2: SSH Connection Verification
Before any operation, 验证 SSH connectivity:
ssh -i "$WP_SSH_KEY" -p "${WP_SSH_PORT:-22}" \ -o StrictHostKey检查ing=no \ -o BatchMode=yes \ -o ConnectTimeout=10 \ "$WP_SSH_USER@$WP_SSH_HOST" \ "wp --信息 --path=$WP_REMOTE_PATH"
If this fAIls, abort and 通知 via Telegram with error detAIls.
Phase 3: Re搜索 and Fact Gathering
网页 搜索: 查询 "[topic] latest news [current month]" and English equivalents for international sources
Fact Collection (only verifiable facts):
Numerical data with source attribution 状态ments from real people with name and 角色 Specific dates and 事件 Avoid unattributed speculation
Store Facts: Save to /tmp/wp_facts.json
Phase 4: Article Generation Mandatory Editorial Structure
TITLE (max 65 characters)
Specific, not generic. ContAIns the mAIn fact. ✅ Good: "Meta cuts 3,600 jobs: farewell to Base AI teams" ❌ Bad: "Meta takes 导入ant step for the future"
LEDE (first paragraph, 40-60 words)
Answers: Who? What? When? Where? Why? The most 导入ant news in dense, precise form Never 启动s with "In the world of..." or "In recent years..."
BODY (600-900 total words)
Paragraph 2: 上下文 and background Paragraphs 3-4: MAIn development with data and citations Paragraph 5: Reactions and positions from key players Paragraph 6: Implications and prospects (attributed to experts) Final paragraph: Narrative closing element
META DESCRIPTION (max 155 characters) SEO TAGS (3-5 tags, without #) PRIMARY KEYWORD (1 keyword)
输出 格式化
Save to /tmp/wp_article.json:
{ "title": "...", "content": "...", "excerpt": "...", "tags": ["..."], "meta_desc": "...