شعار Wp Plugin Dev

Wp Plugin Dev

المجتمع
wpacademy
wp-plugin-dev

Develop WordPress plugins following official WordPress coding standards, security best practices, and WordPress.org directory guidelines. Use this skill whenever the user wants to create, scaffold, or develop a WordPress plugin — including standard plugins (settings pages, CPTs, shortcodes), WooCommerce extensions, Gutenberg block plugins, or REST API / headless plugins. Also trigger when the user mentions "WordPress plugin", "WP plugin", asks to build a feature as a plugin, wants to add admin pages, register custom post types, create blocks, build WooCommerce add-ons, or extend WordPress in any way via plugin architecture. Even if the user just says "build me a plugin for X", use this skill.

نظرة عامة

الناشرwpacademy
المستودعwordpress-dev-skills
اسم المهارةwp-plugin-dev
النجوم
70
التفريعات
18
الملفات المرفقة
3
الترخيصGPL-2.0
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 3

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها wpacademy على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Wp Plugin Dev في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى الإضافات → المهارات.
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/wpacademy/wordpress-dev-skills/tree/main/wp-plugin-dev
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات → المهارات → إضافة مهارة → من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wpacademy/wordpress-dev-skills.git /tmp/wordpress-dev-skills
mkdir -p .claude/skills
cp -r /tmp/wordpress-dev-skills/wp-plugin-dev .claude/skills/wp-plugin-dev
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Wp Plugin Dev في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج Wp Plugin Dev تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Wp Plugin Dev بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

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

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

WordPress Plugin Development

Overview

Create production-ready WordPress plugins that follow official WordPress coding standards, the WordPress.org plugin directory guidelines, and security best practices. Every plugin produced by this skill is modular, secure, translatable, and ready for WordPress.org submission.

Quick Start Workflow

  1. Read references — Before writing any code, read the relevant reference files:
    • references/architecture.md — Plugin structure, boilerplate patterns for all plugin types
    • references/security.md — Sanitization, escaping, prepared statements, nonces, caching
    • references/wp-org-guidelines.md — WordPress.org directory rules (18 guidelines)
  2. Gather requirements — Ask the user what the plugin should do, then determine which modules are needed
  3. Scaffold — Generate the directory structure and bootstrap file
  4. Build features — Create each feature as a separate modular class
  5. Generate readme.txt — Always include a WordPress.org-compliant readme.txt
  6. Deliver — Ask user if they want files in /mnt/user-data/outputs/ for download or a custom path

Core Principles — ALWAYS Follow These

1. Clean Bootstrap File

The main plugin file (plugin-name.php) is ONLY a bootstrap loader. It contains:

  • Plugin header comment (with all required headers)
  • Constants (VERSION, PLUGIN_DIR, PLUGIN_URL, PLUGIN_BASENAME)
  • register_activation_hook() / register_deactivation_hook()
  • Autoloader or require_once statements
  • A single init function that instantiates the main class

NEVER put settings registration, shortcode handlers, AJAX callbacks, CPT registration, hook callbacks, template rendering, or ANY feature logic in the main plugin file.

2. Modular Architecture

Every distinct feature gets its own class file in the appropriate directory:

  • includes/ — Core classes, shared utilities, data models
  • admin/ — Admin-only functionality (settings pages, meta boxes, admin notices)
  • public/ — Public-facing functionality (shortcodes, frontend rendering)
  • blocks/ — Gutenberg blocks (each block gets its own subdirectory)
  • api/ — REST API endpoints

Each class follows the single-responsibility principle. When a feature grows beyond ~200 lines, split it into sub-components.

3. Security — Non-Negotiable

Apply ALL of the following on EVERY piece of code:

Input: Sanitize ALL user input immediately upon receipt.

php
$title = sanitize_text_field( wp_unslash( $_POST['title'] ) );

Output: Escape ALL output at the point of rendering (late escaping).

php
echo esc_html( $title );

Database: Use $wpdb->prepare() for ALL custom SQL queries. No exceptions.

php
$wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$table} WHERE id = %d", $id ) );

Auth: Check nonces for ALL form submissions and AJAX requests. Check capabilities before ALL privileged operations.

Caching: Use Transients API or wp_cache_* for expensive queries and external API calls.

Read references/security.md for the complete function reference.

4. WordPress Coding Standards

  • Use WordPress naming conventions: snake_case for functions/variables, Upper_Snake_Case for classes
  • Prefix ALL functions, classes, hooks, options, transients, and database tables with the plugin prefix
  • Use proper PHPDoc blocks on all classes, methods, and functions
  • All user-facing strings must be translatable using __(), _e(), esc_html__(), etc.
  • Set the text domain to match the plugin slug
  • Use wp_enqueue_script() / wp_enqueue_style() — never hardcode <script> or <link> tags
  • Use WordPress bundled libraries (jQuery, etc.) — never bundle your own copies
  • Enqueue admin assets only on plugin pages (check $hook parameter)
  • Enqueue public assets conditionally (only when the plugin's output is on the page)

5. WordPress.org Compliance

Every plugin MUST:

  • Use GPLv2 or later license
  • Include a complete readme.txt following the WordPress.org format
  • Include uninstall.php for clean removal
  • Not include obfuscated code
  • Not include tracking without opt-in consent
  • Not bundle WordPress default libraries
  • Have human-readable code with meaningful names
  • Not embed credit links without explicit user opt-in

Read references/wp-org-guidelines.md for all 18 guidelines.

Plugin Type Reference

When the user's requirements include any of these, read references/architecture.md and use the corresponding patterns:

User WantsModule PatternKey File
Settings pageSettings class with Settings APIadmin/class-*-settings.php
Custom post typeCPT registration classincludes/class-*-post-types.php
Custom taxonomyTaxonomy registration (in CPT class or separate)includes/class-*-taxonomies.php
ShortcodesShortcode handler classpublic/class-*-shortcodes.php
REST API endpointsREST controller classapi/class-*-rest-controller.php
Gutenberg blocksBlock with block.json + JS/Reactblocks/{block-name}/
WooCommerce extensionWooCommerce integration class (with dependency check)includes/class-*-woocommerce.php
AJAX handlersAJAX handler classincludes/class-*-ajax.php
Custom database tableDatabase class with dbDelta()includes/class-*-database.php
Admin noticesNotices classadmin/class-*-notices.php
Cron jobsCron scheduler classincludes/class-*-cron.php
Meta boxesMeta box classadmin/class-*-meta-boxes.php
WidgetsWidget class extending WP_Widgetincludes/class-*-widget.php

Naming Conventions

When scaffolding, derive all names from the plugin name the user provides:

ElementConventionExample (plugin: "Smart Bookmarks")
Plugin sluglowercase-hyphenatedsmart-bookmarks
Text domainsame as slugsmart-bookmarks
Function prefixlowercase underscoresmb_
Class prefixUpper_SnakeSmart_Bookmarks_
Constant prefixUPPER_SNAKESMB_
Option namesprefix + namesmb_settings
Transient namesprefix + namesmb_cache_items
DB table prefixprefix + namesmb_items
Hook namesprefix/namesmb_after_save
REST namespaceslug/v1smart-bookmarks/v1
Block namespaceslug/blocksmart-bookmarks/featured-list

Choose a short prefix (2-4 characters) derived from the plugin name initials.

Delivery

After building the plugin:

  1. Ask the user where they want the files:
    • Download: Copy to /mnt/user-data/outputs/{plugin-slug}/ and present as downloadable
    • Custom path: Write to the path the user specifies
  2. Always include readme.txt in the plugin root
  3. Provide a brief summary of the generated files and what each module does
  4. If the plugin includes Gutenberg blocks, note that npm install && npm run build is needed for the block assets

Checklist Before Delivery

Run through this before presenting the final plugin:

  • Main plugin file contains ONLY bootstrap code
  • Every feature is in its own class file
  • ALL user input is sanitized
  • ALL output is escaped
  • ALL custom SQL uses $wpdb->prepare()
  • ALL forms use nonces
  • ALL privileged actions check capabilities
  • ALL strings are translatable with correct text domain
  • ALL functions/classes/hooks are prefixed
  • Assets are properly enqueued (not hardcoded)
  • Admin assets only load on plugin pages
  • readme.txt is present and complete
  • uninstall.php handles clean removal
  • License header is GPLv2 or later
  • No bundled WP default libraries
  • Caching is used for expensive operations
  • Activation hook creates any needed DB tables
  • Deactivation hook cleans up scheduled events

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة أثناء تحميل المهارة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

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

ماذا تفعل مهارة الذكاء الاصطناعي Wp Plugin Dev؟

Develop WordPress plugins following official WordPress coding standards, security best practices, and WordPress.org directory guidelines. Use this skill whenever the user wants to create, scaffold, or develop a WordPress plugin — including standard plugins (settings pages, CPTs, shortcodes), WooCommerce extensions, Gutenberg block plugins, or REST API / headless plugins. Also trigger when the user mentions "WordPress plugin", "WP plugin", asks to build a feature as a plugin, wants to add admin pages, register custom post types, create blocks, build WooCommerce add-ons, or extend WordPress i...

لماذا تستخدم Wp Plugin Dev على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Wp Plugin Dev عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Wp Plugin Dev في TypingMind؟

افتح الإضافات → المهارات → التثبيت من GitHub في TypingMind والصق https://github.com/wpacademy/wordpress-dev-skills/tree/main/wp-plugin-dev. يقرأ TypingMind ملف SKILL.md الخاص بها، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Wp Plugin Dev؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Wp Plugin Dev؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Wp Plugin Dev معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Wp Plugin Dev مجانية؟

نعم. نشرها wpacademy على GitHub بموجب ترخيص GPL-2.0. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا البريدية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