The starting template for a WordPress features plugin: the plugin that holds a site's backend functionality — post types, taxonomies, blocks, REST endpoints, settings and admin pages, shortcodes, user roles, WP-Cron jobs and WP-CLI commands.
This skeleton gives a new client plugin its structure, working examples, asset pipeline, checks and CI, so a project starts from a tested baseline instead of an empty folder.
It builds on two shared rtCamp libraries and uses a third for CI:
rtcamp/wp-primitives(Composer, runtime): the registration system,Abstract*base classes, loaders and utilities that every class ininc/extends.@rtcamp/wp-tooling(npm, development): thenpm run initsetup wizard, thenpx wp-tooling addfeature scaffolder, the shared lint configs and release scripts.rtCamp/wp-shared-workflows: the reusable lint, test and build CI that.github/workflows/test-measure.ymlcalls.
The skeleton documents what it provides and how to build on it. The framework's API and lifecycle are documented in its own docs, and these guides link there where needed.
This is a template.
Project Name/project-name/Project_Nameare placeholders;npm run initrenames them to your project.
Create a new plugin with Composer, or clone this repository:
composer create-project rtcamp/plugin-elementary my-pluginThen follow Getting Started: prerequisites, getting the skeleton, installing, naming the plugin, and seeing it running in a local WordPress site. It takes about fifteen minutes.
- Infrastructure that stays in every project: bootstrap and loader, asset registration, theme-overridable templates and components, a shared logger, an encryption service, activation and deactivation handling, and PHPUnit, PHPCS, PHPStan, ESLint and Stylelint setups.
- Twelve example sets, one per feature domain (post types, taxonomies, blocks, REST, WP-CLI, cron, settings pages, admin pages, user roles, shortcodes, cache, transients). Each is a working, tested reference you keep or remove at setup.
- Optional development features: HMR live reload (on by default), Tailwind CSS, and Dev Tools runtime telemetry over MCP.
See Included features for where each one lives and how to see it working.
| I want to… | Read |
|---|---|
| Name the plugin and choose what ships | Initialization |
| Run WordPress locally, check a change, build for delivery | Local development |
| See what the skeleton already provides | Included features |
| Generate a feature with the CLI or AI | Scaffolding |
| Add blocks, scripts or styles | Blocks and assets |
| Extend the plugin by hand | Development guide |
| Contribute to this skeleton | Contributing |
The full documentation index is docs/index.md.
Setup and feature scaffolding are also available through AI assistants, kept in step across tools:
- Claude Code: skills in
.claude/skills/—/init(set up or manage the plugin) and/scaffold(add one feature, test first)./setupis a generic tooling bootstrapper and does not replace/init. - GitHub Copilot: matching
/initand/scaffoldprompts in.github/prompts/. - Any assistant: AGENTS.md is the tool-agnostic source of conventions;
CLAUDE.mdand.github/copilot-instructions.mdpoint to it.
A committed knowledge graph in graphify-out/ lets assistants query the code's structure instead of reading it all; see docs/internal/knowledge-graph.md.
project-name-features.php # entry: constants → Autoloader::autoload() → Main::get_instance()
inc/ # PSR-4 root: Project_Name\Features\ → inc/
├── Autoloader.php # loads vendor/autoload.php; admin notice instead of a fatal if missing
├── Main.php # Main::CLASSES — the list of everything the plugin loads
├── Core/ # always loaded: Assets, PluginSetup, Components, Templates, Encryption, Logger
├── Helpers/ # stateless static utilities (Util)
└── Modules/ # one module per feature domain, concrete classes in the matching subfolder
├── PostTypes/ Taxonomies/ Blocks/ Shortcodes/
├── REST/ CLI/ Cron/
├── Settings/ Admin/ Roles/
└── Cache/ Transients/
src/{blocks,css,js}/ # editable sources → assets/build/ (generated)
templates/ # theme-overridable PHP templates
tests/{php,js}/ # PHPUnit (mirrors inc/) and Jest
bin/ # init wrapper, scaffold config, block scaffolder, helper scripts
docs/ # these guides; docs/internal/ is for skeleton maintainers
.github/ # CI caller, issue/PR templates, Copilot instructions and prompts
vendor/rtcamp/wp-primitives/ # the framework (Composer-managed; never edit)
Some of these folders hold examples that initialization can remove; see Included features.
