Skip to content
ISSUE #28 Dec 12, 2025 11 MIN READ

Building WordPress Abilities API Extensions for Third-Party Plugins (SEO Edition)

In my previous post about internal linking, I promised to show you how to build WordPress Abilities API extensions for other people’s plugins.

Today, I’m delivering on that promise.

We’re staying in the SEO lane—updating meta titles, descriptions, focus keywords, image alt text, and Open Graph settings. You know. All the tedious stuff that makes SEO optimization feel like a part-time job nobody applied for.

To manage these settings, you need an SEO plugin. I’m using Rank Math.

Why Rank Math? Honestly? Because it’s what I use on my own site. No fancy reason—I’m showing you real projects I actually need. A bit of selfishness, sure. But that’s the deal I made with you.

.

.

.

The Problem That’s Been Nagging Me

Here’s my situation. (And I bet—I really bet—you’re in the same boat.)

I’ve been publishing newsletters for 28 consecutive weeks now.

Twenty-eight weeks of hitting “publish” and hoping—really hoping—the SEO gods would smile upon me. Twenty-eight weeks of telling myself I’d go back and optimize everything “later.”

You know how that goes.

The whole time, I believed good content would naturally attract readers. And to some extent? That’s true. But optimizing for SEO amplifies everything.

Here’s the thing:

Since I never focused on SEO before, going back to optimize all those posts is a mountain of work. The kind of mountain that makes you want to lie down, stare at the ceiling, and pretend the problem doesn’t exist.

(Sound familiar?)

Sure, I could subscribe to Rank Math Premium and use their bulk edit feature.

But then WordPress 6.9 introduced the WordPress Abilities API.

And suddenly—suddenly—we can hook our WordPress sites directly to AI agents via MCP.

So here’s what I’m building: a Rank Math extension that exposes SEO functionality through the WordPress Abilities API. Mass updates. AI-powered. Hands-free. The workflow is nearly identical to the internal linking plugin I built before. A few tweaks here and there—specific adjustments for extending someone else’s plugin.

Let me walk you through it.

.

.

.

Step 1: Brainstorming for Requirements

Every vibe coding project starts the same way for me: brainstorming requirements.

I use Claude web for this. Something about it works better for the back-and-forth Q&A sessions—the clarifying questions, the drilling down into what I actually want.

I start with a rough description of the plugin I need, then use my go-to prompt:

Claude web interface showing the initial brainstorming prompt for creating a Rank Math SEO abilities extension, requesting clarifying questions until 95% confident
PROMPT: Requirements for WordPress Abilities API SEO Extension
The Rank math WordPress plugin doesn't have REST API. Instead of building our own REST API, I want to use the latest abilities API from WordPress to create abilities for the Rank Math WordPress plugin. We are not building it on top of the Rank Math plugin. This is a standalone plugin. However, it does need the Rank Math plugin in order for it to work.

The abilities I'm thinking of are:

- Search posts, custom post types, pages (default: post) by keywords, categories, tags, custom taxonomies, id, author, date range, etc
- get post, custom post type, page (default: post) by id. This would retrieve the full content of the post including title, content, excerpt, featured image, taxonomies, author info, as well as Rank Math SEO data like focus keyword, meta title, meta description, and any other relevant SEO fields that Rank Math manages for that post.
- update the rank math seo data for a given post, custom post type, or page by id. This would include updating fields like focus keyword, meta title, meta description, schema settings, social media metadata, and any other SEO-related fields that Rank Math handles.

The main Rank Math plugin is located at: /Users/nathanonn/LocalSites/abilities-api/app/public/wp-content/plugins/seo-by-rank-math

You can read the codebase to understand how the main Rank Math plugin works.

Please use the "wp-abilities-api" skill to help you with any WordPress Abilities API related tasks.

The idea is to create a separate plugin that exposes a REST API for interacting with Rank Math SEO data using LLM via MCP server.

I want you to help me brainstorm for the requirements of this plugin. Focus on business logic and rules, user stories, and acceptance criteria. No need to include technical implementation details.
The Rank math WordPress plugin doesn't have REST API. Instead of building our own REST API, I want to use the latest abilities API from WordPress to create abilities for the Rank Math WordPress plugin. We are not building it on top of the Rank Math plugin. This is a standalone plugin. However, it does need the Rank Math plugin in order for it to work.

The abilities I'm thinking of are:

