From novadb-consulting
Create a new attribute and add it to all forms of an existing type.
How this skill is triggered — by the user, by Claude, or both
Slash command
/novadb-consulting:add-attribute-to-typeThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create a new attribute and add it to all forms of an existing type. ONLY for adding attributes to existing types — NOT for creating types, updating type properties, or editing forms directly.
Create a new attribute and add it to all forms of an existing type. ONLY for adding attributes to existing types — NOT for creating types, updating type properties, or editing forms directly.
This skill ONLY handles: Creating a new attribute definition and adding it to all forms of an existing object type.
For creating a standalone attribute → use create-attribute
For reading a type's current attributes → use get-object-type
novadb_cms_get_object — Fetch type and formsnovadb_cms_create_objects — Create the attribute definitionnovadb_cms_update_objects — Update forms with the new fieldCall novadb_cms_get_object with the type ID to read its current form assignments.
Extract the create form ID from attribute 5001 in the type's values. If no create form exists, stop with an error — the type must have a create form before attributes can be added.
Also extract detail form IDs from attribute 5002 for later use.
Call novadb_cms_get_object with the create form ID. Extract the existing field IDs from attribute 5053 (form content). Collect all values where attribute === 5053 and sort by sortReverse.
Call novadb_cms_create_objects with one attribute definition object:
{
"branch": "<branch>",
"objects": [
{
"meta": { "typeRef": 10, "apiIdentifier": "<optional-api-id>" },
"values": [
{ "attribute": 1000, "language": 201, "variant": 0, "value": "Attr Name EN" },
{ "attribute": 1000, "language": 202, "variant": 0, "value": "Attr Name DE" },
{ "attribute": 1001, "language": 0, "variant": 0, "value": "String" }
]
}
]
}
typeRef: 10 = Attribute Definition{ createdObjectIds: [<newAttrDefId>] }| Attribute ID | Field | Type | Notes |
|---|---|---|---|
| 1000 | Name | String | Language-dependent (201=EN, 202=DE) |
| 1001 | Data type | String | See valid data types below |
| 1006 | Required/Predefined | Boolean | Whether values are required |
| 1010 | Has local values | Boolean | |
| 1014 | Max values | Integer | 1=single-value, 0=multi-value |
| 1015 | Allowed types | ObjRef | For ObjRef data type — pass as array value |
String, TextRef, TextRef.JavaScript, TextRef.CSS, XmlRef.SimpleHtml, XmlRef.VisualDocument, Integer, Decimal, Float, Boolean, DateTime, DateTime.Date, ObjRef, BinRef, BinRef.Icon, BinRef.Thumbnail, String.DataType, String.InheritanceBehavior, String.UserName, String.RGBColor
Update the create form by replacing all form content (5053) entries with the existing fields plus the new one:
{
"branch": "<branch>",
"objects": [
{
"meta": { "id": "<formId>", "typeRef": 50 },
"values": [
{ "attribute": 5053, "language": 0, "variant": 0, "value": "<existingId1>", "sortReverse": 0 },
{ "attribute": 5053, "language": 0, "variant": 0, "value": "<existingId2>", "sortReverse": 1 },
{ "attribute": 5053, "language": 0, "variant": 0, "value": "<newAttrDefId>", "sortReverse": 2 }
]
}
]
}
CRITICAL: Include ALL existing fields plus the new one. Each field is a separate CmsValue entry with incrementing sortReverse (0, 1, 2, ...). Never pass an array as the value.
Then repeat for each detail form (from attribute 5002) that differs from the create form — fetch it, read its existing fields, and append the new attribute.
Fetch the newly created attribute definition with novadb_cms_get_object and return it to the user along with the form ID it was added to.
Every value entry follows: { attribute, language, variant, value, sortReverse? }
language: 201=EN, 202=DE, 0=language-independentvariant: 0=defaultsortReverse: for multi-value ordering (0, 1, 2, ...)Form content (attribute 5053) uses individual value entries, NOT arrays:
{ attr: 5053, value: fieldId1, sortReverse: 0 }, { attr: 5053, value: fieldId2, sortReverse: 1 }{ attr: 5053, value: [fieldId1, fieldId2] }Returns { transaction, createdObjectIds: [id] }. Use the ID to fetch the full attribute.
npx claudepluginhub novadb/claude-plugins --plugin novadb-consultingSearches MemPalace before answering questions about past work, people, projects, or prior decisions. Returns verbatim stored content instead of guessing from model memory.
Guides Payload CMS config (payload.config.ts), collections, fields, hooks, access control, APIs. Debugs validation errors, security, relationships, queries, transactions, hook behavior.
Implements vector databases with Pinecone, Weaviate, Qdrant, Milvus, pgvector for semantic search, RAG, recommendations, and similarity systems. Optimizes embeddings, indexing, and hybrid search.