Logo de Platform Custom Object Generate

Platform Custom Object Generate

OrganisationPopulaire
forcedotcom
platform-custom-object-generate

Use when users create, generate, or validate Salesforce Custom Object metadata. Trigger on custom objects, .object files, sharing models, name fields, or validation rules — e.g. "create a custom object" — and deployment errors around sharing models and Master-Detail relationships. Also keep the object's <description> current when its fields or validation rules change. Do NOT use for non-Custom-Object metadata (Apex, Flows, LWC, Permission Sets, Custom Metadata Types) or standard objects.

Présentation

Éditeurforcedotcom
Dépôtsf-skills
Nom de la compétenceplatform-custom-object-generate
Étoiles
1.1K
Forks
351
Fichiers inclus
1
LicenceApache-2.0
Liens
  • Instructions en Markdown

    Un fichier SKILL.md que le modèle charge à la demande : il ne consomme donc des tokens que lorsqu’une demande correspond réellement à la compétence.

  • Compatible avec tous les LLM

    Les compétences IA sont en simple Markdown, et non en code propre à un fournisseur. Elles fonctionnent donc avec GPT, Claude, Gemini, Grok ou un modèle local.

  • 1 fichiers inclus

    Des scripts, des modèles de documents et des références que le modèle peut consulter pendant son travail. Les fichiers sont en lecture seule et ne sont jamais exécutés.

  • Open source

    Publiée par forcedotcom sur GitHub. Consultez les sources avant de l’installer.

Installation

Installez la compétence IA Platform Custom Object Generate dans TypingMind pour l’utiliser avec n’importe quel LLM, ou ajoutez-la à un autre agent capable de lire SKILL.md.

1

Installer dans TypingMind

TypingMind installe une compétence directement depuis son dossier GitHub : l’application lit SKILL.md, regroupe les fichiers de ressources et enregistre le tout localement.

  1. Ouvrez l’application et accédez à Plugins → Compétences.
  2. Choisissez « Installer depuis GitHub ».
  3. Collez l’URL du dossier de la compétence indiquée ci-dessous, puis confirmez.
    https://github.com/forcedotcom/sf-skills/tree/main/plugins/builder/salesforce-development/skills/platform-custom-object-generate
  4. Activez la compétence dans chaque discussion où vous souhaitez pouvoir l’utiliser.
Plugins → Compétences → Ajouter → Via URL GitHub, puis collez l’URL du dossier et appuyez sur Continuer.
2

Installer dans un autre agent

Tout agent capable de lire le format Agent Skills peut utiliser cette compétence : copiez le dossier dans le répertoire des compétences de cet agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/forcedotcom/sf-skills.git /tmp/sf-skills
mkdir -p .claude/skills
cp -r /tmp/sf-skills/plugins/builder/salesforce-development/skills/platform-custom-object-generate .claude/skills/platform-custom-object-generate
Redémarrez Claude Code après la copie pour que la nouvelle compétence soit prise en compte.

Utilisez cette compétence dans TypingMind

Activez Platform Custom Object Generate dans n’importe quelle discussion TypingMind et le modèle s’occupe du reste. Le nom et la description de la compétence figurent dans le prompt système. Dès qu’une demande correspond, le modèle charge lui-même l’intégralité des instructions : vous n’avez jamais à l’invoquer manuellement, et elle ne consomme aucun token tant qu’elle n’est pas utilisée.

Le modèle charge automatiquement Platform Custom Object Generate dès qu’une demande correspond à cette compétence.

Compatible avec tous les modèles IA

Les compétences IA sont de simples instructions Markdown, et non du code propre à un fournisseur. Ainsi, Platform Custom Object Generate n’est pas lié au modèle pour lequel cette compétence a été conçue. Installez-la une seule fois dans TypingMind et utilisez-la avec GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou un modèle local que vous exécutez vous-même, le tout avec vos propres clés API.

  • Chargée uniquement en cas de besoin

    Le prompt système ne contient que le nom et la description. Les instructions sont récupérées à la première demande correspondante : une compétence inutilisée ne coûte donc rien.

  • Changez de modèle en cours de discussion

    La compétence étant constituée d’instructions et non de code, elle reste fonctionnelle lorsque vous changez de modèle : le nouveau modèle lit le même fichier SKILL.md.

