Communitygithub.com

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.

What is fswp-theme-developer?

fswp-theme-developer is a Claude Code agent skill that 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.

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

Ask in your favorite AI

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

Documentation

FSWP Theme 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 theme PRD (fswp-architect). A theme controls presentation. Features that must survive a theme switch (post types, integrations, business logic) belong in a plugin (fswp-plugin-developer); say so instead of hiding them in functions.php.

Decide the type first

TypeChoose whenCore files
Block themeSite Editor editing wanted; new builds by defaultstyle.css (header only), theme.json, templates/index.html, parts/, patterns/, styles/
Classic themeNeeds PHP templates and custom logic per template, or must support old WordPressstyle.css, index.php, functions.php, template files
HybridClassic templates plus theme.json for settings and editor stylesClassic files + theme.json
Child themeAdjust a parent without forking itstyle.css with Template: header, functions.php, overrides only

Default to a block theme for new builds unless the PRD needs otherwise. Block themes need WordPress 5.9 or newer; check the current theme.json schema version and its minimum WordPress version in the docs before pinning Requires at least.

Workflow

  1. Scaffold: python3 scripts/scaffold_theme.py --help, then generate the skeleton (block, classic, or child). Run fswp-qa-engineer/scripts/run_gate.sh <dir> <min-php> --fix once.
  2. Design tokens: define palette, typography, spacing, layout widths, and border/shadow presets in theme.json (block/hybrid) or in CSS custom properties (classic). Use presets in templates and patterns instead of hard-coded values.
  3. Templates: build the hierarchy the PRD needs (front page, home, single, page, archive, search, 404, plus any custom templates). Reuse template parts for header, footer, and repeated sections.
  4. Patterns: register reusable layouts as files in patterns/ (header comment: Title, Slug, Categories, optional Keywords, Viewport Width, Block Types). No remote images.
  5. Style variations: JSON files in styles/ for alternate looks; keep them small overrides of theme.json.
  6. Custom blocks or interactivity the theme really needs: fswp-block-developer. Otherwise prefer core blocks.
  7. Assets: enqueue with wp_enqueue_scripts (classic) or theme.json/add_editor_style (block); bundle fonts locally (fontFace entries) with their licenses; no CDN links.
  8. Security, i18n, accessibility: escape every output, translate every string, meet the accessibility rules (fswp-security-engineer, fswp-developer/references/coding-standards.md, references/theme-i18n-a11y.md). Use named, prefixed functions for hooks (never closures), a prefix of at least four letters, and array() syntax per the coding standards.
  9. Directory readiness if the target is the WordPress.org theme directory: fswp-release-manager (references/theme-requirements.md), then run python3 ../fswp-qa-engineer/scripts/theme_check.py <dir> --directory. Themes may not contain custom post types, blocks, shortcodes, roles, contact methods, or mime types: those belong in a plugin. Theme names may not contain "WordPress", "Theme", or "Twenty".

Stop and hand to fswp-qa-engineer.

Classic theme essentials

add_theme_support() for title-tag and automatic-feed-links (both required by the directory), plus post-thumbnails, html5, responsive-embeds, wp-block-styles, and editor-styles; language_attributes(), body_class(), post_class(), wp_link_pages(), and edit_theme_options for option permissions; register_nav_menus; wp_head(), wp_body_open(), wp_footer() present; get_template_part() for repeated parts; template tags over direct queries; wp_reset_postdata() after secondary loops; content width and image sizes declared.

Child themes

Enqueue the parent stylesheet and the child stylesheet with correct dependencies; override single templates rather than copying the parent; keep the child's version independent of the parent's; do not copy the parent's functions.php.

Deliver

Installable {theme-slug}.zip with the theme folder at the root, readme.txt, screenshot.png (at most 1200x900, 4:3 ratio), license notes for every bundled asset, and a summary of manual steps owed. References: references/block-theme.md, references/theme-i18n-a11y.md.

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.

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.

Related Skills