When should you use it?
- Your site fetches content from a heavy CMS
- You want local Markdown and a simpler stack
- You can review and spot-check the output
Not for: Deleting the source before verifying every post migrated; Highly dynamic sites that need more than static content
What do you need, and what do you get?
You need
- API access to the existing CMS
- A target repo and folder structure
- A terminal coding agent
You get
- Every post as a local Markdown file with metadata
- Posts organized by publication year
- A simpler, faster, local-content stack
How does it work, step by step?
- Give one clear goalTell the agent to extract all posts, convert to Markdown with frontmatter and file them.
- Let it handle the APIIt manages rate limits and pagination rather than you scripting each call.
- Have it clean the HTMLIt parses messy markup into clean Markdown and sets the frontmatter fields.
- Let it self-correctWhen it hit an encoding error, it re-ran the script; allow that loop.
- Verify before cutoverSpot-check posts and images, then keep the old source until you trust the new one.
The prompt
Our own prompt, inspired by Pauline P. Narvas and written to work in Claude Code. Values in lime are placeholders.
Pull every post and page from my CMS at [API endpoint], convert them to Markdown with proper frontmatter (title, date, categories, excerpt, author, slug), and save them by publication year in this repo. Handle rate limiting and pagination, and parse the HTML into clean Markdown. If you hit an encoding or parsing error, fix it and re-run. Report how many posts and pages migrated and flag anything that failed.
Inspired by Pauline P. Narvas: WordPress to MDX migration with Claude Code. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.
What can go wrong?
- Confirm every post and image migrated before retiring the CMS.
- Dynamic features beyond content may still need work; this covers posts and pages, not plugins.
Our take
Pauline P. Narvas's migration shows which jobs belong to terminal agents rather than chat windows. Moving a blog means calling an API repeatedly, waiting out rate limits, cleaning HTML, writing hundreds of files and rerunning scripts when something breaks, and an agent that can execute code handles that loop well. Giving it one clear goal and letting it manage the mechanics was the right approach. The discipline to keep is verification before cutover. Spot-check a sample of posts from different years, especially ones with embedded media, tables, code blocks or unusual characters, since the encoding error shows these are where conversions fail. Check that images were downloaded rather than still pointing at the old CMS, which may disappear when you cancel it. Keep URLs identical or add redirects, because old links from search engines and other sites are a blog's main traffic. Leave the old site running until the new one has been live for a while, and keep a full export of the CMS content as a backup in case something surfaces months later.
Where the time goes back: A dreaded multi-day migration that sat on the backlog for months finishes in one afternoon of mostly review.
FAQ
How long did it take?
Did it need babysitting?
Source and credit
Inspired by Pauline P. Narvas. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.
- Inspired by
- WordPress to MDX migration with Claude Code
- Creator
- Pauline P. Narvas
- Published on
- pawlean.com
- Original date
- Feb 1, 2026
- License
- Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
- Originally for
- Claude Code
- AI dry run
- Oct 23, 2026: passed. Dry-run tested by our AI test agent on sample input. PASS: Gates held on desk check; no live sends or purchases.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails. - Verified
- Oct 23, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.
Are you the creator? Claim or correct this page.