code-pattern-checker

Validate Drupal code against coding standards and security practices.

32|7|Updated Dec 6, 2025
One-click install
npx skills add https://github.com/camoa/claude-skills --skill code-pattern-checker
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-pattern-checker
Source: https://github.com/camoa/claude-skills/tree/main/drupal-dev-framework/skills/code-pattern-checker
Command: npx skills add https://github.com/camoa/claude-skills --skill code-pattern-checker

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the validation of code against Drupal coding standards, SOLID/DRY principles, security best practices, and CSS standards, preventing common errors before they are committed.

Core Features & Use Cases

  • Pre-commit Validation: Runs checks for SOLID, DRY, security, and Drupal coding standards.
  • Gate Enforcement: Enforces "Gate 1: Code Standards" ensuring code cannot be committed until it passes.
  • Use Case: Before committing a new feature to a Drupal project, use this skill to automatically check all changed PHP, CSS, and SCSS files against established best practices and security requirements.

Quick Start

Use the code-pattern-checker skill to check code quality before committing.

Frequently Asked Questions about code-pattern-checker

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

FAQPage Schema
How do I validate Drupal code against SOLID and DRY principles before committing?

You can validate Drupal code before committing by running automated checks against Drupal coding standards, SOLID, and DRY principles. This enforces a strict quality gate, preventing non-compliant PHP and SCSS files from being committed.

What is the best way to enforce Drupal coding standards and security practices in a pre-commit hook?

The best way to enforce Drupal coding standards and security practices is using an automated pre-commit validation tool. It executes PHP CodeSniffer, PHPStan, and SCSS Lint to analyze changed files and block commits that fail quality checks.

Does this code quality checker work with PHP CodeSniffer and PHPStan for Drupal development?

Yes, this code quality checker works with PHP CodeSniffer and PHPStan for Drupal development. It requires executing these tools alongside SCSS Lint to validate PHP, CSS, and SCSS files against established best practices and security requirements.

Can I use automated linting to check SOLID principles and CSS standards for changed files only?

Yes, you can use automated linting to check SOLID principles and CSS standards for changed files only. It applies to pre-commit checks, post-implementation reviews, and task completion validation within Drupal development workflows.

Why do I need to run SCSS Lint and PHPStan before completing a Drupal feature task?

You need to run SCSS Lint and PHPStan before completing a Drupal feature task to enforce Gate 1: Code Standards. This ensures all changed PHP, CSS, and SCSS files meet security requirements and SOLID/DRY principles, preventing common errors.