Skip to content
bobmatnyc avatar

Wordpress Security Validation

Security-first WordPress guide covering nonces, sanitization, validation, and escaping against XSS, CSRF, and SQL injection.

CCM score
54 of 100
skills.sh installs
643
GitHub stars
79
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the three-layer model: sanitize on input, validate for logic, and escape on output
  • Walks through nonce patterns for forms, URL actions, and AJAX requests with matching capability checks
  • Shows before-and-after code contrasting vulnerable handlers with hardened versions using wp_nonce_field, wp_verify_nonce, and check_ajax_referer
  • Designed for plugin and theme developers targeting WordPress 6.7+ and PHP 8.3+

Install

$ npx -y skills add bobmatnyc/claude-mpm-skills --skill wordpress-security-validation -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

WordPress Security & Data Validation

Version: 1.1.0 Target: WordPress 6.7+ | PHP 8.3+ Skill Level: Intermediate to Advanced

Overview

Security is not optional in WordPress development—it's fundamental. This skill teaches the three-layer security model that prevents XSS, CSRF, SQL injection, and other common web vulnerabilities through proper input sanitization, business logic validation, and output escaping.

The Golden Rule: "Sanitize on input, validate for logic, escape on output."

Why This Matters

Every year, thousands of WordPress sites are compromised due to security vulnerabilities in plugins and themes. Most of these attacks exploit one of three weaknesses:

  1. XSS (Cross-Site Scripting): Malicious JavaScript injected through unsanitized output
  2. CSRF (Cross-Site Request Forgery): Unauthorized actions performed on behalf of authenticated users
  3. SQL Injection: Database manipulation through unsanitized database queries

This skill provides complete, production-ready patterns for preventing all three attack vectors.


The Three-Layer Security Model

Details

Repository
github.com/bobmatnyc/claude-mpm-skills
Categories
Security, PHP & Laravel
First seen
Jun 3, 2026

Questions

What does the wordpress-security-validation skill do?

wordpress-security-validation teaches a three-layer security model for WordPress plugins and themes: sanitize input, validate logic, and escape output. It covers nonces, sanitization, validation and escaping to prevent XSS, CSRF and SQL injection vulnerabilities.

Who should use the wordpress-security-validation skill?

wordpress-security-validation is aimed at WordPress developers at intermediate to advanced level who handle user input in forms or AJAX. It targets WordPress 6.7+ and PHP 8.3+ projects.

How do I install the wordpress-security-validation skill?

Run this command in your project: npx -y skills add bobmatnyc/claude-mpm-skills --skill wordpress-security-validation -y. Once installed, wordpress-security-validation gives your agent WordPress nonce, sanitization and escaping patterns to follow.

Which category does wordpress-security-validation belong to?

wordpress-security-validation is listed in the Security category on Claude Marketplaces. Its focus is preventing XSS, CSRF and SQL injection in WordPress code through nonces and capability checks.

More from bobmatnyc/claude-mpm-skills

All 154

Similar to Wordpress Security Validation

More Security