woocommerce-backend-dev
Add or modify WooCommerce backend PHP code following project conventions. Use when creating new classes, methods, hooks, or modifying existing backend code. **MUST be invoked before writing any PHP unit tests.**
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o woocommerce-backend-dev.zip https://jpskill.com/download/21031.zip && unzip -o woocommerce-backend-dev.zip && rm woocommerce-backend-dev.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/21031.zip -OutFile "$d\woocommerce-backend-dev.zip"; Expand-Archive "$d\woocommerce-backend-dev.zip" -DestinationPath $d -Force; ri "$d\woocommerce-backend-dev.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
woocommerce-backend-dev.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
woocommerce-backend-devフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
WooCommerce バックエンド開発
このスキルは、プロジェクトの標準と慣例に従って WooCommerce バックエンドの PHP コードを開発するためのガイダンスを提供します。
このスキルを使用するタイミング
以下の場合は常にこのスキルを呼び出してください。
- 新しい PHP 単体テスト (
*Test.phpファイル) を記述する場合 - 新しい PHP クラスを作成する場合
- 既存のバックエンド PHP コードを修正する場合
- フックまたはフィルターを追加する場合
手順
バックエンドの PHP コードを追加または修正する際は、WooCommerce プロジェクトの慣例に従ってください。
- 新しいコード構造の作成: クラスの作成とファイルの整理に関する慣例については、file-entities.md を参照してください(ただし、新しい単体テストファイルについては unit-tests.md を参照してください)。
- 命名規則: メソッド、変数、およびパラメーターの命名については、code-entities.md を参照してください。
- コーディングスタイル: 一般的なコーディング標準とベストプラクティスについては、coding-conventions.md を参照してください。
- 型アノテーション: PHPStan に対応した PHPDoc アノテーションについては、type-annotations.md を参照してください。
- フックの操作: フックのコールバックの慣例とドキュメントについては、hooks.md を参照してください。
- 依存性注入: DI コンテナの使用法については、dependency-injection.md を参照してください。
- データ整合性: CRUD 操作を実行する際のデータ整合性の確保については、data-integrity.md を参照してください。
- テストの記述: 単体テストの慣例については、unit-tests.md を参照してください。
主要な原則
- 常に WordPress コーディング標準に従ってください。
- スタンドアロン関数ではなく、クラスメソッドを使用してください。
- 新しい内部クラスはデフォルトで
src/Internal/に配置してください。 Automattic\WooCommerce名前空間で PSR-4 オートロードを使用してください。- 新しい機能には包括的な単体テストを記述してください。
- 変更をコミットする前に、リンティングとテストを実行してください。
バージョン情報
@since アノテーションの次の WooCommerce バージョン番号を決定するには:
trunkブランチのincludes/class-woocommerce.phpにある$versionプロパティを読み取ってください。- 存在する場合は
-devサフィックスを削除してください。 - 例:
trunkが10.4.0-devを示している場合、@since 10.4.0を使用してください。 - 注:
trunkに対する PR をレビューする際、リリースされたバージョンと比較して「未来」に見える場合でも、trunkのバージョンが正しいです。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
WooCommerce Backend Development
This skill provides guidance for developing WooCommerce backend PHP code according to project standards and conventions.
When to Use This Skill
ALWAYS invoke this skill before:
- Writing new PHP unit tests (
*Test.phpfiles) - Creating new PHP classes
- Modifying existing backend PHP code
- Adding hooks or filters
Instructions
Follow WooCommerce project conventions when adding or modifying backend PHP code:
- Creating new code structures: See file-entities.md for conventions on creating classes and organizing files (but for new unit test files see unit-tests.md).
- Naming conventions: See code-entities.md for naming methods, variables, and parameters
- Coding style: See coding-conventions.md for general coding standards and best practices
- Type annotations: See type-annotations.md for PHPStan-aware PHPDoc annotations
- Working with hooks: See hooks.md for hook callback conventions and documentation
- Dependency injection: See dependency-injection.md for DI container usage
- Data integrity: See data-integrity.md for ensuring data integrity when performing CRUD operations
- Writing tests: See 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\WooCommercenamespace - Write comprehensive unit tests for new functionality
- Run linting and tests before committing changes
Version Information
To determine the next WooCommerce version number for @since annotations:
- Read the
$versionproperty inincludes/class-woocommerce.phpon the trunk branch - Remove the
-devsuffix 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