Skip to main content
skill CX Codex

woocommerce-backend-dev · secondsky — Claude Code skill: install and usage

Guides AI coding agents through WooCommerce backend PHP conventions, PSR-4 namespaces, hooks, and unit testing workflows.

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

What woocommerce-backend-dev does

This skill guides agents editing backend PHP inside WooCommerce codebases. New internal classes land in src/Internal/ using the Automattic\WooCommerce PSR-4 namespace. Standalone functions are replaced by class methods, and WordPress Coding Standards apply throughout.

The instructions enforce conventions for dependency injection, CRUD data integrity, and hook registration. When Node.js package operations are needed, bun takes priority over npm and bunx. Before committing changes, linting and unit tests must run.

Version tagging for @since docblocks relies strictly on the trunk branch. The skill reads $version in includes/class-woocommerce.php and strips the -dev suffix. Overlooking the trunk reference leads to mismatched version numbers on PR branches.

What it helps with

  • generate backend PHP classes under src/Internal/ following PSR-4
  • implement WooCommerce hook callbacks according to project conventions
  • write unit tests for newly added backend logic
  • determine the target version number for @since phpdoc annotations

Example prompts for the agent

  • Create an internal backend service in src/Internal/ with dependency injection
  • Write a WooCommerce action hook callback and generate its unit test
  • Check includes/class-woocommerce.php on trunk and update @since annotations

How to install woocommerce-backend-dev

1Skills CLI (Vercel)

npx skills add secondsky/claude-skills --skill woocommerce-backend-dev -a claude-code

2Manually: put the files in place

~/.claude/skills/woocommerce-backend-dev/SKILL.md

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

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

Questions about woocommerce-backend-dev

How do I install woocommerce-backend-dev in Claude Code?

Run npx skills add secondsky/claude-skills --skill woocommerce-backend-dev -a claude-code in your terminal.

What does the woocommerce-backend-dev skill do?

It instructs coding assistants to follow WooCommerce backend PHP architecture, WordPress Coding Standards, and unit testing guidelines.

How does the skill determine the @since version tag?

It reads the $version property in includes/class-woocommerce.php on the trunk branch and removes the -dev suffix.

Source text

SKILL.md · MIT
---
name: woocommerce-backend-dev
description: Add or modify WooCommerce backend PHP code following project conventions. Use when creating new classes, methods, hooks, or modifying existing backend code in WooCommerce projects.
license: MIT
---

# WooCommerce Backend Development

This skill provides guidance for developing WooCommerce backend PHP code according to project standards and conventions.

## Instructions

Follow WooCommerce project conventions when adding or modifying backend PHP code:

1. **Creating new code structures**: See [file-entities.md](file-entities.md) for conventions on creating classes and organizing files (but for new unit test files see [unit-tests.md](unit-tests.md)).
2. **Naming conventions**: See [code-entities.md](code-entities.md) for naming methods, variables, and parameters
3. **Coding style**: See [coding-conventions.md](coding-conventions.md) for general coding standards and best practices
4. **Working with hooks**: See [hooks.md](hooks.md) for hook callback conventions and documentation
5. **Dependency injection**: See [dependency-injection.md](dependency-injection.md) for DI container usage
6. **Data integrity**: See [data-integrity.md](data-integrity.md) for ensuring data integrity when performing CRUD operations
7. **Writing tests**: See [unit-tests.md](unit-tests.md) for unit testing conventions

## Key Principles

- Always follow WordPress Coding Standards
- Use class methods instead of standalone functions
- Place new internal classes in `src/Internal/` by default
- Use PSR-4 autoloading with `Automattic\WooCommerce` namespace
- Write comprehensive unit tests for new functionality
- Run linting and tests before committing changes
- Prefer bun over npm/bunx for Node.js package management when applicable

## Version Information

To determine the next WooCommerce version number for `@since` annotations:

- Read the `$version` property in `includes/class-woocommerce.php` **on the trunk branch**
- Remove the `-dev` suffix if present
- Example: If trunk shows `10.4.0-dev`, use `@since 10.4.0`
- Note: When reviewing PRs against trunk, the version in trunk is correct even if it seems "future" relative to released versions

© secondsky · MIT · secondsky/claude-skills

Similar skills

All skills for Backend and APIs →

woocommerce-backend-dev by other authors comes first.

From the same set128

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 nuxt-studio Sets up the Nuxt Studio visual editor for Nuxt Content sites. It guides OAuth authentication setup and deployment to subdomains via Cloudflare. CX Codex +1 368installs 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-code-review Audits WooCommerce code changes against core engineering standards and copy rules. Useful during local reviews and PR preparation. CX Codex +1 366installs 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