platform-custom-field-generate
Installation
SKILL.md
Salesforce Custom Field Generator and Validator
Overview
Generates and validates Salesforce CustomField metadata XML, with special handling for the highest-failure-rate types — Roll-Up Summary and Master-Detail. The agent must verify the constraints below before outputting XML to prevent Metadata API deployment errors.
1. Universal Mandatory Attributes
Every generated field must include these tags:
| Attribute | Requirement | Notes |
|---|---|---|
<fullName> |
Required | Field name only: derive from <label> — capitalize each word, replace spaces with _, append __c. Must start with a letter. E.g., label Total Contract Value → Total_Contract_Value__c. This rule is for the FIELD name. Picklist VALUE <fullName> is different — keep it exactly as the user spelled it, spaces and all, no __c (e.g. Closed Won, NOT Closed_Won). See references/advanced-picklists.md (ref §3). |
<label> |
Required | The UI name (Title Case) |
<description> |
Always include | Explain the business reason why this field exists. |
<inlineHelpText> |
Always include | Actionable end-user guidance that adds value beyond the label (e.g., "Enter the value in USD including tax", not "The amount"). |