Soql Lib Query Builder
beyond-the-cloud-dev/soql-lib
Builds Salesforce SOQL queries using the SOQL Lib fluent builder API (SOQL.cls).
A skill your agent uses to create, generate, or validate Salesforce Custom Metadata Type metadata — the mdt object, fields, and deployable records.
$ npx skills add forcedotcom/sf-skills --skill platform-custom-metadata-type-generate -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install forcedotcom/sf-skills platform-custom-metadata-type-generate --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/forcedotcom/sf-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/platform-custom-metadata-type-generate .claude/skills/platform-custom-metadata-type-generate && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "platform-custom-metadata-type-generate" agent skill from https://github.com/forcedotcom/sf-skills/tree/main/skills/platform-custom-metadata-type-generate into .claude/skills/platform-custom-metadata-type-generate/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "platform-custom-metadata-type-generate", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/forcedotcom/sf-skills/tree/main/skills/platform-custom-metadata-type-generateType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add forcedotcom/sf-skills --skill platform-custom-metadata-type-generate -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install forcedotcom/sf-skills platform-custom-metadata-type-generate --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/forcedotcom/sf-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/platform-custom-metadata-type-generate .agents/skills/platform-custom-metadata-type-generate && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "platform-custom-metadata-type-generate" agent skill from https://github.com/forcedotcom/sf-skills/tree/main/skills/platform-custom-metadata-type-generate into .agents/skills/platform-custom-metadata-type-generate/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "platform-custom-metadata-type-generate", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add forcedotcom/sf-skills --skill platform-custom-metadata-type-generate -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install forcedotcom/sf-skills platform-custom-metadata-type-generate --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/forcedotcom/sf-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/platform-custom-metadata-type-generate .cursor/skills/platform-custom-metadata-type-generate && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "platform-custom-metadata-type-generate" agent skill from https://github.com/forcedotcom/sf-skills/tree/main/skills/platform-custom-metadata-type-generate into .cursor/skills/platform-custom-metadata-type-generate/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "platform-custom-metadata-type-generate", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/forcedotcom/sf-skills.git --path skills/platform-custom-metadata-type-generate--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add forcedotcom/sf-skills --skill platform-custom-metadata-type-generate -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install forcedotcom/sf-skills platform-custom-metadata-type-generate --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/forcedotcom/sf-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/platform-custom-metadata-type-generate .gemini/skills/platform-custom-metadata-type-generate && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "platform-custom-metadata-type-generate" agent skill from https://github.com/forcedotcom/sf-skills/tree/main/skills/platform-custom-metadata-type-generate into .gemini/skills/platform-custom-metadata-type-generate/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "platform-custom-metadata-type-generate", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install forcedotcom/sf-skills platform-custom-metadata-type-generateInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add forcedotcom/sf-skills --skill platform-custom-metadata-type-generate -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/forcedotcom/sf-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/platform-custom-metadata-type-generate .github/skills/platform-custom-metadata-type-generate && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "platform-custom-metadata-type-generate" agent skill from https://github.com/forcedotcom/sf-skills/tree/main/skills/platform-custom-metadata-type-generate into .github/skills/platform-custom-metadata-type-generate/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "platform-custom-metadata-type-generate", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add forcedotcom/sf-skills --skill platform-custom-metadata-type-generate -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install forcedotcom/sf-skills platform-custom-metadata-type-generate --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/forcedotcom/sf-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/platform-custom-metadata-type-generate .opencode/skills/platform-custom-metadata-type-generate && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "platform-custom-metadata-type-generate" agent skill from https://github.com/forcedotcom/sf-skills/tree/main/skills/platform-custom-metadata-type-generate into .opencode/skills/platform-custom-metadata-type-generate/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "platform-custom-metadata-type-generate", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
platform-custom-metadata-type-generateA skill your agent uses to create, generate, or validate Salesforce Custom Metadata Type metadata — the mdt object, fields, and deployable records.
Platform Custom Metadata Type Generate is an agent skill from forcedotcom/sf-skills. Use to create, generate, or validate Salesforce Custom Metadata Type metadata — the mdt object, fields, and deployable records. Trigger on custom metadata types, CMDT, mdt objects, .md-meta.xml files, or cross-org reference/config data; also admin-maintained mapping/lookup/crosswalk tables (config that changes without a deploy belongs in a CMDT, never hardcoded in Apex/Flow), and CMDT deploy errors. DO NOT TRIGGER for Custom Settings (use platform-custom-setting-generate), business-record objects (use…
Its SKILL.md is about 5.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including scripts and reference files (for example `references/cmdt-records.md` and `scripts/sanitize-developer-name.sh`).
It sits in Sales & Support, covering CRM management. It works with Salesforce. The repository describes itself as: Salesforce's curated collection of agent skills for building applications. Optimized for Agentforce Vibes, compatible with all AI tools. The licence is Apache-2.0.
8 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit e5164d9. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 1 file in scripts/ (Shell), which the agent can run.
From the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
soap.sforce.comw3.orgFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Platform Custom Metadata Type Generate loads about 5.6k tokens when it runs, and up to ~9.2k if it reads all its reference files. Until then it costs about 157 tokens; SKILL.md has 2,444 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from forcedotcom/sf-skills at commit e5164d9, republished under its Apache-2.0 licence (© forcedotcom). 2,444 words, ~5,637 tokens.
.claude/skills/platform-custom-metadata-type-generate/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.Use this skill when you need to:
__mdt)MetadataRelationship fields.md-meta.xml filesA Custom Metadata Type produces two separate artifact families, and most requests need both:
| Artifact | Path | Metadata type |
|---|---|---|
| Type definition | objects/<Name>__mdt/<Name>__mdt.object-meta.xml | CustomObject |
| Fields | objects/<Name>__mdt/fields/<Field>__c.field-meta.xml | CustomField |
| Records | customMetadata/<Name>.<Record>.md-meta.xml | CustomMetadata |
API name suffix: __mdt on the type; fields still end in __c.
The defining advantage over a custom setting: CMDT records are metadata and therefore deploy between orgs. When a user says configuration should "ship with the package" or "be the same in every org," CMDT is the right answer.
The root element is
<CustomObject>, but almost none of a custom object's rules apply.sharingModel,nameField, anddeploymentStatusare required or normal on a regular custom object and are hard errors here. Do not carry assumptions across fromplatform-custom-object-generate.
| Element | Requirement | Notes |
|---|---|---|
<label> | Required | Singular UI name |
<pluralLabel> | Required | Omitting it gives Must specify a non-empty plural label for the CustomObject |
<visibility> | Always include | Public, or Protected/PackageProtected only in dev/sandbox/scratch (Section 6) |
<description> | Always include | What this type configures and who owns it |
<pluralLabel> being required here but forbidden on a custom setting is the most commonly inverted
rule between the two families. Neither failure mentions the other family's rule.
Every element below produces Cannot specify: <element> for Custom Metadata Type — reusing a regular custom
object's skeleton (with sharingModel, deploymentStatus, a nameField block, or enableSearch) is the
usual cause:
sharingModel, nameField, deploymentStatus, enableActivities, enableReports, enableHistory,
enableSearch
CORRECT — minimum valid __mdt type:
<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
<label>Partner Tier</label>
<pluralLabel>Partner Tiers</pluralLabel>
<description>Discount and threshold configuration per partner tier. Ships with the package; edited by the revenue ops team.</description>
<visibility>Public</visibility>
</CustomObject>This skill owns the CMDT-specific deltas only — the type allowlist, fieldManageability, and
MetadataRelationship below. For generic field mechanics (<fullName> derivation, <label>,
<description>, <inlineHelpText>, precision/scale, <length>, visibleLines), follow
platform-custom-field-generate.
Checkbox, Date, DateTime, Email, Number, Percent, Phone, Picklist, Text, TextArea,
LongTextArea, Url, plus MetadataRelationship.
Currency, AutoNumber, MasterDetail, Summary, Location, Time, EncryptedText, Html,
MultiselectPicklist. Each fails with a precise, well-formed error:
Type {TypeName} of CustomMetadataField {Object}__mdt.{Field}__c is not supported for the Entity {Object}__mdt(There is no trailing period.) Example: Type Currency of CustomMetadataField Partner_Tier__mdt.Discount__c is not supported for the Entity Partner_Tier__mdt
Currency is the common trap — it works on a custom setting but not here. Use Number with
<precision>/<scale> and put the currency in the label or help text.
Formula fields are unsupported, but they break the pattern above. A <formula> element on an otherwise
legal type gives only:
Invalid data type.Lookup is silently coerced — CRITICAL<type>Lookup</type> on a __mdt does not fail when its referenceTo resolves to a real sObject: the
deploy is green and the platform silently rewrites the field to MetadataRelationship. A later retrieve
shows a field the user never wrote:
<type>MetadataRelationship</type> <!-- was deployed as Lookup -->Always write MetadataRelationship explicitly. Emitting Lookup produces a green deploy and a
source-vs-org mismatch that churns in git the first time anyone retrieves. (Reproduced on a live deploy: a
resolvable Lookup returns as MetadataRelationship; a non-resolvable referenceTo is cleanly rejected.)
MetadataRelationshipThree targets, all valid. referenceTo selects which.
<referenceTo> | Purpose | Extra requirement |
|---|---|---|
Another __mdt type | Link two custom metadata types | Must be a different type |
EntityDefinition | Point at an sObject | None |
FieldDefinition | Point at a field | Requires <metadataRelationshipControllingField> |
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Target_Field__c</fullName>
<label>Target Field</label>
<type>MetadataRelationship</type>
<referenceTo>FieldDefinition</referenceTo>
<metadataRelationshipControllingField>Partner_Tier__mdt.Target_Object__c</metadataRelationshipControllingField>
<relationshipLabel>Target Field</relationshipLabel>
<relationshipName>Target_Field</relationshipName>
</CustomField>The controlling field must be an EntityDefinition relationship on the same type, referenced as
Type__mdt.Field__c. Omitting it gives Metadata relationships to Field Definition require a controlling field.
Self-references are impossible. Pointing a MetadataRelationship at its own parent type fails with
Cannot add a self-lookup relationship child with cascade or restrict options to the object itself (verbatim
from a live __mdt deploy) — use a second type.
<fieldManageability>Optional. It defaults to DeveloperControlled — do not add it unless the user wants a different value.
Valid values are DeveloperControlled, SubscriberControlled, and Locked.
It is valid only on __mdt fields. On a regular custom object field or a custom setting field:
Field manageability cannot be set on this entity..md-meta.xml)Write customMetadata/<TypeNameWithout__mdt>.<RecordDeveloperName>.md-meta.xml.
customMetadata/Partner_Tier.Bronze_AMER.md-meta.xmlThe __mdt suffix in the filename also deploys and creates a real record, so it is tolerated — but
Salesforce's retrieve normalizes to the no-suffix form, so always write it without __mdt to avoid git
churn (detail in references/cmdt-records.md).
All three are mandatory on the root element — xsi:type on values will not resolve without them.
<CustomMetadata xmlns="http://soap.sforce.com/2006/04/metadata"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">xsi:type mapping — every value needs one| Field type | Correct xsi:type | Example value |
|---|---|---|
| Checkbox | xsd:boolean | true |
| Date | xsd:date | 2024-01-15 |
| DateTime | xsd:dateTime | 2024-01-15T10:30:00.000Z |
| Number, Percent | xsd:double | 42.0 |
| Text, TextArea, LongTextArea | xsd:string | some text |
| Email, Phone, Url | xsd:string | a@b.com |
| Picklist | xsd:string | Beta |
MetadataRelationship → EntityDefinition | xsd:string | Account |
MetadataRelationship → FieldDefinition | xsd:string | Account.Name |
| any type, null | no xsi:type — write <value xsi:nil="true"/> |
A value pointing at another __mdt type via MetadataRelationship was not verified — expect
xsd:string with the target's DeveloperName, but confirm.
xsd:picklist must not be emitted — CRITICALSalesforce's own documentation tells you to use xsd:picklist for Picklist fields. It is wrong — it is
not a valid XML Schema type. Instead of a clean validation error, the platform fails the entire deploy
server-side with no component-level diagnostics, taking every other component down with it. Always emit
xsd:string for a Picklist field's value; never xsd:picklist. See references/cmdt-records.md §2.
<label> is required. Omitting it gives Required fields are missing: [MasterLabel] — note it reports
the sObject field name MasterLabel, not label.<protected> is optional and defaults to false.<fullName> inside a <values> block — it is a hard parse error.<value xsi:nil="true"/> works on optional fields. On a required field it is rejected exactly as if
the field were absent. Omitting xsi:type on a non-nil value is always fatal, including for text fields.CORRECT — a complete record:
<?xml version="1.0" encoding="UTF-8"?>
<CustomMetadata xmlns="http://soap.sforce.com/2006/04/metadata"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<label>Bronze AMER</label>
<protected>false</protected>
<values>
<field>Discount_Percent__c</field>
<value xsi:type="xsd:double">5.0</value>
</values>
<values>
<field>Region__c</field>
<value xsi:type="xsd:string">AMER</value>
</values>
<values>
<field>Effective_Date__c</field>
<value xsi:type="xsd:date">2024-01-15</value>
</values>
<values>
<field>Notes__c</field>
<value xsi:nil="true"/>
</values>
</CustomMetadata>The name is the second segment of the filename. It must begin with a letter, contain only alphanumerics and underscores, not end with an underscore, not contain two consecutive underscores, and be at most 40 characters. Violations give:
Custom Metadata Record Name: The <Type>__mdt API Name can only contain underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.Over 40 characters gives Value too long for field: fullName maximum length is:40 (no space after the colon).
No ordering constraint — the type and every referenced field only need to resolve (already in the org,
or present in the same deploy). Two failures tell you what is missing:
Custom metadata type <Type>__mdt is not available in this organization. (the type is missing) and
<Type>__mdt: could not find fields: <Field>__c (the type exists but the field does not).
→ Full record-value error catalog and the xsi:type coercion asymmetry: references/cmdt-records.md.
Record data arrives three ways; in each case emit one <Type>.<Record>.md-meta.xml per row, mapping
columns to <field>/<value> pairs with the right xsi:type:
Derive every DeveloperName deterministically from the key column or label — never free-hand one. For each
row, run scripts/sanitize-developer-name.sh "<LABEL>" <ROW> before writing its record file (same input →
same valid name; empty/all-symbol/non-Latin labels fall back to Record_<ROW>).
The transform is many-to-one — United States and United-States both yield United_States, and since
each record is <Type>.<DeveloperName>.md-meta.xml, a collision silently overwrites a row. After deriving the
whole batch, check duplicates before writing; on any collision stop and report the colliding source
labels rather than overwrite (append a deterministic _2/_3 suffix only if the user asks to auto-resolve).
Ordered algorithm, ASCII-only limitation, uniqueness check, and worked examples: references/cmdt-records.md §7.
Records are read through the generated typed class — no SOQL, no query rows consumed, safe in loops and triggers:
Map<String, Partner_Tier__mdt> all = Partner_Tier__mdt.getAll();
Partner_Tier__mdt bronze = Partner_Tier__mdt.getInstance('Bronze_AMER'); // by DeveloperNameAccessor truncation — CRITICAL for LongTextArea. getAll()/getInstance() return only the first
255 characters of any field; longer LongTextArea values are silently truncated for those callers and
must be read via SOQL (SELECT ... FROM Partner_Tier__mdt). Say so whenever you put a LongTextArea on a
CMDT.
Before generating, confirm a CMDT is what the user needs.
| If the config is… | Use | Why |
|---|---|---|
| Reference data that must deploy between orgs with its records | CMDT (this skill) | Records are metadata |
| An admin-maintained mapping / lookup / crosswalk table (field↔field, code↔code, "map A to B") | CMDT (this skill) | Editable reference data, one record per pair |
| Admin-editable per profile/user, or org-local | platform-custom-setting-generate | Values are data and stay in one org |
| Business records users create and edit at runtime | platform-custom-object-generate | CMDT records are not transactional data |
| Translatable UI text | Custom Label — not generated here | Labels are the translation surface |
| Credentials, API keys, tokens | Named Credential / External Credential — not generated here | See Section 6 |
| A permission check in Apex or a flow | Custom Permission — not generated here | Boolean access belongs in the permission model |
The distinction that matters most: CMDT records deploy, custom setting values do not. If the user needs admins to edit values per profile at runtime, that is a custom setting, not a CMDT.
Field-mapping and lookup tables are a canonical CMDT use case. When a user asks to "map fields from A to B," maintain a code-to-code lookup, or keep a crosswalk admins can edit, model it as a CMDT — one record per pair (e.g.
Lead_Field__c/Target_Field__c, orMetadataRelationshipfields toFieldDefinition) — never a hardcoded ApexMap, constant, or Flow decision. Phrasing like "for conversion" or "for our integration" does not make it code: if admins maintain the pairs without a deploy, it is CMDT reference data.
Protected and PackageProtected are org-type dependentBoth deploy only in a developer, sandbox, or scratch org. Anywhere else:
You can't set the visibility for a Custom Metadata Type to Protected unless you are in a developer, sandbox, or scratch org.PackageProtected gives the same string with PackageProtected substituted. The failure is confirmed in a
production-like org; that these values succeed in a dev, sandbox, or scratch org is taken from the message
text rather than separately tested.
If Protected fails because of the org type, never "fix" it by switching to Public. Stop and tell the
user. A silent downgrade turns a deliberate confidentiality choice into a world-readable component with a
green deploy and no warning — the worst possible outcome, because nothing signals that anything changed.
Report the situation instead: the org does not permit Protected, so the options are to deploy to a
dev/sandbox/scratch org or to accept Public. Let the user choose.
This applies to any narrowing of visibility, not only this error.
A CMDT is not a secret store. Protected restricts access from outside the namespace, but it is not
encryption and it does not protect the value from code or admins inside it.
When a user asks to store an API key, password, token, client secret, or certificate in a CMDT:
Protected is not encryption.Protected visibility where the org
allows it, and keep the warning in the response. Do not silently refuse, and do not silently obey.The two rules compose, and the order matters. If the user insists on a CMDT for a secret and the org
rejects Protected, the no-silent-downgrade rule is what prevents the key from landing in a Public
component. Stop and report — never downgrade a secret-bearing type to Public.
Every type- and field-level error string is stated inline in Sections 2–4, next to the mistake that causes
it (Cannot specify: <element> for Custom Metadata Type, the unsupported-type string, Invalid data type.
for a formula, Field manageability cannot be set on this entity., the MetadataRelationship controlling-
field and self-lookup errors, and the Must specify a non-empty plural label case).
The full verbatim record-value catalog — every wrong-xsi:type rejection, Required fields are missing: [MasterLabel], nil-on-required, the DeveloperName rules, and the exact-text traps (field named by Label not
API name, the doubled space and i.g. typo in the no-xsi:type error, maximum length is:40 with no
space) — is in references/cmdt-records.md.
One matching caution: the suffix here is for Custom Metadata Type (spaced, title case); custom settings
use for CustomSettings. Do not assume a shared template when matching these strings.
<label>, <pluralLabel>, and <visibility> all present?<description> present and specific?<sharingModel>, <nameField>, and <deploymentStatus> ABSENT?<enableActivities>, <enableReports>, <enableHistory>, and <enableSearch> ABSENT?__mdt?Currency absent? (unsupported here — use Number)<formula> element absent?<type>Lookup</type> absent, written as MetadataRelationship instead? CRITICAL — Lookup deploys silently and is rewrittenFieldDefinition relationships, is <metadataRelationshipControllingField> present?MetadataRelationship point at its own parent type?<fieldManageability> omitted unless a non-default value was requested?<Type>.<Record>.md-meta.xml without __mdt?xmlns, xmlns:xsd, xmlns:xsi) on the root element?<value> carry an xsi:type?xsi:type="xsd:picklist" absent everywhere? (crashes the whole deploy — use xsd:string)xsi:type match the field type per the Section 4 table?<label> present on every record?<fullName> absent from every <values> block?xsi:nil="true"?sort | uniq -d), with any collision reported rather than silently overwriting a row? CRITICAL — a collision loses a record with no deploy error<field> name a field that exists on the type or is in this deploy?getAll() / getInstance(developerName)?LongTextArea, was the user warned the accessors truncate to 255 characters and that SOQL is needed for the full value?Protected left intact rather than silently downgraded to Public on an org-type failure?platform-custom-setting-generate recommended instead?platform-custom-object-generate recommended instead?| File | When to read |
|---|---|
references/cmdt-records.md | Debugging a CMDT record deploy — full verbatim record-value error catalog, the type-coercion asymmetry (which xsi:type mismatches the platform silently accepts), and worked record examples |
© forcedotcom, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files (scripts, references) in skills/platform-custom-metadata-type-generate of forcedotcom/sf-skills.
Open the folder on GitHubat commit e5164d9
Platform Custom Metadata Type Generate next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Platform Custom Metadata Type Generate this skillforcedotcom/sf-skills | 1.1k | — | ~5.6k | Automated safety check: Pass | Apache-2.0 | |
| Soql Lib Query Builderbeyond-the-cloud-dev/soql-lib | 154 | — | ~4.3k | Automated safety check: Pass | MIT | |
| Sf DatacloudJaganpro/sf-skills | 424 | — | ~2.7k | Automated safety check: Pass | MIT | |
| Soql Lib Selectorbeyond-the-cloud-dev/soql-lib | 154 | — | ~2k | Automated safety check: Pass | MIT | |
| Dev SetupPortwood-Global-Solutions/Portwood | 125 | — | ~1.1k | Automated safety check: Pass | Apache-2.0 | |
| Sf FlowJaganpro/sf-skills | 424 | — | ~1.8k | Automated safety check: Pass | MIT |
beyond-the-cloud-dev/soql-lib
Builds Salesforce SOQL queries using the SOQL Lib fluent builder API (SOQL.cls).
Jaganpro/sf-skills
Salesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows.
beyond-the-cloud-dev/soql-lib
Creates Salesforce Apex selector classes using the SOQL Lib selector pattern.
Portwood-Global-Solutions/Portwood
Get from a fresh clone of Portwood to a working, fully-tested Salesforce org.
Jaganpro/sf-skills
Creates and validates Salesforce Flows with 110-point scoring.
gmapsscraper/google-maps-agent-skills
Export Google Maps business data to CSV, JSON, or CRM format (HubSpot, Pipedrive, Salesforce).
forcedotcom/sf-skills
Declared architecture snapshot for one Agentforce agent: planner, topics, actions, flows, Apex, prompt templates, and NGA plugins.
forcedotcom/sf-skills
Data Cloud 360° view of a single Agentforce session. An agent skill from forcedotcom/sf-skills.
forcedotcom/sf-skills
Apply a Salesforce sandbox post-copy automation JSON config against a target org.
forcedotcom/sf-skills
Apply a Salesforce sandbox post-copy automation JSON config against a target org.
forcedotcom/sf-skills
Apply SLDS-compliant UI using the correct blueprints, styling hooks, utility classes, and icons.
forcedotcom/sf-skills
Lightning Web Components with PICKLES methodology and 165-point scoring.
Works with
Categories
A skill your agent uses to create, generate, or validate Salesforce Custom Metadata Type metadata — the mdt object, fields, and deployable records. Platform Custom Metadata Type Generate is an agent skill from forcedotcom/sf-skills. Use to create, generate, or validate Salesforce Custom Metadata Type metadata — the mdt object, fields, and deployable records.
Platform Custom Metadata Type Generate fits situations like: validate Salesforce Custom Metadata Type metadata — the mdt object; deployable records; custom metadata types; .md-meta.xml files.
Run `npx skills add forcedotcom/sf-skills --skill platform-custom-metadata-type-generate -a claude-code`. Or copy the skill folder (skills/platform-custom-metadata-type-generate in forcedotcom/sf-skills) into .claude/skills/platform-custom-metadata-type-generate in your project. Claude Code loads it when a task matches its description.
Run `npx skills add forcedotcom/sf-skills --skill platform-custom-metadata-type-generate -a codex`. Or copy the skill folder (skills/platform-custom-metadata-type-generate in forcedotcom/sf-skills) into .agents/skills/platform-custom-metadata-type-generate in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add forcedotcom/sf-skills --skill platform-custom-metadata-type-generate -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/platform-custom-metadata-type-generate, .gemini/skills/platform-custom-metadata-type-generate, .github/skills/platform-custom-metadata-type-generate and .opencode/skills/platform-custom-metadata-type-generate in your project.
Going by SKILL.md and its folder, Platform Custom Metadata Type Generate needs a shell for the scripts in its folder. Our summary lists: A Bash shell.
SKILL.md names 2 domains. In commands or code: soap.sforce.com and w3.org; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Platform Custom Metadata Type Generate is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 5.6k tokens (SKILL.md is roughly 23k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.6k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Platform Custom Metadata Type Generate: Soql Lib Query Builder (beyond-the-cloud-dev/soql-lib, 154 stars), Sf Datacloud (Jaganpro/sf-skills, 424 stars), Soql Lib Selector (beyond-the-cloud-dev/soql-lib, 154 stars) and Dev Setup (Portwood-Global-Solutions/Portwood, 125 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
forcedotcom (a GitHub organization) maintains it in forcedotcom/sf-skills, which has 1,060 GitHub stars. The repository holds 251 skills in this directory. The repository was last updated on October 7, 2026.
Source: forcedotcom/sf-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.