Skip to content
Conduit

skill

WordPress-Security-Skills

AI coding agent skills for shipping, maintaining secure WordPress Sites

Set up

Skills are installed by placing their folder where your agent loads skills.

The download comes from github.com/wpultimatesecurity/WordPress-Security-Skills itself, not from our server, so what you get is exactly what its author published.

Install instructions come from the README

Skills do not use an MCP config. Follow the steps in the README below.

README

synced Oct 17, 2026

WordPress Security Skills

Validate Latest release License: MIT Skills: 27 Agent Skills spec

Security guidance for AI coding agents that write or review WordPress plugins and themes.

AI agents often produce WordPress code that works but skips the basics: nonce checks, capability checks, output escaping, prepared SQL queries. These skills give agents such as Claude Code, Cursor, Codex, OpenCode, and Gemini CLI the rules, examples, and checklists they need to write secure code by default and to audit existing code properly.

What you get

  • 27 focused skills, one per security topic, each with wrong-vs-right code examples and a checklist.
  • A structured audit workflow that separates confirmed vulnerabilities from open questions and hardening advice, with evidence-based severity.
  • Links to the official WordPress documentation for every API the skills rely on.

What this is not

  • Not a WordPress plugin, a scanner, or runtime protection for a website.
  • Not a guarantee of secure output. Skills improve the instructions an agent follows; you still review the code it produces.

Quick start · Using the skills · Skills · Manual installation · Contributing · Report a vulnerability

Quick start

Option 1: install with the skills CLI

Requires Node.js. Run this in the project where you want the skills:

# Choose skills and install scope interactively
npx skills add wpultimatesecurity/WordPress-Security-Skills

# Install all skills without prompts
npx --yes skills add wpultimatesecurity/WordPress-Security-Skills

Option 2: ask your agent to install them

Open your AI coding agent in your WordPress project and paste:

Install the WordPress security skills from
https://github.com/wpultimatesecurity/WordPress-Security-Skills for this project.

Use this agent's supported skills location (project scope unless I say global).
Copy each skill directory with its references. Keep my existing skills and ask
before replacing anything with the same name. Do not change my WordPress site,
commit, or push. When done, list the installed skills and where they are, and
confirm the agent can discover them.

Add "install them globally" if you want the skills in every project. Pick one scope to avoid duplicate copies.

Check that it worked

Restart or reload your agent if needed, then ask:

Which WordPress security skills can you see, and where were they loaded from?

If your agent does not support skills, ask it to read the relevant SKILL.md file and its linked references before starting work.

Using the skills

Once installed, agents load the right skill automatically based on the task. You can also name a skill directly.

Writing new code. Start with secure-plugin-development. It sets the secure baseline and routes the agent to the focused skills it needs.

Add a REST endpoint that lets editors bulk-update post meta. Follow the
WordPress security skills.

Reviewing existing code. Start with security-auditing-code-review.

Use the WordPress security skills to review this plugin. Start read-only:
map entry points and permission checks, then report confirmed findings with
file/line, who can exploit each one, impact, and a fix. List open questions
and hardening suggestions separately. Propose a plan before editing anything.

Tips for better results

  1. Give context. Your WordPress and PHP versions, plugin or theme, multisite or WooCommerce, and which user roles matter. Never paste production credentials.
  2. Ask for evidence, not a score. Each finding should state the file and line, the role that can exploit it, the impact, and how to verify the fix.
  3. Keep changes reversible. Review the diff, test locally or on staging, and keep a backup before deploying. Installing skills does not authorize an agent to change a live site.

Skills

Each skill targets a specific mistake AI agents make in WordPress code.

Start here

SkillUse it whenWhat it prevents
secure-plugin-developmentStarting any new plugin or featureMissing ABSPATH guards, work done before checks, hand-rolled SQL and HTTP instead of core APIs
security-auditing-code-reviewAuditing or reviewing existing codeStyle-only reviews that miss real bugs, inflated severity, findings without fixes

Input, output, and queries

SkillUse it whenWhat it prevents
input-sanitization-validationReading $_GET, $_POST, or any request dataMissing wp_unslash(), wrong sanitizer, trusting strip_tags(), no validation
output-escapingPrinting anything into HTML, attributes, URLs, or JavaScriptCross-site scripting (XSS) from unescaped or wrongly escaped output
sql-injection-preventionWriting custom $wpdb queriesSQL injection from concatenated input or misused prepare()
object-injection-deserializationHandling serialized dataunserialize() on attacker-controlled data

Access control and authentication

SkillUse it whenWhat it prevents
capability-permission-checksDeciding who may do somethingRole checks instead of capabilities, hidden UI instead of real checks, missing per-object checks
nonces-csrf-protectionHandling forms and state-changing requestsCross-site request forgery (CSRF), and nonces used as a substitute for permission checks
authentication-session-securityBuilding login, 2FA, or session featuresCustom password checks, unthrottled logins, sessions that survive password or role changes

Entry points

SkillUse it whenWhat it prevents
rest-api-securityRegistering REST routes__return_true permission callbacks on writes, unvalidated arguments
ajax-securityAdding admin-ajax.php handlersMissing nonces, privileged actions exposed to logged-out users
settings-options-securityBuilding settings pages or storing optionsSettings saved without sanitization, options printed unescaped
shortcode-block-securityWriting shortcodes or dynamic blocksUnescaped attributes, trusting shortcode_atts() to sanitize
gutenberg-block-editor-securityBuilding block editor featuresUnescaped render callbacks, REST fields without permission checks, unsafe editor JavaScript
wp-cli-securityWriting WP-CLI commandsSQL built from CLI arguments, assumed admin context, printed secrets
cron-background-job-securityScheduling cron or background jobsPermission checks that cannot work in cron, secrets in job arguments

Files and outbound requests

SkillUse it whenWhat it prevents
file-upload-securityAccepting file uploadsExecutable uploads, trusted client MIME types, path traversal
filesystem-securityReading, writing, or deleting filesFile paths built from input, including user-controlled files
http-api-ssrf-preventionFetching remote URLsServer-side request forgery (SSRF) to internal hosts

Data and secrets

SkillUse it whenWhat it prevents
user-data-protection-privacyStoring personal dataNo GDPR export/erase support, full IP storage, personal data shown to the wrong users
secrets-credentials-managementHandling API keys, tokens, or passwordsHardcoded keys, reversible password storage, tokens in logs

Platforms and integrations

SkillUse it whenWhat it prevents
multisite-securityCode runs on multisite networksSite and network permissions confused, untrusted blog_id, data leaking between sites
woocommerce-securityExtending WooCommerceOrders exposed to the wrong users, stored payment data, leaked customer data
ai-llm-integration-securityAdding AI or LLM featuresUnescaped model output, AI tools without permission checks, provider keys in the browser

Site hardening and supply chain

SkillUse it whenWhat it prevents
wp-hardening-best-practicesConfiguring wp-config.php and the serverDebug output in production, the file editor left on, executable uploads, loose permissions
security-headers-cspSetting HTTP headers, CSP, CORS, or cookiesMissing headers, permissive CSP, CORS that trusts any origin
dependency-supply-chain-securityAdding libraries, CDN assets, CI, or updatersOutdated libraries, unpinned scripts, remotely loaded code, leaked release secrets

How each skill is organized

Every skill has the same sections: when to use it, core principles, step-by-step instructions, common AI mistakes with wrong and corrected code, a checklist, and official references. Longer material lives in each skill's references/ folder and is loaded only when needed. Examples are illustrations, not a drop-in plugin: adapt prefixes, capabilities, and storage to your project.

Manual installation

Skills are plain folders. Copy the ones you want, or the whole skills/ folder, into your agent's skills directory. Run these commands from a clone of this repository.

# All your projects
mkdir -p ~/.claude/skills && cp -r skills/* ~/.claude/skills/

# This project only (can be committed with the project)
mkdir -p .claude/skills && cp -r skills/* .claude/skills/

Claude Code reads ~/.claude/skills/<name>/SKILL.md and .claude/skills/<name>/SKILL.md. See the Claude Code skills docs.

mkdir -p .cursor/skills && cp -r skills/* .cursor/skills/

Cursor also reads .agents/skills/. See the Cursor skills docs.

# This project only
mkdir -p .opencode/skills && cp -r skills/* .opencode/skills/

# All your projects
mkdir -p ~/.config/opencode/skills && cp -r skills/* ~/.config/opencode/skills/

OpenCode also reads the Claude Code locations. See the OpenCode skills docs.

Any agent that implements the Agent Skills specification can load these skills. Many read .claude/skills/ or .agents/skills/, so the Claude Code commands above often work as they are. Check your agent's documentation for its skills path.

To update, pull the latest version of this repository, review the changes, and copy the skills again. Note the installed commit if you need reproducible results.

Compatibility

  • Examples use PHP 7.4 syntax as a baseline. Newer WordPress or PHP requirements are noted where they apply. Use a supported PHP version and a maintained WordPress release in production.
  • Skills follow the open Agent Skills specification: each is a folder with a SKILL.md file and a references/ folder.

Limitations

  • The skills guide development and review. They do not enforce security at runtime or prove that a site is secure.
  • Automated checks in this repository validate structure, PHP syntax, and coding standards. They are not an independent security audit of every example.
  • Always check API behavior against the WordPress and PHP versions you support.

Contributing

Fixes and new skills are welcome. See CONTRIBUTING.md for the skill format, writing rules, and the requirement to verify every API against developer.wordpress.org.

This content is written with AI assistance under human direction. See docs/ai-authorship.md for what our validation does and does not establish.

To report a vulnerability or an insecure example, follow SECURITY.md.

Official WordPress security references

Acknowledgments

The audit workflow in security-auditing-code-review (verdicts, severity anchors, coverage tracking, attack classes), and the AI/LLM and resource-exhaustion guidance, adapt ideas from Cloudflare's MIT-licensed security-audit skill, rewritten for WordPress.

License

MIT

↑↓ navigate openesc close