wp-plugin-architecture

Community

Architect WordPress plugins with solid structure.

AuthorLonsdale201
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Designs and reviews the internal architecture of a WordPress plugin — folder layout, PSR-4 one-class-per-file discipline, Schema/Constants placement, composition-root vs singleton decisions, conditional asset enqueueing, script config via wp_add_inline_script, and prefixed custom-hook naming. Use when scaffolding includes/src, reviewing class organization, asset enqueue code, repeated strings, or "should I make this a singleton" decisions.

Core Features & Use Cases

  • Two organization strategies: By-type and By-feature, with guidance on when to choose each.
  • Centralization of constants and hooks: promote code reuse and reduce typos.
  • Asset enqueueing best practices: correct hooks, gating, dependencies, cache busting, and inline scripts.
  • Hook naming conventions: consistent prefixing to avoid collisions.

Quick Start

Choose an organization strategy (By-type or By-feature) for your plugin and implement centralized constants and proper hook naming.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: wp-plugin-architecture
Download link: https://github.com/Lonsdale201/wp-agent-skills/archive/main.zip#wp-plugin-architecture

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.