一键导入
wp-content
Create, read, update, search posts/pages/users/options/taxonomies via the core WP REST API on a connected target. Phase = Build.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create, read, update, search posts/pages/users/options/taxonomies via the core WP REST API on a connected target. Phase = Build.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | wp-content |
| description | Create, read, update, search posts/pages/users/options/taxonomies via the core WP REST API on a connected target. Phase = Build. |
| when_to_use | any "create / write / list / read / update" request scoped to WordPress core content (posts, pages, custom post types, users, options, categories, tags, media), without builder-specific markup or plugin adapter writes |
| tier | 1 |
| phase | build |
Core-REST CRUD skill. Owns the most common WordPress operations: write a page, list posts, update an option, register a user, query the DB read-only. Anything builder-specific (Elementor JSON, Divi shortcodes) belongs to wp-edit-design; anything plugin-specific (Yoast meta, Woo products) belongs to wp-edit-plugin.
/wp/v2/* REST surface.Skip when:
wp-edit-design.wp-edit-plugin.wp-scaffold.Owns:
rolepod_wp_post_{get,list,create,update} for posts/pages/CPTs.rolepod_wp_user_list (read) + rolepod_wp_user_write (create/update/delete).rolepod_wp_term for taxonomy terms (category / tag / custom), rolepod_wp_comment for comment moderation, rolepod_wp_cpt_scaffold to register a custom post type.rolepod_wp_option_{get,set} for the WP-allowed settings surface (siteurl, blogname, etc.).rolepod_wp_db_query (SELECT only).rolepod_wp_rest_request for arbitrary /wp/v2/* calls.rolepod_wp_rest_dump to discover routes.Does not own:
_elementor_data, Divi shortcodes, Oxygen JSON, Bricks JSON) → wp-edit-design.wp-edit-plugin.wp-scaffold or wp-edit-design.Return / hand off:
wp-edit-design.wp-edit-plugin.wp-diagnose.type (default posts), title, content, status (default draft).id + the fields to change (read the post first if content is unknown).type, optional search, status, per_page, page, orderby.name; for set, value + confirm: true if on production.path, method, optional body/query.| User intent | Tool |
|---|---|
| create a page/post/cpt | rolepod_wp_post_create |
| update an existing one | rolepod_wp_post_get first (if unknown), then rolepod_wp_post_update |
| list / search / filter | rolepod_wp_post_list |
| upload an image / set a featured image | rolepod_wp_media_upload |
| list users | rolepod_wp_user_list |
| create/update/delete a user | rolepod_wp_user_write (delete needs reassign_to) |
| add/find a category, tag, or custom term | rolepod_wp_term (action=ensure is idempotent) |
| approve / spam / trash / delete a comment | rolepod_wp_comment |
| register a custom post type | rolepod_wp_cpt_scaffold |
| change a post's slug (URL) | rolepod_wp_post_update with slug — heed slug_changed_warning |
| add a 301 redirect (Rank Math backend) | rolepod_wp_redirect_set |
| read site setting | rolepod_wp_option_get |
| write site setting | rolepod_wp_option_set (production guard fires if siteurl-matched) |
| arbitrary REST call | rolepod_wp_rest_request |
| discover what routes exist | rolepod_wp_rest_dump |
| read-only DB | rolepod_wp_db_query |
When content is a Gutenberg-block page, use the comment-syntax block markup:
<!-- wp:paragraph -->
<p>Hello world.</p>
<!-- /wp:paragraph -->
<!-- wp:heading {"level":2} -->
<h2>Section title</h2>
<!-- /wp:heading -->
See examples/content-examples.md for non-trivial cases (group blocks, columns, cover, image with attributes).
Default to status=draft on create. Promote to publish only with explicit user OK. Never set publish for the first commit of a major page (allows revision review).
Upload with rolepod_wp_media_upload(source: base64, data, filename, alt) — or source: url for a remote image, or source: local_path for a file already on the server. Always pass alt (accessibility + SEO). To set a post's featured image in one step, add rolepod_wp_media_upload(source: url, url, alt, set_featured: true, attach_to_post).
With the rolepod-wp companion (v2.23+) the upload is bounded server-side and recorded as a reversible ledger row (disable it to delete the attachment). Without the companion it falls back to a bare REST upload that is not ledgered — remove such an upload manually via rolepod_wp_rest_request DELETE on /wp/v2/media/<id>?force=true.
These four tools branch on target kind — wp-cli for shell targets (local/ssh/docker), WP REST for a RestTarget — so they work on every connection. The ledger records only on rest targets. Production writes need confirm: true.
rolepod_wp_term(action: ensure, taxonomy: category, name, slug) is idempotent — it returns the existing term (existed: true) or creates it. action: list / action: create are also available. For a custom taxonomy whose REST base differs from its key, pass rest_base.rolepod_wp_user_write(action: create, username, email, role) / action: update / action: delete. A delete ALWAYS needs reassign_to — the user id that inherits the deleted account's posts (Iron Rule #4).rolepod_wp_comment(action: moderate, id, status) where status is approve / hold / spam / trash; action: delete (add force: true to purge permanently instead of trashing); action: list.rolepod_wp_cpt_scaffold(slug, singular, plural) writes a small regular plugin that register_post_types the CPT + flushes rewrite rules on activation, then activates it. Re-running for the same slug returns CPT_ALREADY_EXISTS. Multisite is unsupported.State the operation, the id (post / user / option / attachment), and any warnings. If the response includes _links, just show the canonical link.
rolepod:content-strategist (audience: user) for copy quality.rolepod:backend-developer for non-trivial REST orchestration.status=draft.No durable artifact — content lives in WordPress. The MCP returns IDs + canonical links.
Read when constructing Gutenberg block markup or chaining multiple REST calls:
examples/content-examples.md — good vs bad block markup; full landing-page composition example.Inline only. REST surface is documented at https://developer.wordpress.org/rest-api/reference/. Use rolepod_wp_rest_dump to discover the current site's actual routes.
db_query with non-SELECT → tool returns DB_WRITE_BLOCKED. STOP; re-route via REST or wp-cli (companion /wp-cli endpoint via wp-execute-php's sibling pattern — but cleaner: use the right REST endpoint).option_set on production-matched siteurl without confirm: true → STOP. Ask user for explicit confirmation, then retry with confirm: true.post_update without id → STOP, ask the user which post.Full Rolepod adds bulk batching (run 20 post_create in one composite call with optimistic concurrency); standalone, batch by orchestrating individual calls.
wp-health-check to verify the page is reachable.wp-edit-design.wp-edit-plugin.Read or write configuration owned by SEO / i18n / e-commerce / custom-field / forms plugins — Yoast, RankMath, WPML, WooCommerce, ACF, Gravity / CF7 / WPForms — on a connected target. Phase = Build.
Recover a WordPress site that is white-screening / 500-ing / fatal after an edit — guardian mu-plugin, safe-mode, disable/restore the culprit — plus safe core/plugin/theme updates and guarded .htaccess edits. Phase = Recover.
Multi-probe diagnostic + security audit of a connected target — plugin conflicts, slow queries, large autoload options, broken images, PHP errors, outdated core/plugins/themes, weak admins. Phase = Debug.
Plan, dry-run, apply, back up, and clone migrations between two WP targets — dev → staging → prod, with rollback. Phase = Ship.
Query the AI Change Ledger on a connected target — the writes the MCP recorded through the companion (RestTarget only), categorized; toggle on/off; panic-revert recent changes. Phase = Recovery.
Read or modify page-builder layouts on a connected target — Elementor, Divi, Oxygen, Bricks widget trees. Phase = Build.