Skip to main content

Plugin Elementary

Build a WordPress features plugin from this skeleton, then keep the examples and tools your project needs. Start with Getting Started.

How the pieces fit​

The skeleton is a consumer of shared rtCamp libraries. It owns the plugin's structure, examples, build and checks; the libraries own the reusable behaviour.

PieceWhat it providesWhere it is documented
This skeletonPlugin layout, Main::CLASSES, modules, example classes, asset pipeline, tests, CI callerThese guides
rtcamp/wp-primitivesRegistrable + Loader + Container, the Abstract* base classes, asset/component/template loaders, Cache, Transients, Encryptor, LoggerFramework docs (linked from each guide)
@rtcamp/wp-toolingnpm run init engine, npx wp-tooling add scaffolds, shared ESLint/Stylelint configs, release scriptswp-tooling docs
rtCamp/wp-shared-workflowsReusable lint, test and build workflowswp-shared-workflows docs

Two ways to work​

The skeleton is set up and extended either with AI skills (guided: /init and /scaffold) or the raw CLI (manual: npm run init and npx wp-tooling add).

  • /init / npm run init names the plugin and selects which example sets and optional features ship. Run it once per project; see Initialization.
  • /scaffold / npx wp-tooling add adds one feature (a post type, REST controller, block, CLI command, …). /scaffold also wires it into its module; with the CLI you add that line yourself. See Scaffolding.

Both are valid: pick the CLI for full control over every input, or the AI skill when you want it to infer conventions, write the test first and run the checks.

I want to…Read
Create a plugin and see it runningGetting Started
Understand the init prompts or change options laterInitialization
Run WordPress, check a change, build for deliveryLocal development
Find the supplied infrastructure and examplesIncluded features
Generate one feature with the CLI or AIScaffolding
Add blocks, scripts or stylesBlocks and assets
Extend the plugin by handDevelopment guide

Further reading​

Command reference​

TaskCommand
Personalize the plugin (AI)/init <brief>
Personalize the plugin (CLI)npm run init
Check identity and feature statenpm run init -- --list
Generate a feature (AI)/scaffold <description>
Preview a feature (CLI)npx wp-tooling add wp/<kind> ... --dry-run
Start / stop WordPressnpm run wp-env start / npm run wp-env stop
Watch and build assetsnpm start / npm run build:prod
Run PHP testsnpm run test:php
Run PHP checkscomposer lint && composer phpstan
Run JS and CSS checksnpm run lint:js && npm run lint:css && npm run test:js