Skip to content

Back to the catalog

github.comrepo

WordPress Security Skills

WordPress-Security-Skills is a GitHub repo of modular 'Agent Skills' (per the open Agent Skills spec) that install into AI coding agents like Claude Code, Cursor, Codex, OpenCode, and Gemini CLI to guide secure-by-default WordPress plugin/theme development and security code review. Each skill targets a documented failure mode in AI-generated WordPress code — missing nonce checks, broken authorization, missing output escaping, unprepared SQL queries — with when-to-use guidance, common AI mistakes (wrong vs right), code examples, and checklists tied to official WordPress API references. It is explicitly instructional Markdown/PHP reference material, not a scanner or automatic protection, meant for developers and reviewers auditing AI-written or third-party WordPress code.

TL;DR Installable 'Agent Skills' pack that teaches AI coding agents (Claude Code, Cursor, Codex, OpenCode, Gemini CLI) secure WordPress coding patterns and vulnerability review checklists.
Document

What it is

Concrete install and usage procedure for the WordPress-Security-Skills repo — a set of Agent Skills conforming to the open Agent Skills spec. The summary covers what the skills contain; the page carries how to install them, verify them, and drive a review, plus version boundaries the summary omits.

What to do

Two install paths. With Node.js, the skills CLI installs directly from the repo:

# Interactive (pick skills and scope):
npx skills add wpultimatesecurity/WordPress-Security-Skills

# Non-interactive, all skills:
npx --yes skills add wpultimatesecurity/WordPress-Security-Skills

Or copy directories manually. Skills are plain directories; each is a SKILL.md (name + description frontmatter) plus a references/ folder. Per-agent destinations:

# Claude Code — personal / project:
mkdir -p ~/.claude/skills && cp -r skills/* ~/.claude/skills/
mkdir -p .claude/skills && cp -r skills/* .claude/skills/

# Cursor (project):
mkdir -p .cursor/skills && cp -r skills/* .cursor/skills/

# OpenCode (project / global):
mkdir -p .opencode/skills && cp -r skills/* .opencode/skills/
mkdir -p ~/.config/opencode/skills && cp -r skills/* ~/.config/opencode/skills/

Claude Code loads each skill's description at startup, the body on demand. OpenCode also reads .claude/skills/ and ~/.claude/skills/. Prefer one scope to avoid duplicate/conflicting copies.

Verify discovery rather than assuming — ask the agent: "Which WordPress security skills can you discover, and where were they loaded from?" Pasting a URL alone does not prove the instructions loaded.

Workflow: start new code with secure-plugin-development; start existing-code reviews with security-auditing-code-review and load focused skills as trust boundaries surface. Demand evidence per finding — file/line, affected roles, exploit prerequisites, a verification step — not a security score. Separate confirmed bugs from hardening suggestions. A ready-to-paste read-only review prompt is provided that requires file/line references and forbids production access or publishing changes.

Caveats

Examples use a PHP 7.4 syntax baseline (7.4 is end-of-life); newer WordPress/PHP requirements are noted per-skill, and syntax compatibility does not imply an old runtime is secure. Automated validation checks structure, PHP syntax, and coding standards only — it is not an independent security audit or proof any example is correct. Content is AI-assisted under human direction (docs/ai-authorship.md). Skill install is not authorization to modify a live site. License: MIT.

Organisations named here

  • Agent Skills specification

Technologies named here

  • WordPress
  • WordPress Security Skills
  • skills CLI
  • PHP
  • Claude Code
  • Cursor
  • OpenCode
  • Gemini CLI
  • Codex

Techniques named here

  • secure-plugin-development
  • security-auditing-code-review
  • Missing nonce checks
  • Missing Authorization
  • Missing escaping
  • Missing prepared queries