- Search posts, custom post types, pages (default: post) by keywords, categories, tags, custom taxonomies, id, author, date range, etc
- get post, custom post type, page (default: post) by id. This would retrieve the full content of the post including title, content, excerpt, featured image, taxonomies, author info, as well as Rank Math SEO data like focus keyword, meta title, meta description, and any other relevant SEO fields that Rank Math manages for that post.
- update the rank math seo data for a given post, custom post type, or page by id. This would include updating fields like focus keyword, meta title, meta description, schema settings, social media metadata, and any other SEO-related fields that Rank Math handles.

The main Rank Math plugin is located at: /Users/nathanonn/LocalSites/abilities-api/app/public/wp-content/plugins/seo-by-rank-math

You can read the codebase to understand how the main Rank Math plugin works.

Please use the "wp-abilities-api" skill to help you with any WordPress Abilities API related tasks.

The idea is to create a separate plugin that exposes a REST API for interacting with Rank Math SEO data using LLM via MCP server.

I want you to help me brainstorm for the requirements of this plugin. Focus on business logic and rules, user stories, and acceptance criteria. No need to include technical implementation details.

A few rounds of Q&A later, Claude compiles the full requirements:

Requirements document generated by Claude showing SEO Abilities for WordPress with table of contents including Plugin Overview, Ability Categories, Abilities List, and Business Rules sections

You can read the full requirements document here.

(I’m skipping the detailed brainstorming walkthrough this time. If you want the step-by-step breakdown, check my previous post—I covered the entire process there.)

.

.

.

Step 2: Project Folder Setup

Nothing glamorous here—but necessary.

VS Code file explorer showing wp-abilities-seo-extension project structure with .claude/skills folder containing build-insights-logger, mcp-builder, skill-creator, and wp-abilities-api skills, plus notes folder with requirements.md

I set up the project folder and install the wp-abilities-api skill.

I also installed three additional skills (optional, but useful):

  • build-insights-logger: Captures insights during the build so Claude Code learns from the process and avoids repeating mistakes
  • skill-creator: Creates new skills on the fly if needed
  • mcp-builder: In case I need to spin up an MCP server quickly

After that, I dropped the requirements into the notes/ folder and created a blank main plugin file (wp-abilities-seo-extension.php).

Ready to build.

.

.

.

Step 3: Build the Plugin with One Shot Prompt

Everything’s in place. Time to ask Claude Code to build the entire plugin.

One shot.

Yes, one prompt.

Sounds ambitious—maybe even reckless—but it works because the requirements are comprehensive and the wp-abilities-api skill handles the heavy lifting.

Claude Code terminal showing the initial prompt to build the plugin from scratch, referencing requirements.md, the wp-abilities-api skill, the build-insights-logger skill, and the Rank Math plugin location

Here’s the exact prompt:

Based on the requirements at @notes/requirements.md, please help me build the plugin from scratch.
Please use the "wp-abilities-api" skill to help you with any WordPress Abilities API related tasks.
Please use the "build-insights-logger" skill to automatically log meaningful insights, discoveries, and decisions during coding session.
The main Rank Math plugin is located at: /Users/nathanonn/Studio/wp-test/wp-content/plugins/seo-by-rank-math
You can read the codebase to understand how the main Rank Math plugin works.

Short prompt.

No novel required.

Why? Because everything Claude needs lives in the requirements document and the skills. The only addition: the Rank Math plugin location. Claude needs to read and understand the codebase of the plugin we’re extending.

That’s the critical piece for building third-party extensions. Point Claude at the source code.

I’m using Claude Code in Plan Mode with Opus 4.5. This lets it explore, research, and strategize before writing a single line of code.

Claude Code running two parallel Explore agents - one for exploring current project structure reading requirements.md, another for exploring Rank Math SEO structure, plus activating the wp-abilities-api skill

Claude fires up two explore agents in parallel:

  • One reads the project structure and requirements
  • One dives into the Rank Math codebase
Claude Code showing the Explore Rank Math SEO structure agent reading PHP files from the seo-by-rank-math plugin directory

Then it consults the wp-abilities-api skill to understand proper registration patterns:

Claude Code reading WordPress Abilities API documentation files including registering-abilities.md (444 lines), categories.md (100 lines), and error-handling.md (31 lines)

At this point, Opus 4.5 has a complete picture:

  1. The project state (empty plugin)
  2. Rank Math’s meta keys and helper functions
  3. WordPress Abilities API registration patterns

