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ファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 3個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    wpacademyがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルWp Plugin DevをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/wpacademy/wordpress-dev-skills/tree/main/wp-plugin-dev
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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で使用

TypingMindのチャットでWp Plugin Devを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にWp Plugin Devを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Wp Plugin Devは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じ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

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「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...

TypingMindでWp Plugin Devを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Wp Plugin Devはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにWp Plugin Devをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/wpacademy/wordpress-dev-skills/tree/main/wp-plugin-devを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Wp Plugin Devを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Wp Plugin Devは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもWp Plugin Devを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Wp Plugin Dev」は無料ですか?

はい。wpacademyがGitHubでGPL-2.0ライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