Back to Skills

code-quality

Provides WordPress coding standards, PHP/CSS/JS style guide, code linting and static analysis (phpcs, phpstan, rector, phpcbf). Use before writing or editing PHP, CSS, or JavaScript code, when fixing lint errors, running code quality tools, or reviewing code style compliance.

314stars75forksUpdated 2/18/2026

Security Assessment

Safe(100/100)
Security Score100/100

About code-quality

The 'code-quality' skill is designed to enforce WordPress coding standards on PHP, CSS, and JavaScript code. It uses tools such as phpcs, phpstan, and rector to perform linting and static analysis, ensuring that code adheres to best practices and is free of errors. This skill automates the process of maintaining high-quality code, which can be challenging for developers working with large codebases or collaborating with teams. By triggering specific commands like 'run phpcs' or 'check code', it helps developers stay compliant with coding standards and improves overall code maintainability.

FAQ

How do I run code linting for PHP?

You can run the PHP linting by executing the command 'npm run php:lint'.

What tools are required for this skill?

The skill requires the tools Read, Grep, Glob, and Bash.

Can I use this skill with other PHP versions?

This skill is designed to work with PHP 7.4 and above.

What are the key principles to follow with this skill?

Key principles include always escaping output, prefixing everything (hooks, functions, classes), and running tools after changes (before committing).

Are there any specific CSS naming conventions?

Yes, the skill follows SuitCSS conventions, with the format 'sh-ComponentName-subpart' for naming CSS classes.

All Files

6 files
php-standards.md9.9 KB
View
css-standards.md7.5 KB
View
design-principles.md3.9 KB
View
js-standards.md0.4 KB
View
tooling.md5.0 KB
View
SKILL.md1.6 KB
View

Install code-quality

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill