platform-custom-object-generate

Generate and validate Salesforce Custom Object metadata XML with correct sharing models and descriptions.

Updated Jul 2, 2026
One-click install
npx skills add https://github.com/padjei/SF_Build --skill platform-custom-object-generate-padjei
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: platform-custom-object-generate
Source: https://github.com/padjei/SF_Build/tree/main/.claude/skills/platform-custom-object-generate
Command: npx skills add https://github.com/padjei/SF_Build --skill platform-custom-object-generate-padjei

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Creating Salesforce Custom Object metadata by hand often leads to Metadata API deployment errors such as incorrect sharingModel values with Master-Detail relationships, invalid validation rule names, or missing required elements. This Skill enforces the constraints that make .object-meta.xml files deploy successfully and keeps object descriptions accurate as fields and validation rules change. ## Core Features & Use Cases - Deployment-safe XML generation: Enforces required elements (label, pluralLabel, sharingModel, deploymentStatus, nameField, visibility) and prevents common failures like root fullName tags, reserved-word API names, and validation rules ending in __c. - Smart defaults and decision logic: Chooses Text vs AutoNumber name fields, sets sharingModel to ControlledByParent when Master-Detail fields exist, applies junction object naming, and enables search/reports/activities only for user-facing objects. - Description enrichment workflow: Composes human-readable object descriptions (under 50 words, field labels not API names) and re-proposes them for user confirmation whenever a field or validation rule is added, updated, or deleted. - Use Case: When asked to create an Order Line Item object with a Master-Detail to Order, the Skill generates XML with sharingModel set to ControlledByParent, an AutoNumber name field, and a composed description, avoiding the classic deployment error. ## Quick Start Ask the AI to create a Salesforce custom object called Vehicle with fields for Year, VIN, and Color, and have it generate the deployable object metadata XML.

Frequently Asked Questions about platform-custom-object-generate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Salesforce custom object metadata XML file?▼

Define a .object-meta.xml file with required elements: label, pluralLabel, sharingModel, deploymentStatus set to Deployed, visibility set to Public, and a nameField with label and type. The API name comes from the filename, so never include a fullName tag at the XML root.

Why does my custom object deployment fail with a sharingModel error?▼

The error occurs when sharingModel is set to ReadWrite on an object containing a Master-Detail relationship field. Set sharingModel to ControlledByParent for any object with a Master-Detail field, including existing child objects when a Master-Detail is added later.

Should validation rule names end with __c in Salesforce?▼

No, validation rule names must not end with __c, unlike custom fields and custom objects. They must contain only alphanumeric characters and underscores, begin with a letter, not end with an underscore, and contain no consecutive underscores.

When should I use AutoNumber versus Text for the name field?▼

Use Text for human-named entities like Projects or Locations, and AutoNumber for transactions, logs, or IDs such as Invoices and Tickets. AutoNumber requires a displayFormat like INV-{0000} and a startingNumber element.

How many Master-Detail relationships can a custom object have?▼

A single object can have at most two Master-Detail relationships. If a third relationship is required, use a Lookup field instead to stay within Salesforce platform limits.

When should the custom object description be updated?▼

Update the description whenever a field or validation rule is added, updated, or deleted, since any of these changes can make it stale. For objects with an existing description, propose the new wording and wait for user confirmation before writing it.