Time to plan.

Claude Code showing Plan agent completed with 28 tool uses and 95.5k tokens in 5m 18s, displaying implementation plan summary with architecture details, implementation order, and key patterns

The plan is comprehensive. Detailed architecture. Clear implementation phases. All thanks to Opus 4.5’s capabilities combined with thorough requirements.

Claude's implementation plan showing overview of 10 abilities across 3 categories, provider-based architecture, and detailed directory structure with src folder containing Plugin.php, AbilityRegistrar.php, Settings.php, and subfolders for Providers, Abilities, Services, and Errors
Plan details showing Rank Math Meta Keys table mapping SEO fields to meta keys, and Implementation Phases from Phase 1 (Core Infrastructure) through Phase 4 (SEO Meta Abilities) with numbered file list

I agreed to the plan. Implementation begins.

Claude Code starting implementation after plan approval, activating build-insights-logger skill, creating composer.json with PSR-4 autoloading, showing file contents being written

(The full build process is Claude generating codes while I drink coffee. Nothing riveting to watch.)

This is the part where I’d normally tell you to go make a sandwich.

But you won’t need to.

Less than 6 minutes later: Opus 4.5 completes the build.

Six minutes.

For a complete WordPress Abilities API plugin.

Stay with me here.

Claude Code build completion summary showing 21 PHP files created across Core Infrastructure, Provider Layer, Services, Error Handling, and 10 Abilities, with testing instructions via WP-CLI and REST API

21 PHP files. Core infrastructure. Provider layer. Services. Error handling. All 10 abilities implemented.

Because I included the build-insights-logger skill in my prompt, Claude captured every key decision and discovery during development:

Claude Code writing 72 lines of insights to session log file, showing architecture insight about Provider-based SEO Plugin Abstraction with ProviderInterface defining contracts and RankMathProvider implementing Rank Math-specific logic

These insights become documentation.

Learning material for the next build.

.

.

.

Step 4: Test the Plugin with Claude Code

Build complete.

But before we pop any champagne (or, you know, instant coffee)—we test.

Claude Code terminal showing test prompt asking to activate and test the plugin via REST API, verify MCP discovery shows all 10 abilities, and test error handling with invalid post IDs

Here’s my testing prompt:

Please activate & test out the plugin:
- Test all the abilities via REST API. Example endpoint:
    `GET /wp-json/wp-abilities/v1/seo-abilities/get-seo-meta/run?input[post_id]=1`
- Verify that the MCP discovery shows all 10 abilities correctly.
- Test error handling by providing invalid post IDs and ensuring that the plugin responds appropriately.
Please use the "wp-abilities-api" skill to help you with any WordPress Abilities API related tasks.
Please use the "build-insights-logger" skill to automatically log meaningful insights, discoveries, and decisions during coding session.
You have access to WP-CLI commands to help you with the development and troubleshooting.

Three focus areas:

  1. Test abilities via REST API
  2. Verify MCP discovery shows all 10 abilities
  3. Test error handling with invalid inputs

Claude runs through the tests:

Claude Code executing REST API tests in parallel using curl commands to test get-seo-meta, get-social-meta, get-seo-score, get-post-images, and other ability endpoints

(Again, nothing thrilling here. Claude does the work. I watch with my coffee.)

Test results come in:

Test completion summary showing all 10 abilities working with green checkmarks, including get-seo-meta, update-seo-meta, get-social-meta, bulk operations, and error handling verification

All 10 abilities working. MCP discovery correct. Error handling validated.

The summary shows exactly what each ability does and any notable behaviors.

.

.

.

Step 5: Use Test Results for Improvements

Tests passed.

But—and this is important—passing tests doesn’t mean perfect code.

I asked Opus 4.5 to analyze the test results and suggest improvements:

Claude Code prompt in plan mode asking to identify areas needing improvement or further testing based on test results, and come up with a plan to address them
Based on your test results, identify the areas that may need improvement or further testing, and come up with a plan to address them.

Claude explores the codebase again, this time hunting for edge cases and potential issues:

Claude Code showing two Explore agents finished examining permission/error handling and image abilities, creating improvement plan, and asking clarifying question about handling orphaned images

It found several areas to improve:

  • Permission callback consistency
  • Image validation for orphaned images (HTML references to non-existent attachments)
  • Output schema enhancements

