Repository inventory

automattic/agent-skills

Skills indexed from this repository, with install-style signals scoped to the repo.
13 skills2.1K GitHub stars0 weekly installsJavaScriptGitHubOwner profile

Overview

This skill helps build, extend, and debug WordPress REST API endpoints and routes. It covers registering routes, controller classes, schema/argument validation, permission checks, response shaping, and exposing custom post types and taxonomies via show_in_rest. Use it to make endpoints robust, secure, and discoverable.

How this skill works

I inspect the repository for rest_api_init usage, register_rest_route calls, WP_REST_Controller subclasses, and show_in_rest flags to locate existing REST logic. I recommend patterns: exposing CPTs via show_in_rest, creating custom routes on rest_api_init, using controller classes for non-trivial endpoints, and defining args schemas with validate/sanitize callbacks. I also verify authentication, permissions, response shaping (register_rest_field/register_meta), and discovery/pagination behavior.

When to use it

  • Adding or updating REST routes and controller logic
  • Debugging 401/403/404 errors, missing nonces, or permission issues
  • Adding custom fields or meta to REST responses
  • Exposing custom post types or taxonomies via show_in_rest
  • Implementing schema and argument validation for endpoint inputs

Best practices

  • Use a unique namespace like vendor/v1; avoid colliding with wp/*
  • Always provide a permission_callback; use capability checks for auth
  • Define args with type/default/required and validate/sanitize callbacks or JSON Schema
  • Return responses with rest_ensure_response() and errors as WP_Error with status
  • Prefer controller classes for complex endpoints and register_meta/show_in_rest for meta

Example use cases

  • Expose a custom post type to wp/v2 by setting show_in_rest and a rest_base
  • Create a search endpoint with a WP_REST_Controller subclass and paginated responses
  • Add a computed field to post responses using register_rest_field and a callback
  • Debug a 403 from missing X-WP-Nonce in admin AJAX by checking cookie auth flow
  • Validate complex JSON input using rest_validate_value_from_schema and schema defs

FAQ

Check that rest_api_init runs (correct hook and plugin loaded), verify the route namespace/method, and test with ?rest_route= to bypass permalinks.

How should I handle authentication for external clients?

Use application passwords or an auth plugin for external clients; for admin JS use cookie auth with X-WP-Nonce and capability checks in permission_callback.

13 skills

wp-rest-api
Api

This skill helps you create, debug, and extend WordPress REST API endpoints, ensuring proper authentication, validation, and data shaping.

BackendDebuggingSecurityTesting+1
wpds
Accessibility

This skill helps you build WordPress UI components aligned with WPDS tokens and patterns, leveraging the MCP server for authoritative docs.

DesignDocsFrontendProduct+2
wp-phpstan
Automation

This skill helps you configure and fix PHPStan for WordPress projects, including stubs, baselines, and WP-specific typing.

Code ReviewDebuggingDevopsLinting+2
wp-playground
Automation

This skill lets you quickly spin disposable WordPress playgrounds, mount plugins/themes, switch WP/PHP versions, and debug with Xdebug.

BackendCliDebuggingDevops+2
wp-block-development
Code Review

This skill helps you create, update, and migrate WordPress Gutenberg blocks by guiding block.json, registration, rendering, and tooling.

DebuggingDocsFrontendMigration+2
wp-performance
Backend

This skill helps you diagnose and optimize WordPress performance using backend profiling, measurements, and targeted bottleneck fixes.

DebuggingPerformanceJavascript
wp-project-triage
Automation

This skill quickly detects WordPress project type from the repository and outputs a structured JSON report to guide workflows.

Ci CdCliDebuggingScripting+2
wp-interactivity-api
Api

This skill helps you implement and debug WordPress Interactivity API features, including directives, stores, and server-side rendering for hydration

DebuggingDocsFrontendPerformance+1
wp-abilities-api
Api

This skill guides implementing the WordPress Abilities API, including registration, REST exposure, and client consumption for secure permissions.

BackendDebuggingDocsTesting+1
wp-wpcli-and-ops
Automation

This skill helps you manage WordPress operations via WP-CLI safely, including search-replace, backups, updates, and multisite scripting.

BackendCliDevopsOperations+2
wp-block-themes
Code Review

This skill helps you develop WordPress block themes by managing theme.json, templates, patterns, and style variations across Site Editor workflows.

DebuggingDocsFrontendScripting+2
wp-plugin-development
Backend

This skill helps you develop secure, maintainable WordPress plugins by guiding architecture, hooks, settings, migrations, and packaging.

Code ReviewDocsMigrationRelease+3
wordpress-router
Automation

This skill identifies WordPress codebase type (plugin, theme, block, or full site) and routes tasks to the correct domain workflow.

BackendCliDebuggingFrontend+2
More from this maintainer
Other repositories and skills published under the same GitHub owner.
Skills library
Jump back to the full directory or explore grouped topics.
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational