alpha

Gives a coding assistant rules for writing secure, tested, standards-compliant WordPress plugins and themes, with hooks, sanitisation and release checks.
applyTo: 'wp-content/plugins/,wp-content/themes/,/*.php,/.inc,**/.js,/*.jsx,/.ts,**/.tsx,/*.css,/.scss,**/.json'
description: 'Coding, security, and testing rules for WordPress plugins and themes'
Goal: Generate WordPress code that is secure, performant, testable, and compliant with official WordPress practices. Prefer hooks, small functions, dependency injection (where sensible), and clear separation of concerns.
<script>/<style> in PHP templates.<?php
defined('ABSPATH') || exit;
/**
* Plugin Name: Awesome Feature
* Description: Example plugin scaffold.
* Version: 0.1.0
* Author: Example
* License: GPL-2.0-or-later
* Text Domain: awesome-feature
* Domain Path: /languages
*/
===, !==) where appropriate. Be consistent with array syntax and spacing as per WPCS.@wordpress/* packages for block/editor code.<?xml version="1.0"?>
<!-- phpcs.xml -->
<ruleset name="Project WPCS">
<description>WordPress Coding Standards for this project.</description>
<file>./</file>
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>node_modules/*</exclude-pattern>
<rule ref="WordPress"/>
<rule ref="WordPress-Docs"/>
<rule ref="WordPress-Extra"/>
<rule ref="PHPCompatibility"/>
<config name="testVersion" value="7.4-"/>
</ruleset>
composer.json (snippet):
{
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
"wp-coding-standards/wpcs": "^3.0",
"phpcompatibility/php-compatibility": "^9.0"
},
"scripts": {
"lint:php": "phpcs -p",
"fix:php": "phpcbf -p"
}
}
package.json (snippet):
{
"devDependencies": {
"@wordpress/eslint-plugin": "^x.y.z"
},
"scripts": {
"lint:js": "eslint ."
}
}
esc_html(), esc_attr(), esc_url(), wp_kses_post().sanitize_text_field(), sanitize_email(), sanitize_key(), absint(), intval().wp_nonce_field() and verify via check_admin_referer() / wp_verify_nonce().current_user_can( 'manage_options' /* or specific cap */ ).$wpdb->prepare() with placeholders; never concatenate untrusted input.wp_handle_upload()/media_handle_upload().__( 'Text', 'awesome-feature' ), _x(), esc_html__().load_plugin_textdomain(), call it on init..pot in /languages and ensure consistent domain usage. Do not ship development or compiled translation artifacts such as .po, .mo, .l10n.php, or compiled .json files unless a specific WordPress.org requirement calls for them.init/wp_loaded unless necessary.sanitize_callback for each setting.WP_List_Table patterns. For notices, use the admin notices API.register_rest_route(); always set a permission_callback.args schema.WP_REST_Response or arrays/objects that map cleanly to JSON.block.json + register_block_type(); rely on @wordpress/* packages.add_action('wp_enqueue_scripts', function () {
wp_enqueue_style(
'af-frontend',
plugins_url('assets/frontend.css', __FILE__),
[],
'0.1.0'
);
wp_enqueue_script(
'af-frontend',
plugins_url('assets/frontend.js', __FILE__),
[ 'wp-i18n', 'wp-element' ],
'0.1.0',
true
);
});
wp_register_style/script to register first if multiple components depend on the same assets.admin_enqueue_scripts and check screen IDs.PHPUnit and WP_UnitTestCase.self::factory()->post->create() etc.) to set up fixtures.<!-- phpunit.xml.dist (minimal) -->
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="tests/bootstrap.php" colors="true">
<testsuites>
<testsuite name="Plugin Test Suite">
<directory suffix="Test.php">tests/</directory>
</testsuite>
</testsuites>
</phpunit>
// tests/bootstrap.php (minimal sketch)
<?php
$_tests_dir = getenv('WP_TESTS_DIR') ?: '/tmp/wordpress-tests-lib';
require_once $_tests_dir . '/includes/functions.php';
tests_add_filter( 'muplugins_loaded', function () {
require dirname(__DIR__) . '/awesome-feature.php';
} );
require $_tests_dir . '/includes/bootstrap.php';
README.md up to date: install, usage, capabilities, hooks/filters, and test instructions.<!-- markdownlint-disable MD013 -->
wp_, _, __, or generic prefixes such as ai, seo, wc, or woo. Do not use function_exists() or class_exists() guards to hide naming collisions; reserve them for genuinely shared libraries. Migrate renamed option keys so existing installations retain their settings.__FILE__ in prefixed constants; keep the version in the plugin header and expose it through a prefixed constant if needed. Do not use WP_PLUGIN_DIR, WP_CONTENT_DIR, WP_CONTENT_URL, WPMU_PLUGIN_DIR, or hard-coded paths to locate plugin files. Resolve upload storage at runtime with wp_upload_dir().sanitize_file_name( basename( $path ) ), and use WP_Filesystem. Never write to the plugin, theme, core, or another plugin's directory, or to an arbitrary user-supplied path.node_modules, tests, demos, caches, CI metadata, release scripts, and compiled translations with .distignore or the 10up ignore list. Build with wp dist-archive from a clean, preferably --no-dev, dependency tree and inspect the resulting ZIP rather than the working tree.Update URI values that point outside WordPress.org and rely on the directory updater.register_setting() call must specify a sanitize_callback. Use a dedicated callback for arrays and nested values; scalar sanitizers are not sufficient for structured options.readme.txt, make Contributors: a case-sensitive, comma-separated list of real WordPress.org usernames and include the account that owns the plugin slug.<script> or <style> tags for executable or stylesheet content. Enqueue files with the WordPress APIs, attach inline content with wp_add_inline_script() or wp_add_inline_style(), and use admin_enqueue_scripts for admin screens. A non-executing data placeholder must be justified and escaped.esc_url() for URLs, esc_attr() for attributes, esc_html() for text, and wp_kses() or wp_kses_post() for permitted HTML. Do not suppress escaping sniffs without a specific -- justification.readme.txt what service is used, why it is used, what data is sent, when it is sent, and links to its terms and privacy policy. Do not track users without explicit consent, load remote code, or hijack the admin dashboard.Plugin URI, Author URI, and repository, documentation, terms, and privacy URLs in readme.txt are public and resolve successfully. Remove stale or private links.readme.txt accurate and complete: include Stable tag, Requires at least, Requires PHP, Tested up to, License, License URI, clear setup and usage steps, and the current plugin slug in installation paths.grep -rnE --include='*.php' --exclude-dir=vendor --exclude-dir=node_modules "function |^[[:space:]]*((abstract|final|readonly)[[:space:]]+)*(class|trait|interface|enum)[[:space:]]|namespace |define\(|const |^[[:space:]]*global[[:space:]]" .
grep -rnE --include='*.php' --exclude-dir=vendor --exclude-dir=node_modules "(add|get|update|delete)_option\(|(add|get|update|delete)_site_option\(|(get|update|delete)_network_option\(|(set|get|delete)_transient\(|(set|get|delete)_site_transient\(" .
grep -rnE --include='*.php' --exclude-dir=vendor --exclude-dir=node_modules "register_meta\(|(add|get|update|delete)_(post|user|term|comment)_meta\(|add_shortcode\(|wp_schedule_(single_)?event\(|wp_next_scheduled\(|wp_clear_scheduled_hook\(" .
grep -rnE --include='*.php' --exclude-dir=vendor --exclude-dir=node_modules "do_action\(|apply_filters\(|add_action\(|add_filter\(|wp_(register|enqueue)_(script|style)\(|wp_localize_script\(|wp_set_script_translations\(|wp_add_inline_(script|style)\(" .
grep -rnE --include='*.php' --exclude-dir=vendor --exclude-dir=node_modules "WP_PLUGIN_DIR|WP_CONTENT_DIR|WP_CONTENT_URL|WPMU_PLUGIN_DIR|ABSPATH|__DIR__" .
grep -rnE --include='*.php' --exclude-dir=vendor --exclude-dir=node_modules "file_put_contents|fopen|fwrite|fputs|mkdir|unlink|rename\(|copy\(" .
grep -rniE --exclude-dir=vendor --exclude-dir=node_modules "plugin-?update-?checker|PucFactory|pre_set_site_transient_update_plugins|puc_" .
grep -rnE --include='*.php' --exclude-dir=vendor --exclude-dir=node_modules "wp_remote_|curl_|file_get_contents\('https?://|https?://" .
grep -rnE --include='*.php' --exclude-dir=vendor --exclude-dir=node_modules "<script|<style" .
grep -rn --exclude-dir=vendor --exclude-dir=node_modules "load_plugin_textdomain\|phpcs:ignore\|phpcs:disable" .
grep -rnE "^(Stable tag|Requires at least|Requires PHP|Tested up to|License|License URI|Contributors):" readme.txt
find . -type f \( -name '*.po' -o -name '*.mo' -o -name '*.l10n.php' -o -name 'phpunit.xml*' -o -name '*.phpunit*' -o -name '*.result.cache' \)
./vendor/bin/phpcs --standard=phpcs.xml .
wp plugin check my-plugin
wp dist-archive . my-plugin.zip
unzip -l my-plugin.zip
These commands are a starting point, not a complete prefix check: they surface the declaration and registration/access call sites (options, site/network options, transients, metadata, shortcodes, cron events, hooks, asset handles, and localized script objects), but you must still read each matched line to confirm the actual option keys, hook/shortcode/cron string names, script/style handles, and localized JavaScript object names are prefixed. Review every match, do not treat local silence as approval, and inspect the actual archive for unwanted files and stale bundled dependencies.
<!-- markdownlint-enable MD013 -->
© GitHub, Inc. · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com


Reverse-engineers a website section by section, writes component specs, and hands them to parallel builder agents in git worktrees to rebuild it.
agent-skill, orchestrator, parallel-agents, multi-agent, plan-then-execute, web-development, frontend, codebase-analysis, scaffolding, css, html, nextjs, typescript, git, mcp, claude-code, for-developers, for-designers, long-form, advanced, technical-spec, task-decomposition, structured-output, design-systems, ui-ux, tool-use, checklist, report, vibe-coding

Italian Terrace Cafe Candid Portrait
Generates a photorealistic candid shot of a woman in a white corset dress laughing at a sunny hotel terrace cafe, written as detailed JSON.
image-prompt, json-prompt, structured-output, photorealistic, portrait, woman, candid, fashion, cottagecore, natural-light, golden-hour, bokeh, summer, travel, cityscape, mountains, medium-shot, vibrant-colors, for-photographers, nano-banana, fashion-shoot, luxury

Night Street Photo With Leashed Cat
Generates a flash-lit night street photo of a blonde woman in a retro track jacket walking a hissing tabby cat on a leash.
image-prompt, json-prompt, nano-banana, structured-output, portrait, woman, animals, pet-portrait, night-scene, street-photography, candid, editorial, fashion, dramatic-lighting, photorealistic, vertical-format, medium-shot, graffiti, for-photographers, for-content-creators
Loading reviews…
Loading comments…