Add a Field to a Field Group in Secure Custom Fields with AI
Add one new field to an existing group, with a name check first and the other fields confirmed unchanged.
Prerequisites
A site connected to WPVibe running Secure Custom Fields 6.9.10 or newer (free, tested on 6.9.10) on WordPress 7.1 or newer (tested on 7.1.5), with an administrator account and Abilities API left on under SCF, Settings. A field group with Enable Abilities on.
My WordPress site uses Secure Custom Fields (SCF). Add a [field type, for example number] field called [field label] to my [field group name] field group. If a reply from a read-only ability ends with a note starting --- TRUNCATED, run that ability again with max_length 100000. If it is still cut, stop and tell me. Never conclude that a group or field is missing from a cut reply. If a create or change is cut, do not run it again: read the result back. 1. Run discover_abilities with category scf-fields and confirm scf/create-field is there, and with category acf-field-management and confirm acf/field-groups is there. If either is not, stop and check GET /wp/v2/plugins?_fields=plugin,name,status. If Advanced Custom Fields or ACF PRO is active, tell me this recipe is written for Secure Custom Fields and do not suggest installing SCF, because activating it deactivates them. If you cannot tell, do not suggest installing SCF until I confirm neither is active. Otherwise tell me to install or update the free Secure Custom Fields plugin (6.9.10 or newer, on WordPress 7.1 or newer) and check that Abilities API, Post Types & Taxonomies UI (for post types and taxonomies) and Options Pages UI (for options pages) are on under SCF, Settings. 2. Run acf/field-groups and find the group by its title. If two groups have that title, stop and ask me which. If the group's local value is json or php, stop and tell me its fields load from a file, so a field added here would not appear, and add nothing. It lists only groups with abilities on: if mine is not there, stop and tell me to turn on Enable Abilities in that group's settings. Read the group's fields from this result. Do not use scf/get-field-group or scf/export-field-group, which come back without the fields, or scf/list-fields without a filter, which can fail on image, file, gallery, relationship and clone fields. 3. Show me the group's current fields (label, name and type) as my record of how it was. Propose the new field: label, name (lowercase letters, numbers and underscores), type, and any choices. Start every new field name with a word from the post type or group, for example villa_max_guests, and never use a name that, with an underscore in front, is a meta key WordPress or another plugin uses (for example price, sku, stock or thumbnail_id), because SCF also writes to that underscore key each time the entry is saved. Run scf/list-fields with filter name set to the new name, and find each result's group in scf/list-field-groups by its parent. Stop and suggest a different name if a result is in this group, if that search returns an error, or if this group is on an options page and the result's group is on any options page. Also stop and suggest a different name unless every location rule of the result's group is post type, taxonomy or options page is equal to something this group does not apply to, because two fields with one name on one entry share one value. Run scf/list-fields with filter type set to group, and treat as taken every name made of a group field's name, an underscore and a name in its sub_fields, at any depth, because SCF stores sub field values under those combined names. Run scf/list-fields with filter type set to clone. If either of these two lists returns an error, or the clone list returns any field, tell me that the stored names of group or clone fields cannot be checked, and wait for my yes before going on. If this group has show_in_rest on, warn me that once an entry is published anyone can read this field's value through the REST API, unless the entry has a password or its post type has Show in REST API off, so private details do not belong in it. Wait for my yes. 4. Run scf/create-field once with a unique key (field_ followed by lowercase letters and numbers), the label, name, type and any choices from step 3, parent set to the group's ID, and menu_order set to 1000 plus the number of fields the group has now, so it lands last. Change nothing else. 5. Run acf/field-groups again. Show me the fields in order and confirm every earlier field is unchanged and the new field is last. If it is missing or not last, tell me and stop. 6. Tell me that existing entries stay empty in this field unless a value was saved under this name before, for example by a deleted field, and that it will not show on my pages until my theme or a block displays it. If the group has show_in_rest on, say that its value on a published entry can already be read through the REST API, unless the entry has a password or its post type has Show in REST API off.
Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:
Run the “Add a Field to a Field Group in Secure Custom Fields with AI” recipe from the WPVibe cookbook on my connected site.
Your villas now need a maximum guest count, or your events a booking link. Adding one field means opening the group, finding the right type, naming it so it does not clash with another field, and saving without disturbing the rest.
The AI reads the group and shows you its current fields, so you have a record of how it was. It proposes the new field, checks that the name is free, and waits for your yes. Then it adds that one field at the end of the group and reads the group back to confirm the others did not change.
Existing entries stay empty in the new field unless a value was saved under that name before, for example by a deleted field, and it will not show on your pages until your theme or a block displays it. If the group has Show in REST API on, anyone can still read its value on a published entry, unless the entry has a password or its post type has Show in REST API off, so keep private details out. Use this for a new field only: renaming or retyping a field that already holds values is a job for SCF’s field group editor, with a backup first.
Outcome
One new field at the end of the group, with every existing field confirmed unchanged.