Agent Skill · WordPress

wp-plugin-development

Use when developing WordPress plugins: architecture and hooks, activation/deactivation/uninstall, admin UI and Settings API, data storage, cron/tasks, security (nonces/capabilities/sanitization/escaping), and release packaging.

Provider: WordPress Path in repo: skills/wp-plugin-development/SKILL.md

Skill body

WP Plugin Development

When to use

Use this skill for plugin work such as:

Inputs required

Procedure

0) Triage and locate plugin entrypoints

  1. Run triage:
    • node skills/wp-project-triage/scripts/detect_wp_project.mjs
  2. Detect plugin headers (deterministic scan):
    • node skills/wp-plugin-development/scripts/detect_plugins.mjs

If this is a full site repo, pick the specific plugin under wp-content/plugins/ or mu-plugins/ before changing code.

1) Follow a predictable architecture

Guidelines:

See:

2) Hooks and lifecycle (activation/deactivation/uninstall)

Activation hooks are fragile; follow guardrails:

See:

3) Settings and admin UI (Settings API)

Prefer Settings API for options:

See:

4) Security baseline (always)

Before shipping:

See:

5) Data storage, cron, migrations (if needed)

See:

Verification

Failure modes / debugging

See:

Escalation

For canonical detail, consult the Plugin Handbook and security guidelines before inventing patterns.

Skill frontmatter

compatibility: Targets WordPress 6.9+ (PHP 7.2.24+). Filesystem-based agent with bash + node. Some workflows require WP-CLI.