wp-plugin-hooks

Design and document WordPress plugin hook APIs with prefixes and docblocks.

21|1|Updated Apr 29, 2026
One-click install
npx skills add https://github.com/Lonsdale201/wp-agent-skills --skill wp-plugin-hooks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wp-plugin-hooks
Source: https://github.com/Lonsdale201/wp-agent-skills/tree/main/plugin-scaffold/wp-plugin-hooks
Command: npx skills add https://github.com/Lonsdale201/wp-agent-skills --skill wp-plugin-hooks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Managing a plugin's public extension surface with custom actions and filters can become inconsistent and brittle. This skill outlines conventions to design stable hook APIs, enforce safe deprecation, and ensure downstream developers have a clear contract.

Core Features & Use Cases

  • Prefix all custom hooks with the plugin slug to avoid collisions and improve discoverability.
  • Document every hook with docblocks, including @since tags and parameter descriptions to enable IDEs and tools to surface useful information.
  • Provide a safe deprecation path using apply_filters_deprecated and do_action_deprecated, maintaining backward compatibility during migrations.
  • Use when designing a new API surface, reviewing PRs that add or modify hooks, or migrating legacy hooks to a managed surface.

Quick Start

Define a plugin's public hooks with a consistent prefix and document them thoroughly in SKILL.md.

Frequently Asked Questions about wp-plugin-hooks

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a stable WordPress plugin hook API for extensions?

To design a stable WordPress plugin hook API, prefix all custom actions and filters with the plugin slug to prevent collisions, and document every hook with comprehensive docblocks including @since tags and parameter descriptions for a clear downstream contract.

What is the best way to deprecate WordPress plugin hooks without breaking backward compatibility?

The best way to deprecate WordPress plugin hooks while maintaining backward compatibility is using apply_filters_deprecated and do_action_deprecated, which provide versioned deprecation and safe migration paths for downstream developers.

Why should I prefix custom WordPress plugin hooks with the plugin slug?

Prefixing custom WordPress plugin hooks with the plugin slug avoids naming collisions with other extensions and significantly improves hook discoverability for downstream developers integrating with your API.

How do I document WordPress plugin hooks for IDEs and tools?

Document WordPress plugin hooks by adding comprehensive docblocks to every action and filter, including @since tags and parameter descriptions, enabling IDEs and tools to surface useful information to developers.

Can I use this approach to migrate legacy WordPress hooks to a managed API surface?

Yes, you can migrate legacy WordPress hooks to a managed API surface by enforcing naming conventions, applying versioned deprecation, and maintaining backward-compatible migration paths for existing extensions.