Skillpedia
الاختبار48k · #6205

wp-guard

ما الذي تفعله

يفحص هذا الوكيل شيفرة إضافات WordPress والقوالب والكتل من ناحية الأمان والترجمة والأداء وصحة استخدام API. يساعد على منع المشكلات الشائعة في الشيفرة التي تنتجها أدوات الذكاء الاصطناعي.

متى تستخدمها

  • ✓عندما ينشئ وكيل الذكاء الاصطناعي شيفرة WordPress أو يعدّلها.
  • ✓قبل نشر إضافة جديدة أو قالب جديد لـWordPress.
  • ✓عندما تريد مراجعة شيفرة موجودة للبحث عن ثغرات أمنية أو أخطاء في الترجمة.

رابط المهارة

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/wp-guard/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/wp-guard/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“راجع شيفرة إضافة WordPress هذه وتأكد من أنها آمنة وجاهزة للترجمة.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يحلل الوكيل الشيفرة بحثًا عن ثغرات معروفة، مثل غياب حمايات الأمان، أو نصوص إنجليزية مكتوبة مباشرة في الشيفرة وينبغي أن تكون قابلة للترجمة، أو استعلامات ضعيفة لقاعدة البيانات. ثم يقترح إصلاحات لهذه المشكلات.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

⚠️ AUTHORIZED USE ONLY This skill is for educational purposes or authorized security assessments only. You must have explicit, written permission from the system owner before using this tool. Misuse of this tool is illegal and strictly prohibited.

Mandatory confirmation gate Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:

  1. Ask the user to state the exact target URL, IP, account, or resource.
  2. Ask the user to confirm written authorization and the permitted scope.
  3. Show the exact command(s) and explain their expected effect.
  4. Wait for explicit confirmation in the current conversation.

Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.

WP Guard

[!WARNING] Authorized Use Only. Review only WordPress code and environments the user owns or is explicitly authorized to assess. Keep checks non-destructive and inside the approved scope.

You are reviewing generated or changed WordPress code before it ships. Apply the rules below as a guard pass after the first implementation pass. Be a sharp reviewer, not a pedantic one: flag what creates vulnerabilities, breaks translations, or melts servers — ignore cosmetic preferences WPCS tooling already handles.

These rules exist because AI agents produce WordPress code with systematic failures: raw echo of request data, AJAX handlers with neither nonce nor capability check, SQL built by string interpolation, English hardcoded into user-facing strings, posts_per_page => -1 on sites with a million posts, and hand-rolled replacements for APIs core already ships. Each one looks fine in a demo and fails in production.

When to Use

Use this skill when reviewing generated or changed WordPress code — plugins, themes, and blocks — before it ships. Activate it reactively after an agent writes, edits, or reviews code touching WordPress APIs: hooks, custom post types, REST endpoints, database queries, and block editor integrations.

How to use this skill

Guard-pass mode (recommended): after WordPress code has been generated or edited, apply the rules to the diff or target files, then run the self-check before delivery. Fix violations before showing the user.

Live mode (explicit): when the user invokes this skill before writing WordPress code, apply the same rules while writing, then run the self-check before delivery.

Review mode (the user asks you to review, audit, or rate WordPress code): walk references/review-checklist.md against the target files and produce a structured findings report. Do not edit code in review mode unless asked.

Pair this skill with clean-code-guard when both are installed: clean-code-guard owns generic code quality; wp-guard owns the WordPress layer.

Adapt to the project first

  1. Read the project's agent instructions (CLAUDE.md, AGENTS.md), phpcs.xml/WPCS config, and composer.json. Project conventions win on conflict.
  2. Identify the established prefix (functions, options, meta keys, handles) and the minimum supported WP/PHP versions. Match both.
  3. Detect context: WooCommerce APIs in play → apply woo-guard alongside this skill when it is installed; otherwise apply WooCommerce's HPOS, CRUD, and checkout rules from its developer documentation. Multilingual site (WPML/Polylang/multisite) → i18n rules are blocking, not advisory.
  4. Read one neighboring file before writing. Mirror its error handling, hook registration style, and escaping habits — unless they violate the security rules below, which are non-negotiable.

The Rules

Security — must fix, no exceptions

  1. Escape late, escape everything. Every variable crossing into HTML output goes through the context-correct function: esc_html(), esc_attr(), esc_url(), or wp_kses()/wp_kses_post() for rich content. Data passed to inline JS goes through wp_json_encode() + wp_add_inline_script() — esc_js() is legacy, for single-quoted strings in inline attributes only. Escaping happens at output, not at storage. echo $anything; without an esc_* wrapper fails review.

…

الأسئلة الشائعة

لماذا أحتاج إلى إذن لاستخدام هذه المهارة؟

هذه المهارة قوية ويمكن استخدامها للبحث عن الثغرات. من المهم استخدامها فقط على أنظمة تملكها أو لديك إذن صريح باختبارها، لتجنب المشكلات القانونية والأخلاقية.

ما معنى «nonce» و«فحوص الصلاحيات»؟

هذه آليات أمان في WordPress. يساعد «nonce» على التأكد من أن الطلب صادر عن المستخدم المقصود ولم يُعبث به. أما «فحوص الصلاحيات» فتتحقق مما إذا كان المستخدم يملك الإذن بتنفيذ الإجراء المطلوب.

ماذا تعني عمليتا «escape» و«sanitize» للبيانات؟

«التنظيف» (sanitize) يعني تنظيف البيانات الواردة من الأحرف الخطرة أو غير الصالحة. «الترميز» (escape) يعني تجهيز البيانات قبل عرضها حتى لا تُفسَّر كشيفرة خبيثة، مثل HTML أو JavaScript.

التفاصيل

الوصف الأصلي من المؤلف

Review generated or changed WordPress plugins, themes, and blocks for security, internationalization, performance, and API correctness.

repo: sickn33/agentic-awesome-skills

الشعبية

نجوم GitHub
48k
الترتيب
#6205
الترخيص
MIT
آخر تحديث
15‏/10‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة