Code Quality Standards

SkillDev tools

Runs linting and static analysis on PHP/CSS/JS using phpcs, phpstan, and rector. Use when checking code style, fixing lint errors, or running static analysis.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Code Quality Standards skill

What this skill tells your AI

The instructions your AI receives, as published by bonny/wordpress-simple-history in .claude/skills/code-quality/SKILL.md and read by ahel’s review.

Quick Commands

composer lint           # Check PHP style (local, fastest)
composer lint-fix       # Auto-fix PHP issues (local)
npm run php:lint        # Same check, in Docker
npm run php:lint-fix    # Same fix, in Docker
npm run php:phpstan     # Static analysis
npm run lint:js         # JavaScript
npm run lint:css        # CSS

Always run phpstan via npm run php:phpstan. Bare vendor/bin/phpstan analyse crashes a worker at the default 128M and still crashes at 1G; the npm script passes the 2048M that actually works.

Project-Specific Rules

AreaStandard
PHP7.4+, WordPress Coding Standards
Prefixessh, simplehistory, simple_history
Text domainsimple-history
CSS namingSuitCSS: sh-ComponentName-subpart
Array syntaxShort [] not array()
Control structuresAlways use braces {}, never colon syntax

Essential Principles

  1. Always escape output - Use WordPress escaping functions
  2. Prefix everything - All hooks, functions, classes
  3. Run tools after changes - phpcs/phpstan before committing

Detailed Guidelines

Related Files

  • phpcs.xml.dist - PHP_CodeSniffer config
  • phpstan.neon - PHPStan config

Signals

GitHub stars
317
Forks
74
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
code-quality-bonny
Source
github.com/bonny/wordpress-simple-history