Skip to main content
skill CX Codex

woocommerce-code-review · secondsky — Claude Code skill: install and usage

Audits WooCommerce code changes against core engineering standards and copy rules. Useful during local reviews and PR preparation.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add secondsky/claude-skills --skill woocommerce-code-review -a claude-code
Open on GitHub

What woocommerce-code-review does

The skill evaluates backend PHP against WooCommerce conventions. It flags standalone functions and blocks direct instantiation with new instead of $container->get(). Classes belong in src/Internal/ unless explicitly declared public. It also checks for snake_case names, WordPress Yoda conditions, and concise docblocks with mandatory @since tags.

For unit tests, the skill requires naming the subject under test $sut instead of $instance. Test docblocks must include @testdox. In UI text, labels and buttons must follow sentence case like "Save changes", with exceptions strictly reserved for brand names like WooPayments or acronyms.

Each finding report includes the issue type, exact line location, standard reference, and a fix example. The skill relies on detailed guidelines defined in woocommerce-backend-dev and woocommerce-copy-guidelines.

What it helps with

  • catch direct new calls on container-managed dependencies
  • enforce sentence case across UI text strings
  • flag missing @since and @testdox annotations
  • replace $instance variable names with $sut in test suites

Example prompts for the agent

  • Review my changes in src/Internal/Orders/OrderController.php against WooCommerce standards
  • Check this PR diff for UI copy issues and missing docblocks
  • Audit tests/Unit/PaymentTest.php for test conventions and naming rules

How to install woocommerce-code-review

1Skills CLI (Vercel)

npx skills add secondsky/claude-skills --skill woocommerce-code-review -a claude-code

2Manually: put the files in place

~/.claude/skills/woocommerce-code-review/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/woocommerce-code-review/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about woocommerce-code-review

How to install woocommerce-code-review in Claude Code?

Run npx skills add secondsky/claude-skills --skill woocommerce-code-review -a claude-code. The skill file will be placed in ~/.claude/skills/woocommerce-code-review/SKILL.md.

What does woocommerce-code-review check?

It verifies backend PHP architecture, dependency injection usage, docblocks, unit test naming conventions, and UI copy casing.

What UI copy conventions does the skill enforce?

The skill flags Title Case in interface strings and mandates sentence case, such as "Order details". Acronyms like API and brand names like WooPayments are allowed exceptions.

Source text

SKILL.md · MIT
---
name: woocommerce-code-review
description: Review WooCommerce code changes for coding standards compliance. Use when reviewing code locally, performing automated PR reviews, or checking code quality in WooCommerce projects.
license: MIT
---

# WooCommerce Code Review

Review code changes against WooCommerce coding standards and conventions.

## Critical Violations to Flag

### Backend PHP Code

Consult the `woocommerce-backend-dev` skill for detailed standards. Using these standards as guidance, flag these violations and other similar ones:

**Architecture & Structure:**

- **Standalone functions** - Must use class methods ([file-entities.md](../woocommerce-backend-dev/file-entities.md))
- **Using `new` for DI-managed classes** - Classes in `src/` must use `$container->get()` ([dependency-injection.md](../woocommerce-backend-dev/dependency-injection.md))
- **Classes outside `src/Internal/`** - Default location unless explicitly public ([file-entities.md](../woocommerce-backend-dev/file-entities.md))

**Naming & Conventions:**

- **camelCase naming** - Must use snake_case for methods/variables/hooks ([code-entities.md](../woocommerce-backend-dev/code-entities.md))
- **Yoda condition violations** - Must follow WordPress Coding Standards ([coding-conventions.md](../woocommerce-backend-dev/coding-conventions.md))

**Documentation:**

- **Missing `@since` annotations** - Required for public/protected methods and hooks ([code-entities.md](../woocommerce-backend-dev/code-entities.md))
- **Missing docblocks** - Required for all hooks and methods ([code-entities.md](../woocommerce-backend-dev/code-entities.md))
- **Verbose docblocks** - Keep concise, one line is ideal ([code-entities.md](../woocommerce-backend-dev/code-entities.md))

**Data Integrity:**

- **Missing validation** - Must verify state before deletion/modification ([data-integrity.md](../woocommerce-backend-dev/data-integrity.md))

**Testing:**

- **Using `$instance` in tests** - Must use `$sut` variable name ([unit-tests.md](../woocommerce-backend-dev/unit-tests.md))
- **Missing `@testdox`** - Required in test method docblocks ([unit-tests.md](../woocommerce-backend-dev/unit-tests.md))
- **Test file naming** - Must follow convention for `includes/` vs `src/` ([unit-tests.md](../woocommerce-backend-dev/unit-tests.md))

### UI Text & Copy

Consult the `woocommerce-copy-guidelines` skill. Flag:

- **Title Case in UI** - Must use sentence case ([sentence-case.md](../woocommerce-copy-guidelines/sentence-case.md))
    - Wrong: "Save Changes", "Order Details", "Payment Options"
    - Correct: "Save changes", "Order details", "Payment options"
    - Exceptions: Proper nouns (WooPayments), acronyms (API), brand names

## Review Approach

1. **Scan for critical violations** listed above
2. **Cite specific skill files** when flagging issues
3. **Provide correct examples** from the skill documentation
4. **Group related issues** for clarity
5. **Be constructive** - explain why the standard exists when relevant

## Output Format

For each violation found:

```text
[Issue Type]: [Specific problem]
Location: [File path and line number]
Standard: [Link to relevant skill file]
Fix: [Brief explanation or example]
```

## Notes

- All detailed standards are in the `woocommerce-backend-dev`, `woocommerce-dev-cycle`, and `woocommerce-copy-guidelines` skills
- Consult those skills for complete context and examples
- When in doubt, refer to the specific skill documentation linked above

© secondsky · MIT · secondsky/claude-skills

Similar skills

All skills for Code review and refactoring →

woocommerce-code-review by other authors comes first.

From the same set116

react-hook-form-zod Sets up type-safe React forms using React Hook Form and Zod validation. It helps with schema definitions, nested field arrays, and server validation. CX Codex +1 376installs cloudflare-mcp-server A skill for building MCP servers on Cloudflare Workers: tools, resources, prompts and transport choices. Useful when you write your own server for an AI agent. CX Codex +1 375installs thesys-generative-ui A skill that teaches your agent to build React components from plain-language prompts with the Thesys SDK. Handy when you want a UI sketched out from a description. CX Codex +1 371installs maz-ui This skill teaches your agent Maz-UI v4: 50+ components, composables and directives for Vue 3 and Nuxt 3. Handy when you build forms, dialogs or data tables. CX Codex +1 369installs woocommerce-dev-cycle A skill that walks you through the WooCommerce dev cycle: run tests, fix code style, sort out linting errors. CX Codex +1 361installs woocommerce-copy-guidelines A skill that sets the rules for user-facing text in WooCommerce: button labels, field names, messages and docs. Useful when more than one person writes the storefront strings. CX Codex +1 363installs cloudflare-workers-security Authentication, CORS, rate limiting and input validation patterns for Cloudflare Workers. Install when you need JWT or API key checks, CORS fixes, or protection from injection attacks. CX Codex +1 343installs cloudflare-workers-testing A skill for writing Cloudflare Workers tests with Vitest and real D1, KV, R2 and Durable Objects bindings. Useful when tests break on mocks or can't see the environment. CX Codex +1 325installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor