Agent skill

WooCommerce Backend Conventions

by woocommerce in woocommerce/woocommerce

Guides agents writing or changing WooCommerce backend PHP so new classes, hooks and unit tests follow the project's conventions.

Custom licenceAuto-check passedDevelopment

Install WooCommerce Backend Conventions

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

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install woocommerce/woocommerce woocommerce-backend-dev --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/woocommerce/woocommerce.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.ai/skills/woocommerce-backend-dev .claude/skills/woocommerce-backend-dev && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
woocommerce-backend-dev
GitHub stars
11k
Used in
1 other repo
Token cost
~614 tokens
SKILL.md length
258 words
Files
9
Skills in repo
11
Repo updated
First seen
Licence
Custom licence

At a glance

Guides agents writing or changing WooCommerce backend PHP so new classes, hooks and unit tests follow the project's conventions.

  • Works in 8 steps: Creating new code structures: See… → Naming conventions: See code-entities.md… → Coding style: See coding-conventions.md… → …
  • Adding a new PHP class to WooCommerce core
  • SKILL.md covers When to Use This Skill, Instructions, Key Principles and Version Information
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Load it before writing PHP unit tests, creating classes, changing existing backend code or adding hooks and filters. Its SKILL.md is an index to eight reference files covering file and class layout, naming of methods and variables, coding style, PHPStan-aware type annotations, hook callbacks, dependency injection, data integrity for CRUD work and unit tests.

Key principles listed include following WordPress Coding Standards, preferring class methods over standalone functions, putting new internal classes under src/Internal/ and using PSR-4 autoloading under the Automattic WooCommerce namespace. It asks for unit tests with new functionality and for linting and tests to be run before committing.

For @since annotations, the next version number comes from the version property in includes/class-woocommerce.php on the trunk branch, with any -dev suffix removed. This holds even when reviewing pull requests against trunk, where that number can look ahead of the released versions.

When your agent uses it

  • Adding a new PHP class to WooCommerce core
  • Writing PHP unit tests for backend code
  • Adding or documenting an action or filter hook
  • Setting the correct @since version on new code

Example prompts

  • “Add a new internal class for coupon usage limits and write unit tests for it.”
  • “Create a filter hook for the order total calculation and document it properly.”
  • “Which version should I put in the @since tag for this new method?”

Requirements

  • A checkout of the WooCommerce repository
  • PHP with the project's lint and test tooling

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

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

What it can do on your machine

Read from SKILL.md and the folder at commit b41b964. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

WooCommerce Backend Conventions loads about 614 tokens when it runs. Until then it costs about 59 tokens; SKILL.md has 258 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~59
When it runs · the whole SKILL.md, loaded when a task matches
~614

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 258 words (~614 tokens).

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

— opening of SKILL.md by woocommerce, Custom licence
name
woocommerce-backend-dev

Read the full SKILL.md on GitHub

Files

SKILL.md and 8 other files in .ai/skills/woocommerce-backend-dev of woocommerce/woocommerce.

  • SKILL.md
  • code-entities.md
  • coding-conventions.md
  • data-integrity.md
  • dependency-injection.md
  • file-entities.md
  • hooks.md
  • type-annotations.md
  • unit-tests.md

Open the folder on GitHubat commit b41b964

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in woocommerce/woocommerce, which our catalogue first saw on October 7, 2026.

Compare with similar skills

WooCommerce Backend Conventions next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

WooCommerce Backend Conventions compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
WooCommerce Backend Conventions this skillwoocommerce/woocommerce11k1 repos~614Automated safety check: PassCustom licence
Wordpressericrisco/rsc-harness167—~3kAutomated safety check: PassMIT
WordPress ProJeffallan/claude-skills12k—~1.6kAutomated safety check: PassMIT
Code StyleAutomattic/wordpress-activitypub582—~2.2kAutomated safety check: PassMIT
WooCommerce Code GuardamElnagdy/guard-skills1.3k—~2.2kAutomated safety check: PassMIT
DevAutomattic/wordpress-activitypub582—~1.1kAutomated safety check: PassMIT

Similar skills

  • Wordpress

    ericrisco/rsc-harness

    A skill your agent uses when building or hardening WordPress sites or WooCommerce stores and treating WordPress as the product rather than just writing PHP — block themes with theme.json, plugins…

    167 GitHub stars~3k tokensUpdated today
    Backend & APIsAuto-check passed
  • WordPress Pro

    Jeffallan/claude-skills

    Develops WordPress themes, plugins, Gutenberg blocks and WooCommerce features with nonce, escaping and capability checks, phpcs linting and caching tuned for speed.

    12k GitHub stars~1.6k tokensUpdated 4 days ago
    DevelopmentAuto-check passed
  • Code Style

    Automattic/wordpress-activitypub

    PHP coding standards and WordPress patterns for ActivityPub plugin.

    582 GitHub stars~2.2k tokensUpdated today
    DevelopmentAuto-check passed
  • WooCommerce Code Guard

    amElnagdy/guard-skills

    Reviews generated or changed WooCommerce code for HPOS safety, CRUD use, checkout validation and money handling before it ships.

    1.3k GitHub stars~2.2k tokensUpdated 3 mo ago
    DevelopmentAuto-check passed
  • Dev

    Automattic/wordpress-activitypub

    Development workflows for WordPress ActivityPub plugin including wp-env setup, testing commands, linting, and build processes.

    582 GitHub stars~1.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Changelog

    duracelltomi/gtm4wp

    How to write GTM4WP CHANGELOG.md / readme.txt entries. An agent skill from duracelltomi/gtm4wp.

    174 GitHub stars~2.2k tokensUpdated today
    DevelopmentAuto-check passed

More from woocommerce/woocommerce

All 11 skills in this repo
  • WooCommerce Code Review

    woocommerce/woocommerce

    Reviews WooCommerce code changes against the project's standards, flagging backend PHP architecture, naming, documentation, data integrity and testing violations.

    11k GitHub starsUsed in 3 repos~1.1k tokens
    Auto-check passed
  • WooCommerce Markdown Guidelines

    woocommerce/woocommerce

    Rules for writing and editing markdown in the WooCommerce repository, with the project's markdownlint settings for headings, lists and code blocks.

    11k GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed
  • Sets up a local environment for the WooCommerce block email editor, with a watcher, Mailpit email capture and build and test commands for its PHP and JS packages.

    11k GitHub stars~893 tokensUpdated today
    Auto-check passed
  • WooCommerce Dev Cycle

    woocommerce/woocommerce

    Workflow for WooCommerce development: run PHP and JavaScript tests, lint and fix code style on the current branch, and follow guides for i18n and markdown.

    11k GitHub starsUsed in 3 repos~431 tokens
    Auto-check passed
  • WooCommerce Git Commit

    woocommerce/woocommerce

    Commits pending changes with short, verb-first messages that follow WooCommerce repository conventions, splitting commits only when changes are clearly unrelated.

    11k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • WooCommerce Draft PR Creator

    woocommerce/woocommerce

    Opens a concise draft pull request for the current branch, working out change type, base branch, title and body from the commits and diff.

    11k GitHub stars~1.1k tokensUpdated today
    Auto-check passed

Questions about WooCommerce Backend Conventions

What does WooCommerce Backend Conventions do?

Guides agents writing or changing WooCommerce backend PHP so new classes, hooks and unit tests follow the project's conventions. Load it before writing PHP unit tests, creating classes, changing existing backend code or adding hooks and filters.md is an index to eight reference files covering file and class layout, naming of methods and variables, coding style, PHPStan-aware type annotations, hook callbacks, dependency injection, data integrity for CRUD work and unit tests.

When should I use WooCommerce Backend Conventions?

WooCommerce Backend Conventions fits situations like: adding a new PHP class to WooCommerce core; writing PHP unit tests for backend code; adding or documenting an action or filter hook; setting the correct @since version on new code.

How do I install WooCommerce Backend Conventions in Claude Code?

Run `npx skills add woocommerce/woocommerce --skill woocommerce-backend-dev -a claude-code`. Or copy the skill folder (.ai/skills/woocommerce-backend-dev in woocommerce/woocommerce) into .claude/skills/woocommerce-backend-dev in your project. Claude Code loads it when a task matches its description.

How do I install WooCommerce Backend Conventions in Codex?

Run `npx skills add woocommerce/woocommerce --skill woocommerce-backend-dev -a codex`. Or copy the skill folder (.ai/skills/woocommerce-backend-dev in woocommerce/woocommerce) into .agents/skills/woocommerce-backend-dev in your project. Codex loads it when a task matches its description.

Can I use WooCommerce Backend Conventions in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add woocommerce/woocommerce --skill woocommerce-backend-dev -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/woocommerce-backend-dev, .gemini/skills/woocommerce-backend-dev, .github/skills/woocommerce-backend-dev and .opencode/skills/woocommerce-backend-dev in your project.

What does WooCommerce Backend Conventions need to run?

SKILL.md names no scripts, command-line tools or credentials: WooCommerce Backend Conventions is instructions for the agent only. Our summary lists: A checkout of the WooCommerce repository; PHP with the project's lint and test tooling.

Does WooCommerce Backend Conventions access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is WooCommerce Backend Conventions safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does WooCommerce Backend Conventions use?

WooCommerce Backend Conventions has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does WooCommerce Backend Conventions use?

About 614 tokens (SKILL.md is roughly 2.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to WooCommerce Backend Conventions?

Skills that share tags, products or a category with WooCommerce Backend Conventions: Wordpress (ericrisco/rsc-harness, 167 stars), WordPress Pro (Jeffallan/claude-skills, 12k stars), Code Style (Automattic/wordpress-activitypub, 582 stars) and WooCommerce Code Guard (amElnagdy/guard-skills, 1.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains WooCommerce Backend Conventions?

woocommerce (a GitHub organization) maintains it in woocommerce/woocommerce, which has 10,540 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 8, 2026.

Source: woocommerce/woocommerce on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.