Refresh stale WordPress content with an AI agent
What does this skill do?
The content-refresh skill is a SKILL.md file that teaches an AI agent a safe routine for finding aging or thin WordPress content and bringing it up to date — surface the least-recently-modified posts, read each one, then update copy behind a database checkpoint, one post at a time. You install it once and ask for a content refresh whenever a section of the site has gone stale.
Content decay is quiet. Posts that ranked two years ago slowly go out of date, screenshots age, links rot, and nobody notices until traffic slides. The hard part of an AI content refresh is usually not the writing — it is finding what needs attention and touching it safely. This skill handles both. It sorts the library by last-modified date so the stalest posts float to the top, reads the real current content of each candidate before changing a word, and puts every edit behind a checkpoint you can roll back in one call.
The routine is built around read-before-write. The agent never rewrites a post it has not first pulled in full with the content MCP tool, so refreshes are grounded in what the page actually says today rather than a guess. Edits go through one at a time — update the copy, tighten the excerpt, fix the tags, and set the status, changing only the fields you pass. You can have the agent leave the result as a draft for you to approve, or publish it directly, and either way each change is journaled individually so a single post can be reverted without unwinding the whole session.
The skill also folds in a light accessibility pass. As it reviews content it can list your media library and flag images that are missing alt text, and any new image it uploads during a refresh ships with alt text set from the start. There is an honest limit worth knowing up front: this toolset sets image alt text at upload time, not retroactively on images already in the library — so the audit reports the gaps, but fixing alt on an existing upload is a manual step. The skill says so rather than pretending otherwise.
Which Cowboy MCP tools does it use?
The refresh reads first and writes narrowly. The read tools find and inspect stale content and audit the media library; the write tools edit one post, upload a new image, or take and confirm the checkpoint that makes the whole pass reversible. Every tool below is a real Cowboy MCP tool the agent sees over MCP.
| Tool | What it does |
|---|---|
wp_list_posts |
Lists posts, pages, or attachments; orderby: modified + order: ASC surfaces the stalest content first |
wp_get_post |
Reads one post in full — content, excerpt, terms, and meta — before any edit |
wp_db_health_report |
Read-only bloat check: revisions and auto-drafts worth cleaning as part of the pass |
wp_create_checkpoint |
Snapshots the database before the first edit |
wp_list_checkpoints |
Confirms the checkpoint was written before the agent proceeds |
wp_update_post |
Updates one post's copy, excerpt, tags, categories, or status — only the fields you pass |
wp_upload_media |
Uploads a new image and sets its alt_text so it ships accessible |
wp_undo_change · wp_list_changes |
Reverts a single post's edit from the undo journal without a full restore |
How do I run it?
Once the skill is installed you run it in plain English, and the agent picks up the SKILL.md and follows its steps. Because the routine names its own tools, a short request is enough, and you can scope it from a whole-library sweep down to one category or a report-only pass. Three prompts that work:
- "Run the content-refresh skill on my blog — checkpoint first, find posts I haven't touched in over a year, and update them as drafts for me to review."
- "Do the content refresh but only audit: list my stalest posts and any images missing alt text. Don't change anything yet."
- "Refresh the posts in my Tutorials category, publish the updates, and give me the checkpoint id so I can roll it all back if I need to."
The first prompt runs the routine and stops at drafts, which is the safest way to keep a human in the loop. The second stops after the read-only audit steps — a good preview of what a full run would touch. The third is a complete pass with an explicit reminder to surface the checkpoint id. Underneath all three, safe mode applies and a dry run previews each write before it lands.
How do I install the skill?
A skill is just a folder with a SKILL.md file inside it. Download this skill's file and drop it into your agent's skills directory — no build step, no dependencies. Where it goes depends on whether you want it in one project or everywhere:
- Download SKILL.md — the exact file embedded below.
- Project-level: save it as
.claude/skills/wordpress-content-refresh/SKILL.mdinside the project you work in, so the skill travels with that repository. - Global: save it under
~/.claude/skills/wordpress-content-refresh/SKILL.mdto make it available in every session on your machine.
Keep the folder name (wordpress-content-refresh) matching the name field in the file's frontmatter. After the file is in place, start a new session and ask your agent to refresh your content — it will find the skill by its description. The full file is below for reference; the download link above serves this exact text.
---
name: wordpress-content-refresh
description: Use when asked to refresh stale content on a WordPress site connected via Cowboy MCP — finds aging posts, audits them, and updates copy behind a database checkpoint, setting alt text on any new images it uploads.
---
# WordPress content refresh
Find aging or thin content on a WordPress site through Cowboy MCP, then bring it up to date safely. Read and audit first, take a checkpoint before any edit, and update one post at a time so every change is easy to review and undo.
## Before you start
1. Confirm the connection is healthy: call `wp_site_info`.
2. Agree on what "stale" means for this site — for example, posts not modified in over a year, or a specific category.
3. Create a database checkpoint with `wp_create_checkpoint` (label it "content-refresh") and confirm it exists with `wp_list_checkpoints` before making any edit.
## Steps
1. **Find stale posts (read-only).** Call `wp_list_posts` with `orderby: modified` and `order: ASC` to surface the least-recently-updated posts. Filter by `post_type`, `category`, or `status` as agreed. Note thin posts and forgotten drafts.
2. **Read before you write (read-only).** For each candidate, call `wp_get_post` to read the full content, excerpt, terms, and meta so you refresh from the real current state.
3. **Audit media (read-only).** Call `wp_list_posts` with `post_type: attachment`, then read each image with `wp_get_post` and flag any whose `_wp_attachment_image_alt` meta is empty. (See Notes — this toolset writes alt text on upload, not retroactively.)
4. **Refresh the copy.** Call `wp_update_post` for one post: update `content`, `excerpt`, tags, and categories, and set `status` (for example, keep it a draft while you work, then publish). Only the fields you pass change.
5. **Add images with alt text.** If the refresh needs a new image, call `wp_upload_media` and pass `alt_text` so the new attachment ships accessible from the start.
6. **Verify.** Re-read the post with `wp_get_post` and confirm the changes landed as intended.
## Notes
- `dry_run` applies to write tools only; `wp_list_posts` and `wp_get_post` are read-only and reject it — call them directly.
- Alt text on existing library images: the alt value lives in the underscore-protected meta key `_wp_attachment_image_alt`, which MCP will not write through `wp_update_post`. So the audit reports missing alt text, but the fix path here is uploading a fresh image with `alt_text` set, or editing it in the Media Library. New uploads via `wp_upload_media` set alt correctly.
- Every edit is journaled: undo a single post's change with `wp_undo_change`, or restore the whole session with `wp_restore_checkpoint`.
## Report format
Summarize back to the site owner:
- Which posts were refreshed, with their last-modified dates before the pass.
- What changed per post (copy, excerpt, terms, status) and which were left as drafts for review.
- Any new images uploaded, with their alt text.
- Images still missing alt text that need a manual fix.
- The checkpoint id, so the whole pass rolls back with `wp_restore_checkpoint` if needed.