Communitygithub.com

syncwin/fswp-plugin-developer

本格的なWordPressプラグインのビルド段階。フォルダ構造、アクティベーション/アンインストールライフサイクル、カスタム投稿タイプとテーブル、管理UI階層、Atomic Framework上でのフロントエンド出力、REST、cron、i18n、配布、Tier 3 React管理スタック、そしてスキャフォールドスクリプトを提供。アドオンの基本構造も含む。承認済みPRDの後、fswp-developerから呼び出される。

fswp-plugin-developer とは?

このスキルは、承認されたPRD(fswp-architectが作成)に基づいて実際のWordPressプラグインを構築するための包括的なガイドです。ショートコードスニペットではなく、本格的なプラグインの開発を想定しており、ブートストラップ、ライフサイクル管理(アクティベーション/デアクティベーション)、ドメインロジック(カスタム投稿タイプ、テーブル、REST、cron)、管理UI(ネイティブwp-adminからReact SPAまで)、フロントエンド出力(Atomic Framework)、i18n、配布までの全工程をカバーします。主にClaude Codeエージェントでの使用を想定し、fswp-developerエコシステムの一部として、コーディング標準、セキュリティ、QAエンジニアのスキルと連携します。スキャフォールドスクリプト(scaffold_plugin.py)がテンプレートからプラグインの骨格を生成し、各フェーズで詳細なリファレンス(architecture.md、admin-ui.mdなど)を参照することで、一貫性と品質を保ちながら効率的に開発を進めることができます。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/syncwin/fswp-developer/tree/main/skills/fswp-plugin-developer

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

FSWP プラグイン開発者

常時適用(基本): fswp-developer/references/lean-coding.md(少なく書いて、まず再利用)、fswp-developer/references/coding-standards.md(コーディング標準、ドキュメント、i18n、アクセシビリティ)、および fswp-security-engineer(入力、出力、認可)。

承認済みの PRD(fswp-architect が作成)を実行します。プレフィックス、配布ターゲット、機能面、JS 階層はすでに決定済みです。再確認しないでください。各ステップでは、一般的な手順についてはドメインスキルを、詳細な深さ、テンプレート、厳格なルールについてはこのスキルのリファレンスを読み込んでください。優先順位: fswp-developer/references/precedence.md。

既存のプラグインの変更には、代わりに fswp-maintainer を使用してください。構造パターンについてのみ、このスキルを呼び戻します。

レイヤー

1  ブートストラップ     plugin-slug.php、uninstall.php、includes/class-plugin.php(ビジネスロジックなし)
2  ライフサイクル      アクティベーター / デアクティベーター(アクティベーションフック、dbDelta、アップグレードチェック)
3  ドメイン            PRD にリストされているもののみ: CPT、テーブル、REST ルート、cron
4a 管理 UI            デフォルトはネイティブ wp-admin。1つの React 画面には @wordpress/components。
                       アプリライクな管理画面には React SPA + Tailwind + TanStack Query + Zustand のみ
4b 公開 UI            Atomic Framework(ユーザー提供)、デフォルトはバニラ JS、Alpine はオプトイン

管理 UI に Atomic Framework や Alpine クラスは使用しません。未使用の機能クラスをスキャフォールドしないでください。

ワークフロー

ステップ実行内容ハウスリファレンスドメインスキル
1 スキャフォールドスラッグ、プレフィックス、クラス名、テキストドメインを導出し、scripts/scaffold_plugin.py --help を先に実行します。--plugin-uri と --author-uri は実際の値がある場合のみ渡します(それ以外の場合は行を削除し、プレースホルダーのドメインは絶対に使用しません)。スキャフォールド直後に fswp-qa-engineer/scripts/run_gate.sh <dir> <min-php> --fix を1回実行します: テンプレートには {{...}} プレースホルダーが含まれており、フォーマッターは置換前に安全にリフローできません。architecture.mdなし
2 ブートストラップ + ライフサイクルブートストラップがヘッダー、オートロードを宣言し、メインクラスに引き継ぎますarchitecture.mdなし
3 セキュリティすべてのファイル、すべてのプラグインサイズに対して完全なベースラインを適用fswp-security-engineerfswp-security-engineer
4 ドメインCPT、テーブル(dbDelta、スキーマバージョン)、REST、crondata-cpt.md、rest-cron.mdfswp-api-developer; PRD で必要な場合は fswp-performance-engineer
5 ブロック(PRD にある場合)カスタムブロック、パターン、インタラクティビティなしfswp-block-developer
6 管理 UISettings API、WP_List_Table、Dashicons; チェックリストに従ってのみエスカレーションadmin-ui.md、modern-app-stack.mdなし
7 公開出力まずユーザーに現在の Atomic Framework ファイルを尋ねます; コールバック内で条件付きでエンキューfrontend-output.mdなし
8 i18n + 配布すべてのPHPおよびJS文字列; readme; ライセンス; バージョン管理i18n-distribution.mdWordPress.org 用に fswp-release-manager

