重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
wordpress by sickn33/antigravity-awesome-skills
npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill wordpress全面的 WordPress 开发工作流,涵盖主题开发、插件创建、WooCommerce 集成、性能优化和安全性。此套件编排了用于构建生产就绪的 WordPress 站点和应用程序的技能。
WordPress 7.0(2026年4月9日)引入了重要特性,同时保持向后兼容性:
WP_COLLABORATION_MAX_USERS 配置)sync.providers 过滤器自定义传输wp_ai_client_prompt())/wp-json/abilities/v1/manifest广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
watch() 替换了来自 @preact/signals 的 effectdisableContentOnlyForUnsyncedPatterns 设置在以下情况下使用此工作流:
app-builder - 项目脚手架environment-setup-guide - 开发环境// wp-config.php - 协作设置
define('WP_COLLABORATION_MAX_USERS', 5);
// AI 连接器通过安装提供程序插件启用
// (例如,OpenAI、Anthropic Claude 或 Google Gemini 连接器)
// 无需常量 - 通过管理后台的设置 > 连接器进行配置
Use @app-builder to scaffold a new WordPress project with modern tooling
frontend-developer - 组件开发frontend-design - UI 实现tailwind-patterns - 样式web-performance-optimization - 性能theme-name/
├── style.css
├── functions.php
├── index.php
├── header.php
├── footer.php
├── sidebar.php
├── single.php
├── page.php
├── archive.php
├── search.php
├── 404.php
├── template-parts/
├── inc/
├── assets/
│ ├── css/
│ ├── js/
│ └── images/
└── languages/
Use @frontend-developer to create a custom WordPress theme with React components
Use @tailwind-patterns to style WordPress theme with modern CSS
backend-dev-guidelines - 后端标准api-design-principles - API 设计auth-implementation-patterns - 身份验证show_in_rest => true 注册文章元数据wp_ai_client_prompt() 实现 AI 功能register_post_meta('post', 'custom_field', [
'type' => 'string',
'single' => true,
'show_in_rest' => true, // RTC 必需
'sanitize_callback' => 'sanitize_text_field',
]);
// Using WordPress 7.0 AI Connector
// Note: Requires an AI provider plugin (OpenAI, Claude, or Gemini) to be installed and configured
// Basic text generation
$response = wp_ai_client_prompt('Summarize this content.')
->generate_text();
// With temperature for deterministic output
$response = wp_ai_client_prompt('Summarize this content.')
->using_temperature(0.2)
->generate_text();
// With model preference (tries first available in list)
$response = wp_ai_client_prompt('Summarize this content.')
->using_model_preference('gpt-4', 'claude-3-opus', 'gemini-2-pro')
->generate_text();
// For JSON structured output
$schema = [
'type' => 'object',
'properties' => [
'summary' => ['type' => 'string'],
'keywords' => ['type' => 'array', 'items' => ['type' => 'string']]
],
'required' => ['summary']
];
$response = wp_ai_client_prompt('Analyze this content and return JSON.')
->using_system_instruction('You are a content analyzer.')
->as_json_response($schema)
->generate_text();
plugin-name/
├── plugin-name.php
├── includes/
│ ├── class-plugin-activator.php
│ ├── class-plugin-deactivator.php
│ ├── class-plugin-loader.php
│ └── class-plugin.php
├── admin/
│ ├── class-plugin-admin.php
│ ├── css/
│ └── js/
├── public/
│ ├── class-plugin-public.php
│ ├── css/
│ └── js/
└── languages/
Use @backend-dev-guidelines to create a WordPress plugin with proper architecture
payment-integration - 支付处理stripe-integration - Stripe 支付billing-automation - 计费工作流Use @payment-integration to set up WooCommerce with Stripe
Use @billing-automation to create subscription products in WooCommerce
web-performance-optimization - 性能优化database-optimizer - 数据库优化Use @web-performance-optimization to audit and improve WordPress performance
security-auditor - 安全审计wordpress-penetration-testing - WordPress 安全测试sast-configuration - 静态分析Use @wordpress-penetration-testing to audit WordPress security
Use @security-auditor to perform comprehensive security review
test-automator - 测试自动化playwright-skill - E2E 测试webapp-testing - Web 应用测试Use @playwright-skill to create E2E tests for WordPress site
deployment-engineer - 部署cicd-automation-workflow-automate - CI/CDgithub-actions-templates - GitHub ActionsUse @deployment-engineer to set up WordPress deployment pipeline
register_post_type('book', [
'labels' => [...],
'public' => true,
'has_archive' => true,
'supports' => ['title', 'editor', 'thumbnail', 'excerpt'],
'menu_icon' => 'dashicons-book',
'show_in_rest' => true, // 为 RTC 启用
]);
// 为协作注册具有 REST API 的元数据
register_post_meta('book', 'isbn', [
'type' => 'string',
'single' => true,
'show_in_rest' => true,
'sanitize_callback' => 'sanitize_text_field',
]);
add_action('rest_api_init', function() {
register_rest_route('myplugin/v1', '/books', [
'methods' => 'GET',
'callback' => 'get_books',
'permission_callback' => '__return_true',
]);
});
// 使用 AI 自动生成文章摘要
add_action('save_post', function($post_id, $post) {
if (wp_is_post_autosave($post_id) || wp_is_post_revision($post_id)) {
return;
}
// 如果摘要已存在则跳过
if (!empty($post->post_excerpt)) {
return;
}
$content = strip_tags($post->post_content);
if (empty($content)) {
return;
}
// 检查 AI 客户端是否可用
if (!function_exists('wp_ai_client_prompt')) {
return;
}
// 使用输入构建提示
$result = wp_ai_client_prompt(
'Create a brief 2-sentence summary of this content: ' . substr($content, 0, 1000)
);
if (is_wp_error($result)) {
return; // 静默失败 - 不阻止文章保存
}
// 使用 temperature 以获得一致的输出
$result->using_temperature(0.3);
$summary = $result->generate_text();
if ($summary && !is_wp_error($summary)) {
wp_update_post([
'ID' => $post_id,
'post_excerpt' => sanitize_textarea_field($summary)
]);
}
}, 10, 2);
// 完全在 PHP 中注册区块
register_block_type('my-plugin/hello-world', [
'render_callback' => function($attributes, $content) {
return '<p class="hello-world">Hello, World!</p>';
},
'attributes' => [
'message' => ['type' => 'string', 'default' => 'Hello!']
],
]);
// 在正确的钩子上注册能力类别
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'),
]);
});
// 在正确的钩子上注册能力
add_action('wp_abilities_api_init', function() {
wp_register_ability('my-plugin/generate-summary', [
'label' => __('Generate Post Summary', 'my-plugin'),
'description' => __('Creates an AI-powered summary of a post', 'my-plugin'),
'category' => 'content-creation',
'input_schema' => [
'type' => 'object',
'properties' => [
'post_id' => ['type' => 'integer', 'description' => 'The post ID to summarize']
],
'required' => ['post_id']
],
'output_schema' => [
'type' => 'object',
'properties' => [
'summary' => ['type' => 'string', 'description' => 'The generated summary']
]
],
'execute_callback' => 'my_plugin_generate_summary_handler',
'permission_callback' => function() {
return current_user_can('edit_posts');
}
]);
});
// 能力的处理函数
function my_plugin_generate_summary_handler($input) {
$post_id = isset($input['post_id']) ? absint($input['post_id']) : 0;
$post = get_post($post_id);
if (!$post) {
return new WP_Error('invalid_post', 'Post not found');
}
$content = strip_tags($post->post_content);
if (empty($content)) {
return ['summary' => ''];
}
if (!function_exists('wp_ai_client_prompt')) {
return new WP_Error('ai_unavailable', 'AI client not available');
}
$result = wp_ai_client_prompt('Summarize in 2 sentences: ' . substr($content, 0, 1000))
->using_temperature(0.3)
->generate_text();
if (is_wp_error($result)) {
return $result;
}
return ['summary' => sanitize_textarea_field($result)];
}
add_action('init', function() {
class WC_Product_Custom extends WC_Product {
// 自定义产品实现
}
});
在进入下一阶段之前,请验证:
development - 通用 Web 开发security-audit - 安全测试testing-qa - 测试工作流ecommerce - 电子商务开发(文件结束 - 总计 440 行)
每周安装
58
仓库
GitHub 星标
27.9K
首次出现
2026年2月24日
安全审计
安装于
opencode57
codex54
kimi-cli53
gemini-cli53
amp53
github-copilot53
Comprehensive WordPress development workflow covering theme development, plugin creation, WooCommerce integration, performance optimization, and security. This bundle orchestrates skills for building production-ready WordPress sites and applications.
WordPress 7.0 (April 9, 2026) introduces significant features while maintaining backward compatibility:
WP_COLLABORATION_MAX_USERS)sync.providers filterwp_ai_client_prompt())/wp-json/abilities/v1/manifestwatch() replaces effect from @preact/signalsdisableContentOnlyForUnsyncedPatterns settingUse this workflow when:
app-builder - Project scaffoldingenvironment-setup-guide - Development environment// wp-config.php - Collaboration settings
define('WP_COLLABORATION_MAX_USERS', 5);
// AI Connector is enabled by installing a provider plugin
// (e.g., OpenAI, Anthropic Claude, or Google Gemini connector)
// No constant needed - configure via Settings > Connectors in admin
Use @app-builder to scaffold a new WordPress project with modern tooling
frontend-developer - Component developmentfrontend-design - UI implementationtailwind-patterns - Stylingweb-performance-optimization - Performancetheme-name/
├── style.css
├── functions.php
├── index.php
├── header.php
├── footer.php
├── sidebar.php
├── single.php
├── page.php
├── archive.php
├── search.php
├── 404.php
├── template-parts/
├── inc/
├── assets/
│ ├── css/
│ ├── js/
│ └── images/
└── languages/
Use @frontend-developer to create a custom WordPress theme with React components
Use @tailwind-patterns to style WordPress theme with modern CSS
backend-dev-guidelines - Backend standardsapi-design-principles - API designauth-implementation-patterns - Authenticationshow_in_rest => truewp_ai_client_prompt() for AI featuresregister_post_meta('post', 'custom_field', [
'type' => 'string',
'single' => true,
'show_in_rest' => true, // Required for RTC
'sanitize_callback' => 'sanitize_text_field',
]);
// Using WordPress 7.0 AI Connector
// Note: Requires an AI provider plugin (OpenAI, Claude, or Gemini) to be installed and configured
// Basic text generation
$response = wp_ai_client_prompt('Summarize this content.')
->generate_text();
// With temperature for deterministic output
$response = wp_ai_client_prompt('Summarize this content.')
->using_temperature(0.2)
->generate_text();
// With model preference (tries first available in list)
$response = wp_ai_client_prompt('Summarize this content.')
->using_model_preference('gpt-4', 'claude-3-opus', 'gemini-2-pro')
->generate_text();
// For JSON structured output
$schema = [
'type' => 'object',
'properties' => [
'summary' => ['type' => 'string'],
'keywords' => ['type' => 'array', 'items' => ['type' => 'string']]
],
'required' => ['summary']
];
$response = wp_ai_client_prompt('Analyze this content and return JSON.')
->using_system_instruction('You are a content analyzer.')
->as_json_response($schema)
->generate_text();
plugin-name/
├── plugin-name.php
├── includes/
│ ├── class-plugin-activator.php
│ ├── class-plugin-deactivator.php
│ ├── class-plugin-loader.php
│ └── class-plugin.php
├── admin/
│ ├── class-plugin-admin.php
│ ├── css/
│ └── js/
├── public/
│ ├── class-plugin-public.php
│ ├── css/
│ └── js/
└── languages/
Use @backend-dev-guidelines to create a WordPress plugin with proper architecture
payment-integration - Payment processingstripe-integration - Stripe paymentsbilling-automation - Billing workflowsUse @payment-integration to set up WooCommerce with Stripe
Use @billing-automation to create subscription products in WooCommerce
web-performance-optimization - Performance optimizationdatabase-optimizer - Database optimizationUse @web-performance-optimization to audit and improve WordPress performance
security-auditor - Security auditwordpress-penetration-testing - WordPress security testingsast-configuration - Static analysisUse @wordpress-penetration-testing to audit WordPress security
Use @security-auditor to perform comprehensive security review
test-automator - Test automationplaywright-skill - E2E testingwebapp-testing - Web app testingUse @playwright-skill to create E2E tests for WordPress site
deployment-engineer - Deploymentcicd-automation-workflow-automate - CI/CDgithub-actions-templates - GitHub ActionsUse @deployment-engineer to set up WordPress deployment pipeline
register_post_type('book', [
'labels' => [...],
'public' => true,
'has_archive' => true,
'supports' => ['title', 'editor', 'thumbnail', 'excerpt'],
'menu_icon' => 'dashicons-book',
'show_in_rest' => true, // Enable for RTC
]);
// Register meta with REST API for collaboration
register_post_meta('book', 'isbn', [
'type' => 'string',
'single' => true,
'show_in_rest' => true,
'sanitize_callback' => 'sanitize_text_field',
]);
add_action('rest_api_init', function() {
register_rest_route('myplugin/v1', '/books', [
'methods' => 'GET',
'callback' => 'get_books',
'permission_callback' => '__return_true',
]);
});
// Auto-generate post excerpt with AI
add_action('save_post', function($post_id, $post) {
if (wp_is_post_autosave($post_id) || wp_is_post_revision($post_id)) {
return;
}
// Skip if excerpt already exists
if (!empty($post->post_excerpt)) {
return;
}
$content = strip_tags($post->post_content);
if (empty($content)) {
return;
}
// Check if AI client is available
if (!function_exists('wp_ai_client_prompt')) {
return;
}
// Build prompt with input
$result = wp_ai_client_prompt(
'Create a brief 2-sentence summary of this content: ' . substr($content, 0, 1000)
);
if (is_wp_error($result)) {
return; // Silently fail - don't block post saving
}
// Use temperature for consistent output
$result->using_temperature(0.3);
$summary = $result->generate_text();
if ($summary && !is_wp_error($summary)) {
wp_update_post([
'ID' => $post_id,
'post_excerpt' => sanitize_textarea_field($summary)
]);
}
}, 10, 2);
// Register block entirely in PHP
register_block_type('my-plugin/hello-world', [
'render_callback' => function($attributes, $content) {
return '<p class="hello-world">Hello, World!</p>';
},
'attributes' => [
'message' => ['type' => 'string', 'default' => 'Hello!']
],
]);
// Register ability category on correct 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 correct hook
add_action('wp_abilities_api_init', function() {
wp_register_ability('my-plugin/generate-summary', [
'label' => __('Generate Post Summary', 'my-plugin'),
'description' => __('Creates an AI-powered summary of a post', 'my-plugin'),
'category' => 'content-creation',
'input_schema' => [
'type' => 'object',
'properties' => [
'post_id' => ['type' => 'integer', 'description' => 'The post ID to summarize']
],
'required' => ['post_id']
],
'output_schema' => [
'type' => 'object',
'properties' => [
'summary' => ['type' => 'string', 'description' => 'The generated summary']
]
],
'execute_callback' => 'my_plugin_generate_summary_handler',
'permission_callback' => function() {
return current_user_can('edit_posts');
}
]);
});
// Handler function for the ability
function my_plugin_generate_summary_handler($input) {
$post_id = isset($input['post_id']) ? absint($input['post_id']) : 0;
$post = get_post($post_id);
if (!$post) {
return new WP_Error('invalid_post', 'Post not found');
}
$content = strip_tags($post->post_content);
if (empty($content)) {
return ['summary' => ''];
}
if (!function_exists('wp_ai_client_prompt')) {
return new WP_Error('ai_unavailable', 'AI client not available');
}
$result = wp_ai_client_prompt('Summarize in 2 sentences: ' . substr($content, 0, 1000))
->using_temperature(0.3)
->generate_text();
if (is_wp_error($result)) {
return $result;
}
return ['summary' => sanitize_textarea_field($result)];
}
add_action('init', function() {
class WC_Product_Custom extends WC_Product {
// Custom product implementation
}
});
Before moving to next phase, verify:
development - General web developmentsecurity-audit - Security testingtesting-qa - Testing workflowecommerce - E-commerce development(End of file - total 440 lines)
Weekly Installs
58
Repository
GitHub Stars
27.9K
First Seen
Feb 24, 2026
Security Audits
Gen Agent Trust HubPassSocketWarnSnykWarn
Installed on
opencode57
codex54
kimi-cli53
gemini-cli53
amp53
github-copilot53
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
125,600 周安装