重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
wordpress-plugin-development by sickn33/antigravity-awesome-skills
npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill wordpress-plugin-development专门用于创建 WordPress 插件的工作流,包含适当的架构、钩子系统、管理界面、REST API 端点和安全实践。现已包含适用于现代插件开发的 WordPress 7.0 功能。
实时协作兼容性
sync.providers 过滤器自定义传输show_in_rest => true 注册文章元数据AI 连接器集成
wp_ai_client_prompt() 实现供应商无关的 AI能力 API
/wp-json/abilities/v1/manifest广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
DataViews 和 DataForm
纯 PHP 区块
在以下情况下使用此工作流:
app-builder - 项目脚手架backend-dev-guidelines - 后端模式/*
Plugin Name: My Plugin
Plugin URI: https://example.com/my-plugin
Description: A WordPress 7.0 compatible plugin with AI and RTC support
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Author: Developer Name
License: GPL2+
*/
Use @app-builder to scaffold a new WordPress plugin
backend-dev-guidelines - 架构模式Use @backend-dev-guidelines to design plugin architecture
wordpress-penetration-testing - WordPress 模式Use @wordpress-penetration-testing to understand WordPress hooks
frontend-developer - 管理界面 UIimport { DataViews } from '@wordpress/dataviews';
const MyPluginDataView = () => {
const data = [/* records */];
const fields = [
{ id: 'title', label: 'Title', sortable: true },
{ id: 'status', label: 'Status', filterBy: true }
];
const view = {
type: 'table',
perPage: 10,
sort: { field: 'title', direction: 'asc' }
};
return (
<DataViews
data={data}
fields={fields}
view={view}
onChangeView={handleViewChange}
/>
);
};
Use @frontend-developer to create WordPress admin interface
database-design - 数据库设计postgresql - 数据库模式// Register meta for Real-Time Collaboration
register_post_meta('post', 'my_custom_field', [
'type' => 'string',
'single' => true,
'show_in_rest' => true, // Required for RTC
'sanitize_callback' => 'sanitize_text_field',
]);
// For WP 7.0, also consider:
register_term_meta('category', 'my_term_field', [
'type' => 'string',
'show_in_rest' => true,
]);
Use @database-design to design plugin database schema
api-design-principles - API 设计api-patterns - API 模式Use @api-design-principles to create WordPress REST API endpoints
wordpress-penetration-testing - WordPress 安全security-scanning-security-sast - 安全扫描Use @wordpress-penetration-testing to audit plugin security
api-design-principles - AI 集成backend-dev-guidelines - 区块开发// Using WordPress 7.0 AI Connector
add_action('save_post', 'my_plugin_generate_ai_summary', 10, 2);
function my_plugin_generate_ai_summary($post_id, $post) {
if (wp_is_post_autosave($post_id) || wp_is_post_revision($post_id)) {
return;
}
// Check if AI client is available
if (!function_exists('wp_ai_client_prompt')) {
return;
}
$content = strip_tags($post->post_content);
if (empty($content)) {
return;
}
// Build prompt - direct string concatenation for input
$result = wp_ai_client_prompt(
'Create a compelling 2-sentence summary for social media: ' . substr($content, 0, 1000)
);
if (is_wp_error($result)) {
return;
}
// Set temperature for consistent output
$result->using_temperature(0.3);
$summary = $result->generate_text();
if ($summary && !is_wp_error($summary)) {
update_post_meta($post_id, '_ai_summary', sanitize_textarea_field($summary));
}
}
// Register ability categories on their own hook
add_action('wp_abilities_api_categories_init', function() {
wp_register_ability_category('content-creation', [
'label' => __('Content Creation', 'my-plugin'),
'description' => __('Abilities for generating and managing content', 'my-plugin'),
]);
});
// Register abilities on their own hook
add_action('wp_abilities_api_init', function() {
wp_register_ability('my-plugin/generate-summary', [
'label' => __('Generate Summary', 'my-plugin'),
'description' => __('Creates an AI-powered summary of content', 'my-plugin'),
'category' => 'content-creation',
'input_schema' => [
'type' => 'object',
'properties' => [
'content' => ['type' => 'string'],
'length' => ['type' => 'integer', 'default' => 2]
],
'required' => ['content']
],
'output_schema' => [
'type' => 'object',
'properties' => [
'summary' => ['type' => 'string']
]
],
'execute_callback' => 'my_plugin_generate_summary_cb',
'permission_callback' => function() {
return current_user_can('edit_posts');
}
]);
});
// Handler callback
function my_plugin_generate_summary_cb($input) {
$content = isset($input['content']) ? $input['content'] : '';
$length = isset($input['length']) ? absint($input['length']) : 2;
if (empty($content)) {
return new WP_Error('empty_content', 'No content provided');
}
if (!function_exists('wp_ai_client_prompt')) {
return new WP_Error('ai_unavailable', 'AI not available');
}
$prompt = sprintf('Create a %d-sentence summary of: %s', $length, substr($content, 0, 2000));
$result = wp_ai_client_prompt($prompt)
->using_temperature(0.3)
->generate_text();
if (is_wp_error($result)) {
return $result;
}
return ['summary' => sanitize_textarea_field($result)];
}
// Register block entirely in PHP (WordPress 7.0)
// Note: For full PHP-only blocks, use block.json with PHP render_callback
// First, create a block.json file in build/ or includes/blocks/
// Then register in PHP:
// Simple PHP-only block registration (WordPress 7.0+)
if (function_exists('register_block_type')) {
register_block_type('my-plugin/featured-post', [
'render_callback' => function($attributes, $content, $block) {
$post_id = isset($attributes['postId']) ? absint($attributes['postId']) : 0;
if (!$post_id) {
$post_id = get_the_ID();
}
$post = get_post($post_id);
if (!$post) {
return '';
}
$title = esc_html($post->post_title);
$excerpt = esc_html(get_the_excerpt($post));
return sprintf(
'<div class="featured-post"><h2>%s</h2><p>%s</p></div>',
$title,
$excerpt
);
},
'attributes' => [
'postId' => ['type' => 'integer', 'default' => 0],
'showExcerpt' => ['type' => 'boolean', 'default' => true]
],
]);
}
// Disable RTC for specific post types
import { addFilter } from '@wordpress/hooks';
addFilter(
'sync.providers',
'my-plugin/disable-collab',
() => []
);
test-automator - 测试自动化php-pro - PHP 测试Use @test-automator to set up plugin testing
plugin-name/
├── plugin-name.php
├── includes/
│ ├── class-plugin.php
│ ├── class-loader.php
│ ├── class-activator.php
│ └── class-deactivator.php
├── admin/
│ ├── class-plugin-admin.php
│ ├── css/
│ └── js/
├── public/
│ ├── class-plugin-public.php
│ ├── css/
│ └── js/
├── blocks/ # PHP-only blocks (WP 7.0)
├── abilities/ # Abilities API
├── ai/ # AI Connector integration
├── languages/
└── vendor/
show_in_rest => truewatch() 而非 effectwordpress - WordPress 开发wordpress-theme-development - 主题开发wordpress-woocommerce - WooCommerce每周安装量
58
代码仓库
GitHub 星标数
27.9K
首次出现
2026年2月24日
安全审计
安装于
opencode57
codex54
kimi-cli53
gemini-cli53
amp53
github-copilot53
Specialized workflow for creating WordPress plugins with proper architecture, hooks system, admin interfaces, REST API endpoints, and security practices. Now includes WordPress 7.0 features for modern plugin development.
Real-Time Collaboration (RTC) Compatibility
sync.providers filtershow_in_rest => trueAI Connector Integration
wp_ai_client_prompt()Abilities API
/wp-json/abilities/v1/manifestDataViews & DataForm
PHP-Only Blocks
Use this workflow when:
app-builder - Project scaffoldingbackend-dev-guidelines - Backend patterns/*
Plugin Name: My Plugin
Plugin URI: https://example.com/my-plugin
Description: A WordPress 7.0 compatible plugin with AI and RTC support
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Author: Developer Name
License: GPL2+
*/
Use @app-builder to scaffold a new WordPress plugin
backend-dev-guidelines - Architecture patternsUse @backend-dev-guidelines to design plugin architecture
wordpress-penetration-testing - WordPress patternsUse @wordpress-penetration-testing to understand WordPress hooks
frontend-developer - Admin UIimport { DataViews } from '@wordpress/dataviews';
const MyPluginDataView = () => {
const data = [/* records */];
const fields = [
{ id: 'title', label: 'Title', sortable: true },
{ id: 'status', label: 'Status', filterBy: true }
];
const view = {
type: 'table',
perPage: 10,
sort: { field: 'title', direction: 'asc' }
};
return (
<DataViews
data={data}
fields={fields}
view={view}
onChangeView={handleViewChange}
/>
);
};
Use @frontend-developer to create WordPress admin interface
database-design - Database designpostgresql - Database patterns// Register meta for Real-Time Collaboration
register_post_meta('post', 'my_custom_field', [
'type' => 'string',
'single' => true,
'show_in_rest' => true, // Required for RTC
'sanitize_callback' => 'sanitize_text_field',
]);
// For WP 7.0, also consider:
register_term_meta('category', 'my_term_field', [
'type' => 'string',
'show_in_rest' => true,
]);
Use @database-design to design plugin database schema
api-design-principles - API designapi-patterns - API patternsUse @api-design-principles to create WordPress REST API endpoints
wordpress-penetration-testing - WordPress securitysecurity-scanning-security-sast - Security scanningUse @wordpress-penetration-testing to audit plugin security
api-design-principles - AI integrationbackend-dev-guidelines - Block development// Using WordPress 7.0 AI Connector
add_action('save_post', 'my_plugin_generate_ai_summary', 10, 2);
function my_plugin_generate_ai_summary($post_id, $post) {
if (wp_is_post_autosave($post_id) || wp_is_post_revision($post_id)) {
return;
}
// Check if AI client is available
if (!function_exists('wp_ai_client_prompt')) {
return;
}
$content = strip_tags($post->post_content);
if (empty($content)) {
return;
}
// Build prompt - direct string concatenation for input
$result = wp_ai_client_prompt(
'Create a compelling 2-sentence summary for social media: ' . substr($content, 0, 1000)
);
if (is_wp_error($result)) {
return;
}
// Set temperature for consistent output
$result->using_temperature(0.3);
$summary = $result->generate_text();
if ($summary && !is_wp_error($summary)) {
update_post_meta($post_id, '_ai_summary', sanitize_textarea_field($summary));
}
}
// Register ability categories on their own hook
add_action('wp_abilities_api_categories_init', function() {
wp_register_ability_category('content-creation', [
'label' => __('Content Creation', 'my-plugin'),
'description' => __('Abilities for generating and managing content', 'my-plugin'),
]);
});
// Register abilities on their own hook
add_action('wp_abilities_api_init', function() {
wp_register_ability('my-plugin/generate-summary', [
'label' => __('Generate Summary', 'my-plugin'),
'description' => __('Creates an AI-powered summary of content', 'my-plugin'),
'category' => 'content-creation',
'input_schema' => [
'type' => 'object',
'properties' => [
'content' => ['type' => 'string'],
'length' => ['type' => 'integer', 'default' => 2]
],
'required' => ['content']
],
'output_schema' => [
'type' => 'object',
'properties' => [
'summary' => ['type' => 'string']
]
],
'execute_callback' => 'my_plugin_generate_summary_cb',
'permission_callback' => function() {
return current_user_can('edit_posts');
}
]);
});
// Handler callback
function my_plugin_generate_summary_cb($input) {
$content = isset($input['content']) ? $input['content'] : '';
$length = isset($input['length']) ? absint($input['length']) : 2;
if (empty($content)) {
return new WP_Error('empty_content', 'No content provided');
}
if (!function_exists('wp_ai_client_prompt')) {
return new WP_Error('ai_unavailable', 'AI not available');
}
$prompt = sprintf('Create a %d-sentence summary of: %s', $length, substr($content, 0, 2000));
$result = wp_ai_client_prompt($prompt)
->using_temperature(0.3)
->generate_text();
if (is_wp_error($result)) {
return $result;
}
return ['summary' => sanitize_textarea_field($result)];
}
// Register block entirely in PHP (WordPress 7.0)
// Note: For full PHP-only blocks, use block.json with PHP render_callback
// First, create a block.json file in build/ or includes/blocks/
// Then register in PHP:
// Simple PHP-only block registration (WordPress 7.0+)
if (function_exists('register_block_type')) {
register_block_type('my-plugin/featured-post', [
'render_callback' => function($attributes, $content, $block) {
$post_id = isset($attributes['postId']) ? absint($attributes['postId']) : 0;
if (!$post_id) {
$post_id = get_the_ID();
}
$post = get_post($post_id);
if (!$post) {
return '';
}
$title = esc_html($post->post_title);
$excerpt = esc_html(get_the_excerpt($post));
return sprintf(
'<div class="featured-post"><h2>%s</h2><p>%s</p></div>',
$title,
$excerpt
);
},
'attributes' => [
'postId' => ['type' => 'integer', 'default' => 0],
'showExcerpt' => ['type' => 'boolean', 'default' => true]
],
]);
}
// Disable RTC for specific post types
import { addFilter } from '@wordpress/hooks';
addFilter(
'sync.providers',
'my-plugin/disable-collab',
() => []
);
test-automator - Test automationphp-pro - PHP testingUse @test-automator to set up plugin testing
plugin-name/
├── plugin-name.php
├── includes/
│ ├── class-plugin.php
│ ├── class-loader.php
│ ├── class-activator.php
│ └── class-deactivator.php
├── admin/
│ ├── class-plugin-admin.php
│ ├── css/
│ └── js/
├── public/
│ ├── class-plugin-public.php
│ ├── css/
│ └── js/
├── blocks/ # PHP-only blocks (WP 7.0)
├── abilities/ # Abilities API
├── ai/ # AI Connector integration
├── languages/
└── vendor/
show_in_rest => true for RTCwatch() not effectwordpress - WordPress developmentwordpress-theme-development - Theme developmentwordpress-woocommerce - WooCommerceWeekly Installs
58
Repository
GitHub Stars
27.9K
First Seen
Feb 24, 2026
Security Audits
Gen Agent Trust HubPassSocketWarnSnykPass
Installed on
opencode57
codex54
kimi-cli53
gemini-cli53
amp53
github-copilot53
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
125,600 周安装
Terraform工程师:基础设施即代码(IaC)专家,自动化云资源供应与管理
112 周安装
AI工程师技能指南:大语言模型集成、RAG架构、向量数据库与生产部署全流程
114 周安装
Google Drive自动化指南:通过Rube MCP实现文件上传、搜索与权限管理
112 周安装
Brave Search Suggest API:快速集成搜索建议与自动补全功能,提升用户体验
116 周安装
Umbraco 后台扩展开发指南:自定义管理区域、数据工具与分层浏览器
116 周安装
Pollinations Enter-Services 部署与管理指南:生产与预发布环境配置
54 周安装