Claude even asked a clarifying question about handling orphaned images. (I chose the recommended option: add new fields to distinguish orphaned images while preserving the original reference ID for debugging.)

Improvements implemented:

Implementation summary showing changes made to AbilityRegistrar.php (permission callbacks), ImageService.php (attachment validation), and GetPostImagesAbility.php (output schema), with test results showing all improvements working including 29 orphaned images detected

The changes:

  1. Permission Callbacks: Changed 7 abilities from check_edit_post_permission to check_edit_posts_permission for better error handling
  2. Image Validation: Added attachment existence validation, new is_orphaned and referenced_id fields for orphaned images
  3. Output Schema: Added images_orphaned count to the get_post_images return data

All verified with fresh tests. 29 orphaned images detected correctly on my site. The schema updates reflected in MCP discovery.

.

.

.

Step 6: Put the Plugin to Work

Everything’s built and tested.

Now comes the fun part—actually using it.

The process mirrors what we did with the internal links plugin. First, install the MCP Adapter plugin into your WordPress site.

WordPress plugins page showing MCP Adapter plugin version 0.1.0 by WordPress.org Contributors, with description "Adapter for Abilities API, letting the abilities to be used as MCP tools, resources or prompts"

(You can download the MCP Adapter from their GitHub releases page.)

With the adapter active, I asked Claude what abilities my WordPress site has:

Claude Code response showing 10 SEO abilities available across three categories - SEO Meta Management (get-seo-meta, update-seo-meta, bulk-update-seo-meta), Social Media Meta (get-social-meta, update-social-meta), SEO Analysis (get-seo-score, find-posts-with-seo-issues), and Image Optimization (get-post-images, update-image-alt-text, bulk-update-image-alt-text)

All 10 abilities visible. Three categories. Ready to go.

Now for the moment of truth—the reason I built this whole thing in the first place.

I asked Claude to optimize SEO for a specific post:

Claude Code prompt in plan mode asking to optimize post ID 1557 for SEO, scanning content and current setup first, then proposing improvements within available abilities
I want to optimize my post for SEO (ID: 1557). First, scan the post to understand its content and current SEO setup. Then, propose improvements that fall within your abilities.

Claude immediately starts gathering data. Multiple abilities firing in parallel:

Claude Code executing four MCP abilities in parallel - get-seo-meta, get-social-meta, get-seo-score, and get-post-images - all returning success with data for post ID 1557

Four abilities. One request. All the SEO data I need.

Here’s what Claude found—and honestly, it stings a little to share this:

Current SEO Status table showing post "My App Looked Like Everyone Else's Until I Discovered This Claude Skill Trick" with SEO Score 33/100 (Poor), title too long at 82 characters, description too long at 202 characters, missing keyword in title, social meta empty, and 3 images all missing alt text

The diagnosis:

  • SEO Score: 33/100 (Poor)
  • Title: 82 characters (max recommended: 60)
  • Description: 202 characters (max: 160)
  • Keyword in title: Missing
  • Social meta: Completely empty
  • Images: 3 total, 0 with alt text

Ouch.

But also? Exactly why I built this plugin.

Claude analyzed the issues and proposed a complete optimization plan:

SEO Optimization Plan Summary showing current vs proposed fixes - SEO Title shortened from 82 to 58 chars with keyword, Meta Description from 202 to 153 chars, Social Meta to be configured, and three images with proposed descriptive alt text. Expected result: SEO score improvement from 33 to 80+

The plan covers everything: shorter title with keyword, trimmed description, Facebook/Twitter metadata, and contextual alt text for all three images.

Expected result: SEO score from 33 → 80+.

I approved. Claude executed:

Claude Code executing update-seo-meta and update-social-meta abilities via MCP, setting new SEO title "Claude Skill Design System: Create Reusable Frontend Styles" and description, plus Facebook and Twitter metadata
Claude Code updating image alt text individually for three attachments - financial dashboard image (ID 1575), Claude Code terminal screenshot (ID 1576), and dashboard design variants (ID 1577) - after bulk update failed

Interesting note: the bulk image update failed, so Claude adapted and updated each image individually. Problem-solving on the fly.

SEO Optimization Complete summary showing before/after comparison - SEO Title from 82 chars to 58 chars with keyword, Description from 202 to 153 chars with keyword, Social Meta now configured, Images with Alt Text from 0/3 to 3/3. All 5 SEO tests now pass (previously: 1 pass, 3 warnings, 1 fail)

