mcpField
W
wp-gravity-wiz

wp-gravity-wiz

github.com/kylebrodeur开发149 次安装1 周前更新
代码仓库

关于 wp-gravity-wiz

wp-gravity-wiz 是通过 Spellbook 管理 Gravity Forms 相关 Gravity Wiz 产品的技能,涵盖安装、许可、Perks 配置,以及用于动态表单工作流的扩展。

主要功能

  1. 01通过 Spellbook 安装和启用产品
  2. 02管理许可与更新
  3. 03配置 Gravity Perks
  4. 04使用 Populate Anything 填充动态字段
  5. 05排查 Perks 冲突

适用场景

  1. 01在 WordPress 网站安装 Gravity Wiz 产品
  2. 02将旧版 Perks 安装迁移到 Spellbook
  3. 03从文章或外部 API 填充表单字段
  4. 04解决 Perks 之间的冲突

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/kylebrodeur/wordpress-agent-kit --skill wp-gravity-wiz

安装后在 Claude Code 中输入/wp-gravity-wiz确认已加载。

详细介绍

Gravity Wiz — Spellbook、Perks 与扩展

Gravity Wiz 打造 Gravity 生态系统:Spellbook(统一平台)、Gravity Perks(48+ 种表单增强功能)、Gravity Connect(外部服务集成)和 Gravity Shop(WooCommerce)。所有产品均通过 Spellbook 安装和更新。

使用场景

  • 安装或激活 Spellbook 及任意 Gravity Wiz 产品
  • 使用 Gravity Perks(GP Populate Anything、Nested Forms、Limit Submissions 等)
  • 从旧版 Gravity Perks 单独安装程序升级到 Spellbook
  • 排查 Perk 冲突或 Perk 特定设置问题
  • 设置 GP Populate Anything,以便通过 AI 动态填充表单
  • 在 account.gravitywiz.com 管理许可证

官方文档

资源URL
Spellbook 文档https://gravitywiz.com/documentation/spellbook/
Gravity Perks 文档https://gravitywiz.com/documentation/gravity-perks/
Gravity Connect 文档https://gravitywiz.com/documentation/gravity-connect/
Gravity Shop 文档https://gravitywiz.com/documentation/gravity-shop-product-configurator/
可用 Perks 列表https://gravitywiz.com/available-perks/
代码片段库https://gravitywiz.com/snippet-library/
账户控制面板https://account.gravitywiz.com/
下载https://account.gravitywiz.com/downloads
支持https://gravitywiz.com/support/
常见问题https://gravitywiz.com/documentation/gravity-perks-account-faq/
许可证常见问题https://gravitywiz.com/documentation/license-faq/

GitHub

仓库用途
gravitywiz/snippet-library1000+ 个钩子和筛选器 — 非常适合作为 AI 训练上下文

流程

1) 安装 Spellbook(平台 — 请先安装)

所有 Gravity Wiz 产品均通过 Spellbook 安装:

  1. 从此处下载:https://gravitywiz.com/download/spellbook
    (或从账户下载:https://account.gravitywiz.com/downloads)
  2. 安装:
wp plugin install path/to/spellbook.zip --activate
  1. 在 wp-admin 中激活许可证:Spellbook → Account
  2. 如果已安装旧版 Gravity Perks,Spellbook 会自动将其停用。
2) 安装单个产品/Perks

在 wp-admin 中:Spellbook → Perks(或 Connect 或 Shop):

  • 浏览或搜索产品
  • 点击 Activate — Spellbook 会自动处理下载和激活

Spellbook 激活后,可通过 CLI/自动化方式安装:

# Spellbook manages its own update mechanism — use the UI or its WP-CLI integration
wp plugin list | grep gp-  # list installed perks
3) 用于 AI 工作流的核心 Perks
Perk用途文档
GP Populate Anything从文章、用户、术语或外部 API 动态填充字段https://gravitywiz.com/documentation/gravity-forms-populate-anything/
GP Nested Forms在父表单中嵌入子表单(可重复的部分)https://gravitywiz.com/documentation/gravity-forms-nested-forms/
GP Limit Submissions通过限制每个时段内的提交次数来防止垃圾信息/滥用https://gravitywiz.com/documentation/gravity-forms-limit-submissions/
GP Advanced Select为 AI 生成的大型列表提供搜索和选择功能(由 Choice.js 提供支持)https://gravitywiz.com/documentation/gravity-forms-advanced-select/
GP Live Preview提交前实时预览字段值https://gravitywiz.com/documentation/gravity-forms-live-preview/
GP Copy Cat自动在字段之间复制字段值https://gravitywiz.com/documentation/gravity-forms-copy-cat/
4) GP Populate Anything + AI 数据源

与 Gravity Connect 结合,实现 AI 驱动的动态表单填充:

// Filter Populate Anything query before form renders
add_filter('gppa_query_args', function($args, $field, $form) {
    // Inject AI-generated constraints into the population query
    if ($field->id === 5) {
        $args['meta_query'][] = [
            'key'   => 'ai_category',
            'value' => 'featured',
        ];
    }
    return $args;
}, 10, 3);
5) 降低 LLM 循环的内存占用

Spellbook 会在所有 Perks 之间去重代码,因此与单独安装各个 Perk 相比,可减少 PHP 内存使用量。这对于通过 Gravity Connect 触发的高内存占用 LLM/API 执行循环尤为重要。

# Verify Spellbook is active (not legacy Gravity Perks)
wp plugin status spellbook
wp plugin status gravityperks  # should show as inactive/not installed
6) 在 Plugins 页面中隐藏 Perks(可选)
// Keep wp-admin Plugins page clean (perks still update normally)
add_filter('gp_hide_perks_from_plugins_page', '__return_true');

参考资料

评论

支持 Markdown