Skip to content
Back to skills

Wp Rocket Frontend Architecture

ASecurity

Use this skill when changing admin JavaScript, CSS, or HTML/Twig templates in WP Rocket.

  • 769 stars
  • 0 votes
  • 0 copies
  • 9 views
  • Added September 12, 2026
databasesjavascriptjavaphpapifrontend

Works with

  • cli
  • api

Security analysis

A100/100

Scanned September 12, 2026

npx -y skills add wp-media/wp-rocket --skill wp-rocket-frontend-architecture --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Wp Rocket Frontend Architecture?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Wp Rocket Frontend Architecture
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/wp-media-wp-rocket-frontend-architecture/badge)](https://www.skillsdirectory.com/skills/wp-media-wp-rocket-frontend-architecture)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: wp-rocket-frontend-architecture
description: Use this skill when changing admin JavaScript, CSS, or HTML/Twig templates in WP Rocket.
---

# WP Rocket — Frontend Architecture

Guidelines for JavaScript, CSS, and template changes in WP Rocket's admin UI.

## Core principles

- No jQuery — use native DOM APIs only.
- No inline event handlers (`onclick`, `onchange`, etc.) — use `addEventListener`.
- No unsafe `innerHTML` assignments — use `textContent` or `createElement`/`appendChild`.
- Use event delegation where appropriate (admin pages can load content dynamically).

## Admin settings UI

- Settings page templates live in `views/`.
- JS for the settings page lives in `assets/js/`.
- Use `wp_localize_script` to pass PHP data to JS — never inline `<script>` blocks with data.
- Nonces must be localized — never hardcoded.
- New JS entry points must be registered and enqueued through a Subscriber.

## AJAX / REST

- Use native `fetch` with the localized nonce for REST calls.
- Use `wp.ajax` for legacy AJAX (`admin-ajax.php`) if already present in the area.
- Always handle errors explicitly — no silent failures.

## Structural expectations

- JS files live under `assets/js/`.
- CSS files live under `assets/css/`.
- No new global variables — use module patterns or data attributes to share state.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in databases →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.