Results summary:

MetricBeforeAfter
SEO Title82 chars (too long, no keyword)58 chars ✅ with keyword
Meta Description202 chars (too long, no keyword)153 chars ✅ with keyword
Social MetaEmptyFacebook & Twitter configured ✅
Images with Alt Text0/33/3 ✅

All 5 SEO tests now pass. Previously: 1 pass, 3 warnings, 1 fail.

Let me verify in the WordPress admin:

Rank Math SEO panel in WordPress showing SEO score improved to 71/100, with preview displaying new title "Claude Skill Design System:..." and description, focus keyword "claude skill design system" set and highlighted

SEO score: 71/100.

Not quite the 80+ the plan aimed for—but jumping from 33 to 71? I’ll take it.

Especially considering I did nothing except approve a plan.

Rank Math Preview Snippet Editor showing General tab with optimized title "Claude Skill Design System: Create Reusable Frontend Styles" at 59/60 characters, permalink, and description at 152/160 characters with visual length indicators

The snippet preview shows proper character counts. Title at 59/60. Description at 152/160. Both in the green zone.

And the images:

WordPress block editor showing financial dashboard image with Image settings panel displaying alt text "Smashing Advantage financial dashboard with dark theme showing income, expenses, profit metrics and charts"
WordPress block editor showing Claude Code terminal screenshot with Image settings panel displaying alt text "Claude Code terminal invoking frontend-design skill to explore dashboard implementation"
WordPress block editor showing dashboard design variants image with Image settings panel displaying alt text "Five dashboard design variants generated by Claude Skill: Neo-Brutalist, Glass Aurora, Editorial Mono, Warm Minimal, and Dark Command"

All three images now have descriptive, contextual alt text. Claude understood what each image showed and wrote appropriate descriptions.

.

.

.

Try It Yourself

Want to run this on your own site?

  1. Download the plugin: https://github.com/nathanonn/wp-abilities-seo-extension/releases/download/v1.0.0/wp-abilities-seo-extension-latest.zip
  2. Install the MCP Adapter: Grab it from the GitHub releases page
  3. Follow the setup instructions: Check the README for configuration details
  4. Connect Claude Code (or any MCP-compatible AI agent)
  5. Start optimizing

If you want to extend the plugin further—maybe add content analysis, FAQ generation, or schema markup—fork the repo:

github.com/nathanonn/wp-abilities-seo-extension

.

.

.

What We Built (And What It Means)

Let’s zoom out for a second.

In under 6 minutes of build time, we created a WordPress plugin that:

  • Exposes 10 SEO abilities through the WordPress Abilities API
  • Integrates with Rank Math (with architecture ready for Yoast, AIOSEO, etc.)
  • Lets AI agents read, analyze, and update SEO settings
  • Handles bulk operations for mass optimization
  • Manages image alt text across your entire content library

The real unlock?

Your WordPress site now speaks MCP.

Any AI agent—Claude Code, custom bots, automation pipelines—can now optimize your SEO programmatically. No clicking through admin panels. No manual data entry. No tedious bulk editing. You describe what you want. The AI executes using the abilities you’ve exposed through the WordPress Abilities API.

This is the promise of WordPress 6.9’s Abilities API.

And we’re just scratching the surface.

.

.

.

What’s Next?

Two plugins down. Both solving real problems I face on my own site.

The pattern works:

  1. Brainstorm requirements with Claude
  2. Set up project with the right skills
  3. One-shot build with comprehensive prompt
  4. Test and iterate
  5. Deploy and use

For extending third-party plugins, add one step: point Claude at the source code.

Remember those 28 weeks of newsletters I mentioned at the start? The mountain of SEO work that made me want to lie down and stare at the ceiling?

It’s not a mountain anymore.

It’s a checklist. And I have an AI agent with a pen.

What tedious WordPress task are you going to automate next?

The WordPress Abilities API is waiting.

Go build something.

Nathan Onn

Freelance web developer. Since 2012 he’s built WordPress plugins, internal tools, and AI-powered apps. He writes The Art of Vibe Coding, a practical newsletter that helps indie builders ship faster with AI—calmly.

Join the Conversation

Leave a Comment

Your email address will not be published. Required fields are marked with an asterisk (*).

Enjoyed this post? Get similar insights weekly.