woo-guard
यह क्या करती है
यह एजेंट जाँचता है कि WooCommerce से बने ऑनलाइन स्टोर का कोड सुरक्षित और अप-टू-डेट है या नहीं। यह सुनिश्चित करता है कि कोड नवीनतम WooCommerce वर्शन के साथ सही तरीके से काम करे, खासकर पेमेंट, शिपिंग और ऑर्डर प्रोसेस करने के तरीके में।
कब इस्तेमाल करें
- ✓किसी WooCommerce स्टोर के नए या बदले गए कोड की समीक्षा करते समय।
- ✓WooCommerce स्टोर के लिए कोई नया फीचर या अपडेट पब्लिश करने से पहले।
- ✓जब कोड ऑर्डर, पेमेंट या चेकआउट सिस्टम से बात करता हो।
Skill का लिंक
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/woo-guard/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“इस कोड की समीक्षा करो और जाँचो कि यह नवीनतम WooCommerce वर्शन के साथ संगत है और सुरक्षा के अच्छे तरीकों का पालन करता है।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट कोड का विश्लेषण करता है ताकि पक्का हो कि ऑर्डर और प्रोडक्ट डेटा को एक्सेस और सेव करने के लिए सही फंक्शन इस्तेमाल हो रहे हैं, और पेमेंट व चेकआउट की वैलिडेशन सर्वर-साइड पर हो।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Woo Guard
You are reviewing generated or changed WooCommerce code before it ships. Apply the rules below as a guard pass after the first implementation pass. WooCommerce is a moving platform — order storage changed engines, checkout changed frameworks — and code written from memory targets the WooCommerce of three years ago. With money on the line, "works on my demo store" is not a standard.
These rules exist because AI agents produce WooCommerce code with systematic failures: order meta read through get_post_meta() (broken on HPOS stores), products updated by direct meta writes that skip lookup tables and hooks, checkout validated only in JavaScript, prices computed in floats, and woocommerce_* hooks registered before confirming WooCommerce is active.
When to Use
Use this skill when reviewing generated or changed WooCommerce code — extensions, payment and shipping integrations, checkout customizations, and order/product logic — before it ships. Activate it reactively after an agent writes or modifies WooCommerce hooks, HPOS logic, or checkout flows.
How to use this skill
Guard-pass mode (recommended): after WooCommerce code has been generated or edited, apply the rules to the diff or target files, then run the self-check before delivery.
Live mode (explicit): when the user invokes this skill before writing WooCommerce code, apply the same rules while writing, then run the self-check before delivery.
Review mode (the user asks you to review or audit WooCommerce code): walk references/review-checklist.md and produce a structured findings report. Do not edit code in review mode unless asked.
Security floor — these hold in all WooCommerce code, at maximum severity, because money is on the line:
- Escape all output with the context-correct
esc_*function. wp_unslash()then sanitize all request data before it touches logic.- Capability check plus nonce on every state change.
$wpdb->prepare()for every query containing a variable.
If wp-guard is installed, run it alongside for the full WordPress layer.
Adapt to the project first
- Read the project's agent instructions and the extension's declared WooCommerce version range. Project conventions win on conflict.
- Determine the order storage mode this code must support: HPOS, legacy posts, or both (the default assumption is both).
- Determine the checkout in play: Blocks/Store API, legacy shortcode checkout, or both. Hooks for one do not fire in the other.
- Check whether WooCommerce activity is guarded: feature checks or
class_exists( 'WooCommerce' )before anywc_*call orwoocommerce_*hook.
The Rules
Order and product data — must fix
Orders are not posts. Access orders only through the CRUD API:
wc_get_order(),wc_get_orders(),$order->get_meta(),$order->update_meta_data()+$order->save(). Forbidden on order data:get_post_meta(),update_post_meta(),WP_Query/get_posts()withpost_type => shop_order, and direct$wpdbjoins on postmeta. These work on legacy stores and silently break on HPOS stores. Details: references/hpos-and-crud.md.CRUD objects, getters/setters, then save. Products, customers, and coupons go through their CRUD objects (
wc_get_product(), setters,->save()). Direct meta writes skip lookup-table sync, skip the hooks other extensions rely on, and skip cache invalidation. Stock changes go throughwc_update_product_stock()semantics; order state changes through$order->update_status()— which fire the emails and hooks the store expects.Declare feature compatibility. Any extension touching orders declares HPOS compatibility (
FeaturesUtil::declare_compatibility( 'custom_order_tables', … )); any extension touching checkout declarescart_checkout_blockscompatibility (or incompatibility, honestly). A missing declaration shows every store owner a warning banner with your plugin's name on it.
Checkout and money — must fix
- Checkout validation is server-side. Validate at
woocommerce_checkout_process(legacy) or through Store API extension schemas (Blocks). JavaScript validation is UX, never security. Know which checkout the store runs and wire both when the extension claims general compatibility.
…
अक्सर पूछे जाने वाले सवाल
मुझे `get_post_meta()` से ऑर्डर डेटा एक्सेस क्यों नहीं करना चाहिए?
नए WooCommerce वर्शन (HPOS) में ऑर्डर अब सामान्य पोस्ट की तरह स्टोर नहीं होते। `get_post_meta()` इस्तेमाल करने से ऐसे स्टोर पर कोड सही तरीके से काम करना बंद कर सकता है।
'validate checkout server-side' का क्या मतलब है?
इसका मतलब है कि ऑर्डर पूरा होने से जुड़ी ज़रूरी जाँच (जैसे स्टॉक उपलब्ध है या नहीं, या पेमेंट की जानकारी) सर्वर पर होनी चाहिए, सिर्फ़ यूज़र के ब्राउज़र में नहीं। सुरक्षा के लिए यह बहुत ज़रूरी है।
कोड में HPOS और चेकआउट ब्लॉक्स के साथ संगतता क्यों घोषित करनी चाहिए?
संगतता घोषित करने से WooCommerce और दूसरे डेवलपर्स को पता चलता है कि आपका कोड ऑर्डर मैनेज करने के नए तरीके (HPOS) और आधुनिक चेकआउट सिस्टम (blocks) के साथ टेस्ट हो चुका है और काम करता है। इससे स्टोर मालिक को चेतावनियाँ और दिक्कतें नहीं आतीं।
जानकारी
लेखक का मूल विवरण
Review generated or changed WooCommerce extensions, payment and shipping integrations, checkout customizations, and order or product logic.
लोकप्रियता
- GitHub स्टार
- 48k
- रैंकिंग में स्थान
- #6193
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
00-andruia-consultant
48kआपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।
007
48kआपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।
10-andruia-skill-smith
48kआपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।
20-andruia-niche-intelligence
48kआपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।
मिलती-जुलती skills
api-connector-builder
280kयह आपके एजेंट को मौजूदा pattern के हिसाब से नए API connections बनाने देता है। जब बिना कोई नया तरीका बनाए एक और integration जोड़ना हो, तब इसका इस्तेमाल करें।
api-design
280kयह आपके एजेंट को best practices के हिसाब से REST APIs डिज़ाइन करने में मदद करता है। यह तय करने में काम आता है कि APIs आपस में कैसे बात करें, errors कैसे दिखें, और data को कैसे व्यवस्थित करें।
backend-patterns
280kआपके एजेंट को server-side architecture patterns और database optimization में मदद करता है। server पर चलने वाला code बनाने या review करने के लिए उपयोगी है।