ステップ8の終了時に停止し、fswp-qa-engineer に引き継ぎます。

アドオン構造

fswp-maintainer がアドオンモードで実行される場合、ここでステップ1~3と8を再利用します。追加のアドオンルール(ホスト検出、Requires Plugins、ロード順序、グレースフルアブセンス)は fswp-maintainer にあります。

標準(すべてのビルド、すべてのイテレーション)

references/standards.md は、バージョン管理/チェンジログの規律、テクノロジースタックの決定、必要なプロジェクトメタデータ(不足している値を決して発明しない)、docs/ 内の機能ごとのドキュメント、コード品質基準、および最小コード規律(決定してから書く順序、根本原因の修正、shortcut: マーカー)を規定します。最初のビルド前および既存プラグインのイテレーション前に必ず読んでください。これは一度限りのセットアップ手順ではありません。

セキュリティ体制

小規模プラグインだからといって決して緩めないでください: すべての特権アクションに対するケイパビリティチェック、すべての状態変更に対するノンス、入力のサニタイズと出力のエスケープ、すべてのクエリに対する $wpdb->prepare()、すべての REST ルートに対する実際の permission_callback、安全なライフサイクル、平文のシークレットなし。完全なルール: fswp-security-engineer。

Alpine 階層

決して推測されません。references/frontend-output.md の5項目チェックリストによってのみ選択され、ユーザーがどのチェックがトリガーされたか、およびバニラの代替案がどのようなものかを明示的に確認した後にのみ選択されます。

Atomic Framework(ユーザー提供、バンドル不可)

これは別途メンテナンスされる製品です。バンドル版は乖離します。ビルドに frontend が含まれる場合は常に、現在の afw-tokens.css、afw-components.css、afw-foundation-logics.js(さらに Alpine 階層が確認された場合のみ alpine.min.js、alpine-loader.js、alpine-components.js)を要求します。スキャフォールドは --foundation-dir を介してそれらをコピーし、見つからない場合はリマインダーで停止します。

依存関係