Instructions de la compétence

Voici le contenu de SKILL.md que le modèle charge. Lisez-le avant l’installation : une compétence contient des instructions que votre modèle suivra.

When to Use This Skill

Use this skill when you need to:

  • Create new custom objects
  • Generate custom object metadata XML
  • Configure object sharing and security settings
  • Set up object features and capabilities
  • Troubleshoot deployment errors related to custom objects
  • Add, update, or delete a field OR a validation rule on an existing object — any of these may make the object's <description> stale, so you must refresh it (propose + confirm). This applies equally to validation-rule changes, not just fields. See Section 3.B.

Specification

1. Overview and Purpose

This document defines the mandatory constraints for generating CustomObject metadata XML (.object-meta.xml file). The agent must verify these constraints before outputting XML to prevent Metadata API deployment errors.

File extension: .object-meta.xml

Description freshness — applies to EVERY object change, fields AND validation rules: Whenever you add, update, or delete a field or a validation rule on an object, the <description> may now be stale. Before finishing, refresh it per Section 3.B (propose, confirm with the user, write). A validation-rule change counts exactly like a field change — the change is not done until the description has been reconciled. This is easy to forget on validation-rule edits/deletes — don't.


2. Syntactic Essentials (Tier 1)

The following constraints must be true for the XML body to deploy successfully.

Note: The API Name (fullName) is NOT a tag; it is the filename (e.g., Vehicle__c.object-meta.xml).

Required Elements

ElementRequirementNotes
<label>RequiredSingular UI name
<pluralLabel>RequiredPlural UI name
<sharingModel>RequiredSee Sharing Model Rules below
<deploymentStatus>RequiredAlways set to Deployed
<nameField>RequiredPrimary record identifier (requires <label> and <type>)
<visibility>RequiredAlways set to Public

Sharing Model Rules

Default: Set <sharingModel> to ReadWrite.

Exception: If this object contains a Master-Detail relationship field, <sharingModel> MUST be ControlledByParent.

Decision Logic:

  • IF object has NO Master-Detail field → use ReadWrite
  • IF object has Master-Detail field → use ControlledByParent
  • IF a Master-Detail field is being added to an existing child object → that existing object's <sharingModel> must also be updated to ControlledByParent

INCORRECT — Will cause error: Cannot set sharingModel to ReadWrite on a CustomObject with a MasterDetail relationship field

xml
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
  <label>Order Line Item</label>
  <pluralLabel>Order Line Items</pluralLabel>
  <sharingModel>ReadWrite</sharingModel>  <!-- WRONG: Object has a M-D field -->
  <deploymentStatus>Deployed</deploymentStatus>
</CustomObject>

CORRECT:

xml
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
  <label>Order Line Item</label>
  <pluralLabel>Order Line Items</pluralLabel>
  <sharingModel>ControlledByParent</sharingModel>  <!-- CORRECT -->
  <deploymentStatus>Deployed</deploymentStatus>
</CustomObject>

3. Smart Defaults & Decision Logic (Tier 2)

The agent must choose which features to enable based on the object's intended use case.

A. The Name Field Decision

TypeWhen to UseAdditional Requirements
TextDefault for human-named entities (Projects, Locations, Teams)None
AutoNumberUse for transactions, logs, or IDs (Invoices, Requests, Tickets)Must include <displayFormat> (e.g., INV-{0000}) and <startingNumber>1</startingNumber>

Text Name Field Example:

xml
<nameField>
  <label>Project Name</label>
  <type>Text</type>
</nameField>

AutoNumber Name Field Example:

xml
<nameField>
  <label>Invoice Number</label>
  <type>AutoNumber</type>
  <displayFormat>INV-{0000}</displayFormat>
  <startingNumber>1</startingNumber>
</nameField>

B. Object Description (Enrichment)

<description>: Mandatory — every Custom Object MUST have one. It must read like human-written documentation, never a generic template ("Object used to track and manage...") or a metadata dump ("Contains 8 fields including Project_Name__c...").

Always compose an enriched description — when creating the object, and again on any change to it: adding, updating, or deleting a field or a validation rule (so it never goes stale). The change — field or validation rule — is never "done" until you've refreshed the object's description. This is not optional; do not ask whether to add a description.

Confirm per change — every time. Propose and confirm on each field/rule change separately. A previous "keep current" applies only to that one change; it is never standing permission to skip the proposal on a later change. Do not infer a preference from an earlier answer — re-propose and re-ask for every new change.

Compose the description (steps below). If the object already has one, use it as a strong signal — preserve the business context it carries (domain, team, intent the schema can't reveal) and fold the new field/rule in rather than discarding it.

Then branch on whether a description already exists:

  • No existing description (brand-new object): there is nothing to overwrite — just write the composed description. Do not prompt.

  • An existing description (update, delete, or any re-enrichment): never overwrite it silently — you can't tell from the file whether it was hand-written by an admin or generated earlier. Show the proposal, ask, and STOP — wait for the user's reply before writing:

    Proposed description for {Object}: <the enriched description> Current: <the existing description> Use this? (yes / keep current / edit)

    You MUST NOT write the <description> until the user replies — showing the diff is not approval, even when the change looks obvious or minor. Then act: yes → write the proposed text · keep current → leave the existing one untouched (this applies to this change only — re-propose on the next one) · edit → use the user's wording.

Always end with a <description> written.

Composing the description:

  1. Classify each field by how it appears in the description:
    • Constrained (required, unique, externalId, restricted picklist) → selective parenthetical: VIN (required, external ID), Color (Red/Green only)
    • Behavioral (formula, roll-up) → describe what it computes: "the Age Years field auto-calculates vehicle age"
    • Relationship (master-detail, lookup) → woven context: "as a child of Account" (never "(Master-Detail to Account)")
    • Standard → label only
  2. Compose in this order, using field labels not API names:

    Purpose → key fields → computed fields → validation rules (as business rules) → "Commonly used for {use cases}."

  3. Count and trim before writing (required): count the words; aim ~45, hard ceiling 50. If over, tighten wording first, then drop whole sentences in priority order (use cases → rules → computed; never drop sentences 1–2). Recount. Do not write until ≤ 50.

Example (Car, 46 words):

xml
<description>The Car object tracks vehicle inventory and maintenance. It captures Year, VIN (required, external ID), Color (Red/Green only), and Location; the Age Years field auto-calculates vehicle age. VIN is required and Black cars cannot be sold. Commonly used for fleet management, inventory tracking, and service scheduling.</description>

→ For the full workflow and examples, read references/description-enrichment.md.

C. Junction Object Naming

If the object is a many-to-many link between two parents, name the object by combining the two parent entities to ensure the schema remains intuitive.

Examples:

  • Position_Candidate__c (links Position and Candidate)
  • Job_Application__c (links Job and Application)

D. Feature Enablement (Clean XML)

To maintain "Clean XML," only include optional tags when deviating from the Salesforce platform default of false.

Scenario A: User-Facing Objects (Apps, Trackers, Business Entities)

  • Trigger: The object is intended for direct user interaction
  • Action: Set <enableSearch>, <enableReports>, <enableActivities>, and <enableHistory> to true

Scenario B: System-Facing Objects (Junctions, Background Logs)

  • Trigger: The object exists for technical associations or background data
  • Action: Omit these tags to keep the UI clean and the XML lean

4. Critical Constraints & Common Failures

Reserved Words

Never use reserved words as API names for Custom Objects or Custom Fields:

CategoryReserved Words (Do Not Use as API Names)
SOQL/SQLSelect, From, Where, Limit, Order, Group
SystemUser, External, View, Type
TemporalDate, Number

Relationship Cap

Do not create more than 2 Master-Detail relationships for a single object. If a third relationship is required, use a Lookup instead.

XML Root Element

Do NOT include the <fullName> tag at the root of the .object-meta.xml file. The API name is derived from the filename.

INCORRECT:

xml
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
  <fullName>Vehicle__c</fullName>  <!-- WRONG: Remove this -->
  <label>Vehicle</label>
</CustomObject>

CORRECT:

xml
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
  <label>Vehicle</label>
  <!-- fullName comes from filename: Vehicle__c.object-meta.xml -->
</CustomObject>

Validation Rule Naming Convention

Validation rule names follow different conventions than custom fields.

Rules:

  • Must contain only alphanumeric characters and underscores
  • Must begin with a letter
  • Cannot end with an underscore
  • Cannot contain two consecutive underscores
  • Must NOT end with __c (unlike custom fields)

INCORRECT:

xml
<validationRules>
  <fullName>Require_Start_Date__c</fullName>  <!-- WRONG: Has __c suffix -->
  <active>true</active>
  <errorMessage>Start Date is required.</errorMessage>
  <formula>ISBLANK(Start_Date__c)</formula>
</validationRules>

Error: The validation name can only contain alphanumeric characters, must begin with a letter, cannot end with an underscore...

CORRECT:

xml
<validationRules>
  <fullName>Require_Start_Date</fullName>  <!-- CORRECT: No __c suffix -->
  <active>true</active>
  <errorMessage>Start Date is required.</errorMessage>
  <formula>ISBLANK(Start_Date__c)</formula>
</validationRules>

Naming Pattern Reference:

Metadata TypeNaming PatternExample
Custom FieldsEnds with __cStart_Date__c
Validation RulesNo suffixRequire_Start_Date
Custom ObjectsEnds with __cVehicle__c

5. Verification Checklist

Before generating the Custom Object XML, verify:

Syntactic Checks

  • Are both <label> and <pluralLabel> present?
  • Is <deploymentStatus> set to Deployed?
  • Is <visibility> set to Public?
  • Does <nameField> include both <label> and <type>?
  • If <type> is AutoNumber, are <displayFormat> and <startingNumber> included?

Sharing Model Check (Critical)

  • Does this object have a Master-Detail relationship field?
    • If YES → <sharingModel> MUST be ControlledByParent
    • If NO → <sharingModel> should be ReadWrite

Constraint Checks

  • Is the API name free of reserved words?
  • Are there 2 or fewer Master-Detail relationships?
  • Is <fullName> absent from the XML root?

Validation Rule Checks (if applicable)

  • Do validation rule names NOT end with __c?
  • Do validation rule names follow alphanumeric + underscore pattern?

Description Enrichment Quality Checks

  • Opens with "The {Object} object..." + business purpose (not "Object used to track and manage...")
  • Uses field labels, never API names; no "Contains N fields including" dump
  • Formulas/rollups described by behavior; validations stated as business rules; relationships as context
  • Includes common use cases ("Commonly used for...") and is under 50 words
  • Folded any current description's business context into the proposed one (didn't discard it)
  • For an existing description (update/delete/re-enrich), STOPPED and waited for the user's reply before writing — did not treat showing the diff as approval

