wp-rocket-architecture
Skill by wp-media
Enforces WP Rocket's internal architecture patterns for developers changing services, subscribers, containers, constants, filters and pull requests. It guards the core caching engine code.
Install wp-rocket-architecture
Built from the published package, never by AI.
git clone --depth 1 https://github.com/wp-media/wp-rocket /tmp/wp-rocket && mkdir -p ~/.claude/skills && cp -r /tmp/wp-rocket/.claude/skills/wp-rocket-architecture ~/.claude/skills/wp-rocket-architectureRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/wp-media/wp-rocket /tmp/wp-rocket && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/wp-rocket/.claude/skills/wp-rocket-architecture ~/.gemini/antigravity-cli/skills/wp-rocket-architectureAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install wp-rocket-architecture in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This agent skill sets the rules for changing the internal structure of WP Rocket. It covers Subscribers that register WordPress hooks, ServiceProviders that wire classes in the League Container, and Context classes that hold conditional feature logic. It also covers filters, plugin settings, and constants. Filters must use wpm_apply_filters_typed(), settings must be read through injected Options_Data, and constants must be read with rocket_get_constant(). The skill describes PHPStan custom rules that must pass, including checks for subscribed event methods and no hooks inside database classes. It also documents the standard module directory layout, BerlinDB table versioning, and the pull request body template. It is written for developers and AI assistants working on the WP Rocket codebase.
Written from the project's SKILL.md and checked against it.
What it can do
- Subscriber patternRequires every WordPress hook to go through a Subscriber class instead of add_action or add_filter.
- ServiceProvider wiringDescribes binding classes in the League Container with addShared() and add() and declaring $provides.
- Typed filtersRequires new filters to use wpm_apply_filters_typed() with a docblock and a supported type.
- Options injectionRequires plugin settings to be read through injected Options_Data instead of get_option().
- Constant handlingRequires reading constants with rocket_get_constant() and explains how to stub them in unit tests.
- PHPStan custom rulesLists the four custom rules that must pass, including DiscourageApplyFilters and NoHooksInORM.
- Module structureShows the standard directory layout for a feature module with Admin, Frontend, Context and Database folders.
- BerlinDB versioningShows how custom table versions use a YYYYMMDD value with upgrade steps.
- Pull request templateRequires PR bodies to follow the orchestrator PR template with exact section headings.
What you need
- PHPStan with the WP Rocket custom rules
- PR Template Checker CI (wp-media/pr-checklist-action) for pull requests
Try asking
- Add a new filter to WP Rocket using wpm_apply_filters_typed
- Refactor this WP Rocket class to read settings through Options_Data
- Write a unit test for a WP Rocket constant using rocket_get_constant
Good to know
- Do not modify inc/Dependencies/, which holds Mozart-bundled vendored code.
- Outside the delivery pipeline, do not run git commit or git push.
- Business logic must not go inside ServiceProvider register().
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .claude/skills/wp-rocket-architecture/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to wp-rocket-architecture
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
wp-rocket-architecture: common questions
What does wp-rocket-architecture check in WP Rocket code?
It checks that hooks go through Subscribers, filters use wpm_apply_filters_typed(), settings use Options_Data, and constants use rocket_get_constant(). It also lists PHPStan custom rules that must pass.
Who is this skill for?
It is for developers and AI assistants changing service structure, Subscribers, ServiceProviders, Container wiring, or core caching engine code in WP Rocket.
Does it cover pull request descriptions?
Yes. It requires every PR body to follow the orchestrator pr-template.md with section headings copied exactly, or the PR Template Checker CI fails.
How do I install wp-rocket-architecture?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is wp-rocket-architecture free?
The code is published under the GPL-2.0 licence. The service it connects to may have its own pricing.
Is wp-rocket-architecture safe to use?
It scores 77 of 100. Grades: maintenance A, licence C, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to wp-rocket-architecture?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
