wordpress-plugin-development
使用 AI 辅助构建 WordPress 插件
创建 WordPress 插件需要理解复杂的架构和安全模式。此技能指导您遵循结构化的工作流程来构建生产就绪的插件。
下载技能 ZIP
在 Claude 中上传
前往 设置 → 功能 → 技能 → 上传技能
开启并开始使用
测试它
正在使用“wordpress-plugin-development”。 创建一个 WordPress 插件,为 'Portfolio' 项目添加自定义文章类型
预期结果:
一个完整的插件,包含主文件、自定义文章类型注册、管理列表列以及项目组合项的 meta box 支持。
正在使用“wordpress-plugin-development”。 添加一个 shortcode,以网格布局显示最近的博客文章
预期结果:
一个 shortcode 处理程序,具有可配置的属性,用于文章数量、布局样式和自定义 CSS 类。
安全审计
安全Static analyzer produced false positives by misinterpreting Markdown backtick code references as shell commands. The SKILL.md file is a documentation-only workflow bundle that references other skills for WordPress plugin development. No executable code, no command injection, no cryptographic operations, and no malicious patterns detected.
质量评分
你能构建什么
WordPress 开发者
为客户项目创建自定义插件以扩展 WordPress 功能
机构开发团队
在团队成员间标准化插件开发工作流程以确保一致的质量
WordPress 产品构建者
开发商业插件用于在 WordPress.org 或 CodeCanyon 上分发
试试这些提示
Help me create a new WordPress plugin called 'My Custom Plugin'. Set up the main plugin file with proper headers, activation hooks, and directory structure following WordPress coding standards.
Create a WordPress admin settings page for my plugin with a text field, dropdown select, and checkbox. Include proper options registration, settings sanitization, and admin menu integration.
Build a WordPress REST API endpoint for my plugin that accepts POST requests with user data. Include permission callbacks, request validation, and proper error responses.
Design a custom database table for my WordPress plugin to store user activity logs. Create the table on plugin activation with proper indexing and include functions for inserting, querying, and deleting records.
最佳实践
- 始终使用插件 slug 作为函数名、类和数据库表的前缀,以避免冲突
- 清理所有用户输入并转义所有输出,以防止 XSS 和 SQL injection 攻击
- 使用 WordPress hooks 系统,而不是直接修改核心文件或其他插件
避免
- 切勿直接修改 WordPress 核心文件 - 应使用 hooks 和 filters
- 避免以纯文本形式存储敏感数据 - 对 API 密钥和密码使用加密
- 不要使用全局变量存储插件状态 - 应使用类属性或 options 表
常见问题
使用此技能需要安装任何依赖项吗?
此技能能否创建与特定 WordPress 主题配合使用的插件?
此技能是否处理 WordPress multisite 兼容性?
我可以用此技能创建 WooCommerce 扩展吗?
此技能是否有助于向 WordPress.org 提交插件?
此技能针对哪个 PHP 版本?
开发者详情
作者
sickn33许可证
MIT
仓库
https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/wordpress-plugin-development引用
main
文件结构
📄 SKILL.md