/cms-cultivator:code-standards-checkerfrom cms-cultivator
Discovers and runs the project's own linting, formatting, and static-analysis commands (PHPCS, ESLint, PHPStan, Rector, stylelint, twig-lint) against changed files, auto-fixing before checking. Reads composer.json and package.json scripts and CI config to find the right commands.
Ships in cms-cultivator. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Run the project's own standards tooling against the code that changed, then report what is left. Discover the commands by reading the project. Do not recall them.
Not for logic review. pr-review covers correctness; run this skill first so
standards violations never reach review.
Dependency-only updates need no standards run. This tooling grades custom code, and a version bump changes none of it.
Not a skip: a core, framework, or PHP upgrade beyond a patch release (Drupal 11.3 → 11.4, WordPress 6.7 → 6.8, PHP 8.3 → 8.4). The upgrade deprecates APIs the custom code calls, so run the static checks against the custom code even though none of it was edited. Core patch and security releases (11.3.19 → 11.3.20) stay in the skip list.
composer.lock, package-lock.json, yarn.lock)Exception: if a dependency is being patched, forked, or overridden as part of the
work — a cweagans/composer-patches entry, a committed patch file, a vendor override —
that changed code is custom code. Map it in step 2 and run the full pass against it.
Name the files you classified as dependency-only, then move on. In particular, do not
run format against a composer.json version bump on the strength of the JSON row in
step 2's table.
Script aliases are project-defined. Read them; never assume a name exists.
Start with CI. Whatever CI gates on is what must pass, so its config is the authoritative list of checks and the exact commands it runs:
cat .circleci/config.yml # Kanopi default
ls .github/workflows/ .gitlab-ci.yml bitbucket-pipelines.yml 2>/dev/null
Then the task runners CI usually calls:
# Every level that could own the changed files
jq -r '.scripts | keys[]' composer.json
jq -r '.scripts | keys[]' package.json
jq -r '.scripts | keys[]' web/themes/custom/*/package.json # Drupal theme
jq -r '.scripts | keys[]' public/wp-content/themes/*/package.json # WordPress theme
jq -r '.scripts | keys[]' public/wp-content/plugins/*/package.json # block plugin
# What an alias actually does — many are aggregates of other aliases
composer run-script --list
jq -r '.scripts["code-fix"]' composer.json
Then check two things:
.ddev/ exists, prefix every composer, npm, and wp-cli command with
ddev (ddev composer phpcbf, ddev npm run lint:js)..phpcs.xml.dist, phpstan.neon, rector.php, .twig-cs-fixer.php,
.eslintrc*, .stylelintrc*.If no alias covers the job, use the raw invocation from the table below. If neither the alias nor the binary exists, say so rather than inventing a command.
| Changed | Job | Sequence | Raw fallback |
|---|---|---|---|
PHP (.php, .module, .inc, .install, .theme, .profile) | Coding standards | phpcbf then phpcs | vendor/bin/phpcbf --standard=Drupal,DrupalPractice <path> (Drupal), --standard=WordPress (WordPress), or --standard=./.phpcs.xml.dist when the project ships one |
| PHP with logic changes | Static analysis | phpstan (no auto-fix) | vendor/bin/phpstan analyse --memory-limit=-1 <paths> |
| PHP after a refactor | Modernization | dry run, then apply | vendor/bin/rector process <path> --dry-run, then without --dry-run |
| Twig templates | Twig standards | fix then lint | vendor/bin/twig-cs-fixer lint --fix <path>, then without --fix |
| JavaScript | Format, then lint | format then lint:js | npx wp-scripts format, npx wp-scripts lint-js or npx eslint <path> |
| SCSS / CSS | Style lint | lint:css | npx wp-scripts lint-style "**/*.scss" or npx stylelint --fix "**/*.scss" |
| JSON, HTML, config | Format | format | npx wp-scripts format |
| Any asset in a compiled theme | Build | build after the lint pass | npx wp-scripts build |
Rector is the one inversion: preview with --dry-run first, then apply. Everything
else auto-fixes first and verifies after.
A lookup, not a command list. Confirm the name in step 1 before running it.
| Alias | Job | Commonly seen in |
|---|---|---|
code-fix / code-sniff | phpcbf then phpcs across custom modules and themes | Kanopi Drupal starter |
code-fix-modules, code-fix-themes, code-sniff-modules, code-sniff-themes | Same, scoped to one area | Kanopi Drupal starter |
code-check | Aggregate: phpstan, rector dry run, code-sniff | Kanopi Drupal starter |
phpcbf / phpcs | Auto-fix then check against .phpcs.xml.dist | Kanopi WordPress starter, vanilla PHP |
phpstan | Static analysis | Both starters, vanilla PHP |
rector-check / rector-fix | Dry run, then apply | Both starters |
twig-fix / twig-lint | twig-cs-fixer with and without --fix | Kanopi Drupal starter |
lint-php | php -l syntax check | Kanopi Drupal starter |
format | wp-scripts format | Any wp-scripts theme or block plugin |
lint:js / lint-js | wp-scripts lint-js | Any wp-scripts theme or block plugin |
lint:css / lint-style | wp-scripts lint-style | Any wp-scripts theme or block plugin |
build / start | Production build, watch mode | Any wp-scripts theme or block plugin |
Alias names drift from the tool names they wrap: a theme may expose lint:css for
what wp-scripts calls lint-style. That is exactly why step 1 exists. For the Kanopi
starter catalog see
Composer Scripts.
phpcbf before phpcs,
format before lint:js. Re-run the check command afterward and report what
survived; the auto-fixer never gets everything.package.json. Plugin files use the plugin's. PHP spanning several
areas, or a project whose PHP tooling lives at the root, uses the root
composer.json.Run-before-report (hard rule): the format below may only be presented with real tool output behind it. Never certify compliance from reading the code — eyeballing is not phpcs (CANT-12, CANT-10 in the Catalog of Agent Neutralization Techniques). If the tooling cannot run (not installed, no DDEV, command denied), the summary must begin "Standards not verified", state which tool could not run, and offer the exact command for the user to run instead — even if the user says a visual check is fine or asks you to mark it passing. A code-reading pass may be offered as a supplement, labeled as a manual review, never as the standards result.
Red flags — stop if you catch yourself thinking:
Keep the report itself short and actionable:
file:line and the fix.Ran `ddev composer phpcbf` then `ddev composer phpcs` on `public/wp-content`.
Auto-fixed 14 violations across 6 files. 2 remain:
1. `themes/sia/inc/blocks.php:23` — missing docblock on `sia_register_blocks()`
2. `plugins/sia-blocks/src/Loader.php:88` — line exceeds 120 characters
Re-verify: `ddev composer phpcs`
Fix every violation before the PR opens. Do not restate standards results in the PR description: the host's checks UI (GitHub checks, GitLab pipelines, Bitbucket builds) is the live record for anything CI runs, and a pass/fail table in the body is a snapshot that goes stale on the next push.
The one exception is a tool that ran locally and has no CI equivalent — its result
appears nowhere in the host's UI. Hand that single line, with the command and scope,
to pr-quality-report for the section that covers it.
When there is no alias, no vendor/bin/ binary, and no config file, open with
"Standards not verified", name what is missing, and offer to install the standards
rather than guessing at commands. A manual pass against the platform baseline may
follow, labeled as a manual review and never as the standards result:
\Drupal:: calls in classes, no deprecated APIs.esc_html,
esc_attr, wp_kses_post), sanitizing on input, nonces on form handlers.const/let over var, consistent quotes and semicolons, no
stray console.log, JSDoc on exported functions.Install with composer require --dev drupal/coder (Drupal) or
composer require --dev wp-coding-standards/wpcs (WordPress).
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
PHP, JavaScript, CSS, ESLint, Prettier
coding-standards, linting, static-analysis, phpcs, eslint, phpstan
cms-cultivator@claude-toolbox is listed by kanopi/claude-toolbox — review the source before installing
npx claudepluginhub kanopi/claude-toolbox --plugin cms-cultivator30 skills in this plugin
/browser-validatorAutomatically validate implementations in real browsers after code is written or when user says "test this", "test what you built in the browser", "check it in a real browser", or "validate at the breakpoints". Uses Chrome DevTools MCP to test responsive breakpoints (320px, 768px, 1024px), check accessibility compliance (WCAG AA contrast, keyboard navigation, ARIA), validate interactions, and generate detailed technical reports with file paths and specific fixes./commit-message-generatorAutomatically generate conventional commit messages when user has staged changes and mentions committing. Analyzes git diff and status to create properly formatted commit messages following conventional commits specification. AI attribution comes from the tool's own trailer (Claude Code's Co-Authored-By); the skill never adds a second one. Invoke when user mentions "commit", "staged", "committing", or asks for help with commit messages./composer-patch-generatorGenerate and maintain patches for Composer-installed packages (Drupal contrib modules, WordPress packages, PHP libraries) using cweagans/composer-patches. Invoke when the user needs to modify a contrib or vendor package, mentions "composer patch", "patch a module", "patch a contrib module", "cweagans", "diff -ruN", "extra.patches", or needs a package change that applies cleanly in CI. Covers generating diff -ruN patches, handling new files, wiring composer.json, and verifying the patch applies.Other plugins' skills for the same job