Atomic Framework(Tier 2 @wordpress/*、Tier 3 スタック)を除くすべての依存関係は、スキャフォールド時に公式レジストリの latest で解決され、その後固定されます: ロックファイルをコミットし、解決されたバージョンを README に記録します。スキャフォールド時の最新版とコミットされたロックファイルにより、WordPress.org の再現可能なソースルールを満たします。例外: ユーザーが指定した互換性の上限。詳細: references/modern-app-stack.md。

成果物

インストール可能な {plugin-slug}.zip(zipルートにプラグインフォルダー)に加えて、実際のインストール手順を含む readme.txt またはプライベートな README.md、および簡単なサマリー(プレフィックスと機能の決定、まだ必要な手動ステップ(API キー、cron 間隔、初期設定など))を提供します。コンパイルされた出力はソースとともに出荷されます(references/modern-app-stack.md)。

バンドル物

  • scripts/scaffold_plugin.py: --features cpt,db,rest,cron,admin,frontend(任意のサブセット)、--js-tier vanilla|alpine、--admin-tier native|react|app、--distribution wporg|private|both、--plugin-uri、--author-uri、--foundation-dir、--zip。
  • assets/templates/: {{PREFIX}}、{{Prefix}}、{{prefix}}、{{PLUGIN_NAME}}、{{plugin-slug}} プレースホルダーを含むプラグインスケルトン。

Individual skills in this repo

This repo contains 9 individual skills — each has its own dedicated page.

fswp-api-developer

Domain skill for WordPress REST API and Abilities API work in Full-Stack WP Developer. Covers registering routes with schemas, argument validation and sanitization, permission callbacks, controller classes, exposing post types and meta, authentication (cookie nonce, application passwords), pagination and errors, and registering abilities with input and output schemas and safety annotations. Use for any custom endpoint or machine-readable capability in a plugin or theme.

fswp-architect

Planning stage of Full-Stack WP Developer. Classifies the work (new plugin, new theme, update to an existing plugin or theme, add-on for another product, or WordPress Core patch), triages existing code with a bundled detection script, asks one round of essential questions, does competitive research, and produces one reviewable PRD or change brief with a single approval gate. Also covers Migration mode and multi-session handoff docs. Invoked by fswp-developer before any code is written; consult directly for PRD, change-brief, or handoff-doc questions.

fswp-block-developer

Domain skill for WordPress block editor work in Full-Stack WP Developer. Covers building custom Gutenberg blocks (block.json, static and dynamic rendering, attributes, supports, InnerBlocks, variations, deprecations, block bindings), block patterns, and the Interactivity API (data-wp directives, stores, server-side state), with the @wordpress/scripts build workflow. Use for any custom block, pattern, or front-end interactivity in a plugin or theme.

fswp-core-contributor

WordPress Core contribution stage of Full-Stack WP Developer. Guides a contributor through finding or filing a Trac ticket, setting up the wordpress-develop checkout and test environment, writing a patch or GitHub pull request that follows Core coding standards, inline documentation, backward compatibility and tests, and preparing the ticket comment; also routes block-editor changes to the Gutenberg repository and security reports to the private process. Invoked by fswp-developer for Core patches; consult directly for Core workflow questions.

fswp-devops-engineer

Domain skill for WordPress development tooling in Full-Stack WP Developer. Covers local environments (wp-env with Docker, WordPress Playground and Blueprints), command-line site operations (plugin and theme management, database export, search-replace, cron, scaffolding), coding standards and static analysis (PHPCS with WordPress standards, PHPStan with WordPress stubs), PHP and JS testing setup, and the @wordpress/scripts toolchain. Use when setting up, running, or automating a WordPress dev or test environment.

fswp-maintainer

Change stage for existing WordPress code in Full-Stack WP Developer. Updates, fixes, refactors, and upgrades existing plugins and themes without breaking them, and builds add-ons for products you do not own (WooCommerce extensions, page-builder elements, extensions of other plugins) using hooks instead of edits to third-party files. Covers reading before changing, parity lists, deprecation, host compatibility, upgrade paths, and patch delivery. Invoked by fswp-developer after an approved change brief; consult directly for safe-change or add-on questions.

fswp-qa-engineer

Verification stage of Full-Stack WP Developer. Runs the mechanical gate for plugins and themes (house-rule scripts, PHP lint, PHPCS with WordPress standards, PHP compatibility, PHPStan with WordPress stubs), the manual checklist, PRD or change-brief scenario tests, and the pre-release check. Reports PASS, FAIL, or NOT RUN and never implies a skipped check passed. Invoked by fswp-developer after a build and again before delivery; consult directly to audit any plugin or theme folder.

fswp-reviewer

Independent review stage of Full-Stack WP Developer. Reviews a finished WordPress plugin, theme, add-on, or Core patch through a security lens (WordPress-specific vulnerabilities, REST and AJAX authorization with an API risk map, AI-generated-code risks), a quality lens (error handling, data and upgrade safety, performance, i18n, accessibility, comment accuracy, test gaps, class and type design, scope), and an optional lean lens for trimming over-engineering, reporting only high-confidence findings in a fixed format. Invoked by fswp-developer after the verify gate, normally through the fswp-code-reviewer agent; consult directly to review or optimize any WordPress code.

fswp-theme-developer

Theme build stage of Full-Stack WP Developer. Builds custom WordPress themes - block themes (theme.json, templates, template parts, patterns, style variations), classic themes (template hierarchy, functions.php, theme supports), hybrids, and child themes - with accessibility, escaping, and directory readiness built in, plus a scaffold script. Invoked by fswp-developer after an approved PRD for a new theme; consult directly for a specific theme pattern. For changes to an existing theme use fswp-maintainer.

関連スキル