Architectural Checks

  • Is <description> present? (Enriched per Section B — proposed and confirmed with the user before writing.)
  • Are <enableSearch> and <enableReports> set to true if user-facing?
  • Does the filename match the intended API name?

Reference File Index

FileWhen to read
references/description-enrichment.mdComposing or refreshing an object's <description> (on create, or when a field/rule changes) — full enrichment workflow, field-prioritization tiers, junction/child handling, edge cases, and more examples

Fichiers inclus

Le modèle lit ces fichiers à la demande lorsque la compétence est chargée. Ils sont accessibles en lecture et ne sont jamais exécutés.

Foire aux questions

À quoi sert la compétence IA Platform Custom Object Generate ?

Use when users create, generate, or validate Salesforce Custom Object metadata. Trigger on custom objects, .object files, sharing models, name fields, or validation rules — e.g. "create a custom object" — and deployment errors around sharing models and Master-Detail relationships. Also keep the object's <description> current when its fields or validation rules change. Do NOT use for non-Custom-Object metadata (Apex, Flows, LWC, Permission Sets, Custom Metadata Types) or standard objects.

Pourquoi utiliser Platform Custom Object Generate sur TypingMind ?

Parce que vous l’installez une seule fois pour l’utiliser avec n’importe quel modèle. Platform Custom Object Generate se compose de simples instructions en Markdown plutôt que de code propre à un fournisseur. La même compétence fonctionne donc avec GPT-5, Claude, Gemini, Grok ou un modèle local, et vous pouvez changer de modèle en cours de discussion sans perturber son fonctionnement. TypingMind utilise vos propres clés API : vous payez donc directement les fournisseurs plutôt qu’un abonnement par siège, et vos compétences et discussions restent dans votre propre espace de stockage.

