Communitygithub.com

syncwin/fswp-plugin-developer

Plugin build stage of Full-Stack WP Developer. House standards and code templates for real WordPress plugins (not shortcode snippets) - folder anatomy, activation/uninstall lifecycle, custom post types and tables, admin UI tiers, front-end output on the Atomic Framework, REST and cron, i18n, distribution, and the Tier 3 React admin stack - plus a scaffold script. Also the base structure for add-ons. Invoked by fswp-developer after an approved PRD; consult directly for a specific plugin build pattern.

What is fswp-plugin-developer?

fswp-plugin-developer is a Claude Code agent skill that plugin build stage of Full-Stack WP Developer. House standards and code templates for real WordPress plugins (not shortcode snippets) - folder anatomy, activation/uninstall lifecycle, custom post types and tables, admin UI tiers, front-end output on the Atomic Framework, REST and cron, i18n, distribution, and the Tier 3 React admin stack - plus a scaffold script. Also the base structure for add-ons. Invoked by fswp-developer after an approved PRD; consult directly for a specific plugin build pattern.

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

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

FSWP Plugin Developer

Foundational (always applied): fswp-developer/references/lean-coding.md (write less, reuse first), fswp-developer/references/coding-standards.md (coding standards, docs, i18n, accessibility), and fswp-security-engineer (input, output, authorization).

Executes an approved PRD (fswp-architect). Prefix, distribution target, feature surface, and JS tier are already decided; do not re-ask. For each step, load the domain skill for the general procedure and this skill's reference for house depth, templates, and stricter rules. Precedence: fswp-developer/references/precedence.md.

For changes to an existing plugin, use fswp-maintainer instead; it calls back here for structure patterns only.

Layers

1  BOOTSTRAP   plugin-slug.php, uninstall.php, includes/class-plugin.php (no business logic)
2  LIFECYCLE   Activator / Deactivator (activation hook, dbDelta, upgrade check)
3  DOMAIN      CPTs, tables, REST routes, cron: only what the PRD lists
4a ADMIN UI    native wp-admin by default; @wordpress/components for one React screen;
               React SPA + Tailwind + TanStack Query + Zustand only for app-like admin
4b PUBLIC UI   Atomic Framework (user-supplied), vanilla JS by default, Alpine opt-in

Admin never uses Atomic Framework or Alpine classes. Never scaffold unused feature classes.

Workflow

StepDoHouse referenceDomain skill
1 ScaffoldDerive slug, prefix, class names, text domain; run scripts/scaffold_plugin.py --help first. Pass --plugin-uri and --author-uri only if real (the line is dropped otherwise, never a placeholder domain). Run fswp-qa-engineer/scripts/run_gate.sh <dir> <min-php> --fix once right after scaffolding: templates carry {{...}} placeholders that the formatter cannot safely reflow before substitution.architecture.mdnone
2 Bootstrap + lifecycleBootstrap declares the header, autoload, and hands off to the main classarchitecture.mdnone
3 SecurityFull baseline on every file, every plugin sizefswp-security-engineerfswp-security-engineer
4 DomainCPTs, tables (dbDelta, schema versions), REST, crondata-cpt.md, rest-cron.mdfswp-api-developer; fswp-performance-engineer when the PRD needs it
5 Blocks (if in PRD)Custom blocks, patterns, Interactivitynonefswp-block-developer
6 Admin UISettings API, WP_List_Table, Dashicons; escalate only per checklistadmin-ui.md, modern-app-stack.mdnone
7 Public outputAsk the user for the current Atomic Framework files first; conditional enqueue inside the callbackfrontend-output.mdnone
8 i18n + distributionEvery PHP and JS string; readme; license; versioningi18n-distribution.mdfswp-release-manager for WordPress.org

Stop at the end of step 8 and hand to fswp-qa-engineer.

Add-on structure

When fswp-maintainer runs in add-on mode it reuses steps 1-3 and 8 here. The extra add-on rules (host detection, Requires Plugins, load order, graceful absence) live in fswp-maintainer.

Standards (every build, every iteration)

references/standards.md governs versioning/changelog discipline, the technology-stack decision, required project metadata (never invent a missing value), per-feature documentation in docs/, code-quality bar, and the minimal-code discipline (decide-before-you-write order, root-cause fixes, shortcut: markers). Read it before the first build and before any iteration on an existing plugin — it is not a one-time setup step.

Security posture

Never scaled down for small plugins: capability checks on every privileged action, nonces on every state change, sanitize input and escape output, $wpdb->prepare() on every query, a real permission_callback on every REST route, safe lifecycle, no plaintext secrets. Full rules: fswp-security-engineer.

Alpine tier

Never inferred. Selected only by the 5-point checklist in references/frontend-output.md, and only after the user explicitly confirms having seen which check triggered it and what the vanilla alternative looks like.

Atomic Framework (user-supplied, not bundled)

It is a separately maintained product; a bundled copy would drift. Whenever the build includes frontend, ask for the current afw-tokens.css, afw-components.css, afw-foundation-logics.js (plus alpine.min.js, alpine-loader.js, alpine-components.js only if the Alpine tier was confirmed). The scaffold copies them via --foundation-dir and stops with a reminder if it is missing.

Dependencies

Everything except the Atomic Framework (Tier 2 @wordpress/*, Tier 3 stack) is resolved at latest from its official registry at scaffold time, then pinned: commit the lockfile and record resolved versions in the README. Latest-at-scaffold plus a committed lockfile satisfies WordPress.org's reproducible-source rule. Exception: a user-stated compatibility ceiling. Details: references/modern-app-stack.md.

Deliver

Installable {plugin-slug}.zip (plugin folder at the zip root) plus readme.txt and/or private README.md with real install steps, and a short summary: prefix and feature decisions, manual steps still owed (API keys, cron interval, initial settings). Compiled output ships with its source (references/modern-app-stack.md).

Bundled

  • scripts/scaffold_plugin.py: --features cpt,db,rest,cron,admin,frontend (any subset), --js-tier vanilla|alpine, --admin-tier native|react|app, --distribution wporg|private|both, --plugin-uri, --author-uri, --foundation-dir, --zip.
  • assets/templates/: plugin skeleton with {{PREFIX}}, {{Prefix}}, {{prefix}}, {{PLUGIN_NAME}}, {{plugin-slug}} placeholders.

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.

Related Skills