woocommerce-code-review

Flag WooCommerce coding-standards violations in PHP code changes.

10.5k|10.7k|Updated Aug 9, 2011
One-click install
npx skills add https://github.com/woocommerce/woocommerce --skill woocommerce-code-review
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: woocommerce-code-review
Source: https://github.com/woocommerce/woocommerce/tree/main/.ai/skills/woocommerce-code-review
Command: npx skills add https://github.com/woocommerce/woocommerce --skill woocommerce-code-review

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solves? This Skill automates the often time-consuming and error-prone process of reviewing WooCommerce code for compliance with complex coding standards. It helps maintain consistent code quality, reduces manual review effort, and accelerates the feedback loop for developers.

Core Features & Use Cases

  • Automated Standard Checks: Automatically identifies critical violations in PHP backend code, UI text, and copy against established WooCommerce guidelines.
  • Contextual Feedback: Provides specific references to relevant skill documentation for each flagged issue, aiding developers in understanding and fixing problems efficiently.
  • Streamlined PR Reviews: Ideal for local code reviews or integrating into automated pull request checks, ensuring adherence to project conventions before merging.
  • Use Case: A lead developer needs to quickly review a pull request for a new WooCommerce feature. Instead of spending hours manually checking every line for naming conventions, docblock requirements, and UI text style, they use this skill to get an instant, detailed report of all non-compliant changes, allowing them to focus on architectural decisions.

Quick Start

Use the woocommerce-code-review skill to review the attached PHP file 'new-feature.php' for backend coding standard violations.

Frequently Asked Questions about woocommerce-code-review

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

FAQPage Schema
How do I automate code reviews for WooCommerce PHP files?

Automate code reviews by scanning PHP files against WooCommerce coding standards to flag violations in naming conventions, documentation, data validation, testing practices, and UI text. This identifies non-compliance with Yoda conditions, snake_case naming, required @since annotations, DI container usage, and sentence-case copy rules before code merges.

What coding standards does WooCommerce enforce?

WooCommerce enforces PHP backend standards including dependency injection via container, file placement under src/Internal, snake_case naming, WordPress Yoda conditions, mandatory @since docblocks, data validation before modification, unit-test @testdox requirements, and UI text rules such as sentence case and proper grammar.

Can I integrate code review checks into my pull request workflow?

Yes. Use this skill in automated PR scans or local reviews to catch coding-standards violations before merging, eliminating manual checking of naming conventions, docblocks, validation logic, and copy guidelines. It provides contextual references to documentation for each flagged issue.

What types of violations does this catch in WooCommerce code?

Catches violations across architecture and structure, naming conventions, documentation completeness, data integrity checks, testing compliance, and UI copy guidelines. Examples include missing @since annotations, improper DI usage, invalid file placement, non-compliant test naming, and copy style deviations.

Do I need to manually review every line for WooCommerce compliance?

No. This skill automates the review process, instantly flagging all non-compliant changes in PHP backend code and UI text against WooCommerce guidelines, allowing you to focus on architectural decisions rather than routine standard checks.

When should I run code reviews against WooCommerce standards?

Run reviews during local development before committing, in automated PR checks before merging, or during code-quality gates. Early detection of naming, documentation, validation, testing, and copy violations prevents rework and maintains consistent project conventions.