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.
npx skills add secondsky/claude-skills --skill woocommerce-backend-dev -a claude-codeWhat 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
@sincephpdoc 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.phpon trunk and update@sinceannotations
How to install woocommerce-backend-dev
1Skills CLI (Vercel)
npx skills add secondsky/claude-skills --skill woocommerce-backend-dev -a claude-code2Manually: put the files in place
~/.claude/skills/woocommerce-backend-dev/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/woocommerce-backend-dev/
1Skills CLI (Vercel)
npx skills add secondsky/claude-skills --skill woocommerce-backend-dev -a codex2Manually: put the files in place
.agents/skills/woocommerce-backend-dev/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add secondsky/claude-skills --skill woocommerce-backend-dev -a cursor2Manually: put the files in place
.cursor/skills/woocommerce-backend-dev/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install secondsky/claude-skills woocommerce-backend-dev2Manually: put the files in place
.github/skills/woocommerce-backend-dev/SKILL.md1Skills CLI (Vercel)
npx skills add secondsky/claude-skills --skill woocommerce-backend-dev -a gemini-cli2Platform CLI
gemini skills install https://github.com/secondsky/claude-skills --path plugins/woocommerce-backend-dev/skills/woocommerce-backend-devManually: put the files in place
.devin/skills/woocommerce-backend-dev/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add secondsky/claude-skills --skill woocommerce-backend-dev -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-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.