code-quality

Enforce WordPress coding standards for PHP, CSS, and JavaScript.

316|74|Updated Apr 15, 2013
One-click install
npx skills add https://github.com/bonny/WordPress-Simple-History --skill code-quality-bonny
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-quality
Source: https://github.com/bonny/WordPress-Simple-History/tree/main/.claude/skills/code-quality
Command: npx skills add https://github.com/bonny/WordPress-Simple-History --skill code-quality-bonny

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill codifies WordPress coding standards, PHP/CSS/JS style guidelines, and tooling practices to improve code quality and consistency.

Core Features & Use Cases

  • Standards and style: PHP7.4+ compatibility, WordPress coding standards, SuitCSS for CSS, and standard JS practices.
  • Tooling guidance: phpcs, phpstan, rector, and npm scripts to automate quality checks.
  • Development workflow: Clear steps to lint, fix, analyze, and modernize code.

Quick Start

  • Install dependencies and run PHP lints: npm run php:lint or vendor/bin/phpcs
  • Fix issues with PHP_CodeSniffer: npm run php:lint-fix
  • Run static analysis with PHPStan and Rector as part of your routine

Frequently Asked Questions about code-quality

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce WordPress coding standards in my PHP project?

WordPress coding standards enforce consistent PHP, CSS, and JavaScript style across projects. Use phpcs with WordPress rulesets to automatically check code against these standards before commits. This Skill configures phpcs.xml.dist and npm scripts to run linting checks and fix violations automatically.

Can I use phpstan and rector to modernize legacy PHP code?

PHPStan performs static analysis to catch type errors and bugs; Rector automatically refactors code to modern PHP syntax. This Skill integrates both tools into your workflow with configuration files and npm scripts, letting you analyze code quality and modernize to PHP 7.4+ compatibility without manual rewrites.

What's the best way to lint and fix code style issues automatically?

Run npm run php:lint to detect style violations with PHP_CodeSniffer, then npm run php:lint-fix to apply automatic corrections. This Skill provides preconfigured phpcs rules aligned with WordPress standards, SuitCSS conventions, and JavaScript best practices, so fixes respect your project's standards.

Do I need separate tools for PHP, CSS, and JavaScript code quality?

This Skill unifies code quality checks across PHP, CSS, and JavaScript within a single workflow. It coordinates phpcs for PHP and CSS linting, phpstan for static analysis, and rector for modernization, all configured to work together via npm scripts and standard configuration files.

Why should I run code quality checks before code reviews?

Automated quality checks catch style violations, type errors, and compatibility issues early, reducing review friction and letting humans focus on logic and design. This Skill enforces WordPress standards and PHP 7.4+ compatibility upfront, ensuring only standards-compliant code reaches review.