woocommerce-code-review
依據標準審查 WooCommerce 程式碼
在 WooCommerce 開發中確保程式碼品質,面對多種編碼標準可能相當具挑戰性。此技能會透過檢查 WooCommerce 專屬的 PHP、JavaScript 與 UI 文案指南來自動化程式碼審查。
下载技能 ZIP
在 Claude 中上传
前往 设置 → 功能 → 技能 → 上传技能
开启并开始使用
测试它
正在使用“woocommerce-code-review”。 Review this WooCommerce PHP code: class MyClass { public function getData() { return new Order(); } }
预期结果:
- ❌ Dependency Injection: Using 'new' for DI-managed class
- Location: MyClass.php line 3
- Standard: woocommerce-backend-dev/dependency-injection.md
- Fix: Use $container->get( Order::class ) instead of new Order()
正在使用“woocommerce-code-review”。 Check these UI strings: 'Save Changes', 'Order Details', 'Payment Options'
预期结果:
- ❌ UI Text: Title Case should be sentence case
- Location: UI strings
- Standard: woocommerce-copy-guidelines/sentence-case.md
- Fix: Use 'Save changes', 'Order details', 'Payment options'
安全审计
安全Documentation-only skill providing coding standards guidelines. Contains no executable code, network calls, or file system operations. Static findings are false positives from markdown link syntax and JSON text being misidentified as security patterns.
风险因素
🌐 网络访问 (1)
📁 文件系统访问 (14)
质量评分
你能构建什么
確保程式碼品質
在合併前審查 Pull Request 是否符合 WooCommerce 編碼標準
自動化標準檢查
快速找出 PHP 與 JavaScript 程式碼變更中的關鍵違規
維持一致性
依循 WooCommerce 慣例,讓團隊成員的程式碼保持一致
试试这些提示
Review this WooCommerce PHP code for critical violations: [paste code]. Check for standalone functions, incorrect DI usage, naming conventions, and missing documentation.
Check these WooCommerce UI strings for proper sentence case: [paste text]. Flag any Title Case usage that should be sentence case.
Review this WooCommerce code for dependency injection violations. Check if classes use $container->get() instead of new, and if internal classes are in src/Internal/.
Perform a complete WooCommerce code review on this PR. Check PHP standards, UI text, documentation, and architecture. Group violations by type with specific fixes.
最佳实践
- 在標記違規時務必引用特定的技能文件
- 將相關問題分組以提供更清楚的回饋
- 在審查中提供技能文件中的正確範例
避免
- 不要標記 WooCommerce 標準未涵蓋的風格偏好
- 避免在未引用相關技能文件的情況下審查程式碼
- 切勿自行假設標準,務必參考特定技能檔案