Comment installer Platform Custom Object Generate dans TypingMind ?

Dans TypingMind, ouvrez Plugins → Compétences → Installer depuis GitHub et collez https://github.com/forcedotcom/sf-skills/tree/main/plugins/builder/salesforce-development/skills/platform-custom-object-generate. TypingMind lit le fichier SKILL.md, regroupe les fichiers associés et installe le tout sous forme de compétence que vous pouvez activer pour chaque discussion.

Quels modèles d’IA peuvent utiliser Platform Custom Object Generate ?

N’importe quel modèle que vous connectez dans TypingMind. Les compétences IA sont de simples instructions en Markdown, et non du code propre à un fournisseur. GPT, Claude, Gemini, Grok et les modèles locaux peuvent donc tous charger cette compétence lorsqu’une demande lui correspond.

Combien de modèles d’IA puis-je utiliser avec Platform Custom Object Generate ?

Autant que vous le souhaitez. Tant qu’un modèle prend en charge les compétences, vous pouvez utiliser Platform Custom Object Generate avec lui : GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama et bien d’autres, le tout dans TypingMind avec vos propres clés API.

La compétence IA Platform Custom Object Generate est-elle gratuite ?

Oui. Cette compétence est publiée sur GitHub par forcedotcom sous licence Apache-2.0. Vous ne payez que votre propre fournisseur d’IA pour les tokens utilisés.

Que sont les compétences IA ?

Une compétence IA est un ensemble d’instructions réutilisables qui apprend à un modèle d’IA à accomplir une tâche précise. Elle suit le format ouvert Agent Skills : un fichier SKILL.md contenant un nom et une description, ainsi que les éventuels scripts, modèles de documents ou fichiers de référence dont le modèle peut avoir besoin. Le modèle ne lit les instructions que lorsque votre demande correspond à la compétence. Une compétence installée ne coûte donc rien tant qu’elle n’est pas utilisée.

En quoi les compétences IA diffèrent-elles des plugins ou des serveurs MCP ?

Un plugin ou un serveur MCP fournit au modèle de nouveaux outils à appeler : du code qui s’exécute quelque part et renvoie un résultat. Une compétence IA lui apporte plutôt des connaissances et une méthode : comment aborder une tâche, quelles étapes suivre et à quoi ressemble un bon résultat. Les compétences sont de simples instructions en Markdown. Elles ne nécessitent donc ni serveur, ni clé API, ni environnement d’exécution, et fonctionnent avec n’importe quel modèle.

Tout voir

Créez votre propre espace IA dès maintenant

Abonnez-vous à notre newsletter pour être informé des nouvelles fonctionnalités et des prochains cadeaux à gagner 👇