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.
npx skills add secondsky/claude-skills --skill woocommerce-code-review -a claude-codeWhat 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.phpagainst WooCommerce standards - Check this PR diff for UI copy issues and missing docblocks
- Audit
tests/Unit/PaymentTest.phpfor 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-code2Manually: put the files in place
~/.claude/skills/woocommerce-code-review/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/woocommerce-code-review/
1Skills CLI (Vercel)
npx skills add secondsky/claude-skills --skill woocommerce-code-review -a codex2Manually: put the files in place
.agents/skills/woocommerce-code-review/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add secondsky/claude-skills --skill woocommerce-code-review -a cursor2Manually: put the files in place
.cursor/skills/woocommerce-code-review/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install secondsky/claude-skills woocommerce-code-review2Manually: put the files in place
.github/skills/woocommerce-code-review/SKILL.md1Skills CLI (Vercel)
npx skills add secondsky/claude-skills --skill woocommerce-code-review -a gemini-cli2Platform CLI
gemini skills install https://github.com/secondsky/claude-skills --path plugins/woocommerce-code-review/skills/woocommerce-code-reviewManually: put the files in place
.devin/skills/woocommerce-code-review/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add secondsky/claude-skills --skill woocommerce-code-review -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.