wp-phpcs-coding-standards

wp-phpcs-coding-standards is a skill for Claude Code, Codex from Lonsdale201/wp-agent-skills. It costs 261 tokens per session (2,864 once invoked), scanned A, original, MIT.

A setup and checking guide for PHPCodeSniffer, a tool that checks PHP code against WordPress rules and compatibility with older PHP versions.

In plain words
What is it for?
Use it when adding code checks to a WordPress plugin or theme, writing a rules file, fixing PHPCS errors, or moving from WordPress Coding Standards 2.x to 3.x.
Why use it?
It removes the confusing Composer package setup and helps diagnose missing rules, standards, or plugin-permission errors.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when adding code checks to a WordPress plugin or theme, writing a rules file, fixing PHPCS errors, or moving from WordPress Coding Standards 2.x to 3.x.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lonsdale201/wp-agent-skills/wp-phpcs-coding-standards
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Lonsdale201/wp-agent-skills --skill wp-phpcs-coding-standards
Clone the repo
git clone --depth 1 https://github.com/Lonsdale201/wp-agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for wp-phpcs-coding-standards

README.md
[![agentmods](https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/wp-phpcs-coding-standards/github.svg)](https://agentmods.dev/skills/lonsdale201/wp-agent-skills/wp-phpcs-coding-standards)
Your own site
<a href="https://agentmods.dev/skills/lonsdale201/wp-agent-skills/wp-phpcs-coding-standards"><img src="https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/wp-phpcs-coding-standards/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for wp-phpcs-coding-standards

Your own site · 80×15
<a href="https://agentmods.dev/skills/lonsdale201/wp-agent-skills/wp-phpcs-coding-standards"><img src="https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/wp-phpcs-coding-standards.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 261 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,864 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00261 $0.02864
Opus 5.5 $0.00104 $0.01146
Sonnet 5.5 $0.00052 $0.00573
Haiku 4.5 $0.00026 $0.00286

Measured 1mo ago against content hash 44ee2f8476a2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

wp-phpcs-coding-standards scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

dev-tooling/wp-phpcs-coding-standards/SKILL.md · 192 lines

How it starts

The opening of the file, as written. The whole thing — 192 lines — stays where its author put it; the contents beside it link to each section on GitHub.

WordPress coding standards with PHPCS

PHP_CodeSniffer (phpcs) checks code against a ruleset; phpcbf auto-fixes what it can. The WordPress Coding Standards (WPCS) are the rulesets; PHPCompatibility flags syntax that breaks on your minimum PHP version. This skill wires them up correctly — the package names and the WPCS 3.x renames are where people get stuck.

When to use this skill

  • Adding coding-standards linting to a plugin/theme (or to the .phpcs.xml.dist the test scaffolder dropped in).
  • Writing or auditing a phpcs.xml.dist ruleset.
  • Fixing "Referenced sniff … does not exist", "standard not installed", or allow-plugins errors.
  • Migrating a ruleset from WPCS 2.x to 3.x.

Install (exact packages — names are confusing)

composer config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer require --dev \
  wp-coding-standards/wpcs:"^3.4.1" \
  phpcompatibility/phpcompatibility-wp:"^2.1" \
  dealerdirect/phpcodesniffer-composer-installer:"^1.0"

Four things that trip people up, all verified:

  • squizlabs/php_codesniffer is still the correct Packagist name even though the project moved to the PHPCSStandards GitHub org. WPCS pulls it in transitively, so you usually don't list it. WPCS 3.4.1 requires PHPCS ^3.13.5, not 4.x — don't force squizlabs/php_codesniffer:^4.
  • The installer is still dealerdirect/phpcodesniffer-composer-installer on Packagist (the repo is now PHPCSStandards/composer-installer, but the package name is unchanged). It auto-registers WPCS and PHPCompatibility with PHPCS, so you never run phpcs --config-set installed_paths … by hand.
  • PHPCompatibilityWP: use the stable ^2.1. The README advertises ^3.0@dev, but 3.0 is alpha-only; pin ^2.1 for production unless you deliberately want the alpha.
  • Do not use WPCS below 3.4.1. Version 3.4.1 fixes arbitrary command execution in WordPress.WP.EnqueuedResourceParameters when scanning untrusted PHP. This affects the WordPress and WordPress-Extra rulesets; update developer machines and CI runners, not only production dependencies.

Read the full file on GitHub · 192 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 192 lines · 261 tokens per session scan A 44ee2f8476a2

Subscribe to this mod's changes

wp-phpcs-coding-standards is a skill published in the GitHub repository Lonsdale201/wp-agent-skills (24 stars, last pushed 3d ago), licensed MIT. It adds 261 tokens to every session and 2,864 once invoked, about $0.0010 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

php-quality

PHP static analysis, code style and modern idioms for PHP 8.3 to 8.5. Use when setting up phpstan.neon or a baseline, choosing PHPStan or Psalm, PHP-CS-Fixer or PHPCodeSniffer, PER-CS or PSR-12, configuring Rector quality sets, or reviewing PHP for readonly, enums, property hooks and the pipe operator.

krzysztofsurdy/code-virtuoso · 81 tokens

wp-coding-standards

Use when setting up PHPCS with WordPress Coding Standards (WPCS), configuring phpcs.xml.dist, running phpcs/phpcbf, fixing sniff violations, adding PHPCS to CI (GitHub Actions), configuring IDE integration, or verifying a plugin meets WP.org code style requirements. Covers squizlabs/phpcodesniffer…

mralaminahamed/wp-dev-skills · 303 tokens

resharper-clt

Use the free official JetBrains ReSharper Command Line Tools for .NET repositories. USE FOR: jb inspectcode; jb cleanupcode; stronger C# inspections, cleanup profiles, and CI-friendly JetBrains analysis. DO NOT USE FOR: replacing tests with inspection output; ad-hoc formatting-only work when the repo intentionally…

managedcode/dotnet-skills · 107 tokens

roslynator

Use the open-source free Roslynator analyzer packages and optional CLI for .NET. USE FOR: Roslynator.Analyzers setup; Roslynator CLI checks or cleanup; C# linting, static analysis, and code-fix automation. DO NOT USE FOR: overlapping analyzer packs with no consolidation plan; formatting-only work owned by another…

managedcode/dotnet-skills · 107 tokens

stylecop-analyzers

Use the open-source free StyleCop.Analyzers package for naming, layout, documentation, and style rules in .NET projects. Use when a repo wants stricter style conventions than the SDK analyzers alone provide. USE FOR: the repo wants StyleCop.Analyzers; naming, layout, or documentation style needs stronger enforcement…

managedcode/dotnet-skills · 142 tokens

mvc-expert

Expert guidelines to refactor legacy PHP codebases into clean, modern, and scalable MVC-structured projects / Pedoman ahli untuk merefaktor codebase PHP lama menjadi proyek terstruktur MVC yang bersih, modern, dan skalabel.

roedyrustam/vibes-plug · 51 tokens