plugin-scaffold
Skill1 starsChanged 4 months agoMITView on GitHub
Scaffold a WordPress plugin. Use this when the user asks to create a new WordPress plugin, start a plugin from scratch, or generate the plugin header and required files. Produces the main plugin file with a valid header, uninstall.php, an includes directory, and readme.txt.
- Deletes or force-pushes
1 other project uses a version of this.
Adopted by
Most recently taken up by
- brianshepardpss/plugin-creator-plugintheir own version, first seen Oct 2, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- brianshepardpss/plugin-creator-plugin★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- db-migrationSkill
- gutenberg-blockSkill
- security-auditSkill
- theme-initSkill
- wp-debugSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 5 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Create a minimal, production-ready plugin skeleton with a valid header, an ABSPATH guard, a class-based bootstrap, an uninstall hook, and a …
- Very specific: line 16
If $ARGUMENTS is empty, ask for a slug before writing any files.
- Distinctive: line 21
Use Glob to check that the target directory does not already contain a file with the plugin header.
- Distinctive: line 23
Write the five files listed in the Output section.
- Very specific: line 24
After writing, print the activation command (wp plugin activate <slug>) and the admin alternative (Plugins > Installed Plugins > Activate).
- Distinctive: line 36
Write exactly these files relative to the plugin root.
- Very specific: line 206
Do not leave an empty index.php as a security placeholder.
- Very specific: line 207
Do not delete user data in the deactivation hook.
- Very specific: line 208
Do not start at version 1.0.0.
- Distinctive: line 209
Do not hardcode the slug in more than one place.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Scaffold a WordPress plugin
Create a minimal, production-ready plugin skeleton with a valid header, an ABSPATH guard, a class-based bootstrap, an uninstall hook, and a readme.txt that wordpress.org accepts.
Inputs
$ARGUMENTS is the plugin slug. It must be lowercase, use hyphens, and match the final plugin directory name. Example: acme-forms.
If $ARGUMENTS is empty, ask for a slug before writing any files.
Workflow
- Confirm the target directory is
wp-content/plugins/<slug>/. If the current working directory is not a WordPress install, ask the user where to scaffold the plugin. - Use Glob to check that the target directory does not already contain a file with the plugin header. If it does, stop and ask the user whether to overwrite.
- Announce each file you are about to write.
- Write the five files listed in the Output section.
- After writing, print the activation command (
wp plugin activate <slug>) and the admin alternative (Plugins > Installed Plugins > Activate).
Naming convention
Given slug acme-forms:
- Directory:
acme-forms - Main file:
acme-forms.php - Text domain:
acme-forms - Prefix for functions, classes, constants:
acme_forms_orAcme_Forms_
Output
Write exactly these files relative to the plugin root.
acme-forms.php
<?php
/**
* Plugin Name: Acme Forms
* Plugin URI: https://example.com/acme-forms
* Description: Short description of what the plugin does.
* Version: 0.1.0
* Requires at least: 6.6
* Requires PHP: 8.1
* Author: Your Name
* Author URI: https://example.com
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: acme-forms
* Domain Path: /languages
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
define( 'ACME_FORMS_VERSION', '0.1.0' );
define( 'ACME_FORMS_PATH', plugin_dir_path( __FILE__ ) );
define( 'ACME_FORMS_URL', plugin_dir_url( __FILE__ ) );
require_once ACME_FORMS_PATH . 'includes/class-acme-forms.php';
register_activation_hook( __FILE__, array( 'Acme_Forms', 'activate' ) );
register_deactivation_hook( __FILE__, array( 'Acme_Forms', 'deactivate' ) );
add_action( 'plugins_loaded', array( 'Acme_Forms', 'instance' ) );includes/class-acme-forms.php
<?php
/**
* Main plugin class.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class Acme_Forms {
private static $instance = null;
public static function instance() {
if ( null === self::$instance ) {
self::$instance = new self();
}
return self::$instance;
}
private function __construct() {
add_action( 'init', array( $this, 'load_textdomain' ) );
}
public function load_textdomain() {
load_plugin_textdomain( 'acme-forms', false, basename( ACME_FORMS_PATH ) . '/languages' );
}
public static function activate() {
// Runs once on activation. Flush rewrite rules if the plugin adds custom post types.
flush_rewrite_rules();
}
public static function deactivate() {
// Runs on deactivation. Do not delete data here.
flush_rewrite_rules();
}
}uninstall.php
<?php
/**
* Runs only when the user deletes the plugin from the admin.
* Delete options, custom tables, and scheduled events here.
*/
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
exit;
}
delete_option( 'acme_forms_settings' );
delete_option( 'acme_forms_version' );
// Example: drop a custom table if the plugin created one.
// global $wpdb;
// $table = $wpdb->prefix . 'acme_forms_submissions';
// $wpdb->query( "DROP TABLE IF EXISTS {$table}" );
// Example: clear scheduled cron.
// wp_clear_scheduled_hook( 'acme_forms_daily_cleanup' );readme.txt
=== Acme Forms ===
Contributors: yourname
Tags: forms, contact
Requires at least: 6.6
Requires PHP: 8.1
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
One-line description of the plugin.
== Description ==
A longer description of the plugin. Explain the problem it solves and the main features.
== Installation ==
1. Upload the plugin folder to `/wp-content/plugins/`.
2. Activate the plugin through the Plugins menu in WordPress.
== Frequently Asked Questions ==
= Does it work with classic themes? =
Yes.
== Changelog ==
= 0.1.0 =
* Initial release..gitignore
vendor/
node_modules/
*.log
.DS_Store
.vscode/
.idea/Example
User runs /wordpress-devkit:plugin-scaffold acme-forms.
The skill writes these files:
wp-content/plugins/acme-forms/
acme-forms.php
uninstall.php
readme.txt
.gitignore
includes/class-acme-forms.phpThe user then activates with wp plugin activate acme-forms.
Do not
- Do not leave an empty
index.phpas a security placeholder. Use theABSPATHguard at the top of every PHP file instead. - Do not delete user data in the deactivation hook. Deletion belongs in
uninstall.php. - Do not start at version
1.0.0. Start at0.1.0and move up with real releases. - Do not hardcode the slug in more than one place. Derive constants and text domains from a single prefix.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

