/sf-platform:platform-value-set-generatefrom Salesforce — Platform & Apex
Generates and validates Salesforce GlobalValueSet (reusable picklist) and StandardValueSet (customizing built-in picklists like Industry, Lead Source). Handles .globalValueSet-meta.xml and .standardValueSet-meta.xml.
Ships in Salesforce — Platform & Apex. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Generates and validates the two reusable picklist value-set metadata types — GlobalValueSet (a new reusable set shared across fields) and StandardValueSet (customizing a built-in catalog picklist like Industry or Lead Source) — and wires a CustomField to one via <valueSetName>.
For authoritative Metadata API type, field, and enum details beyond this skill, use the platform-metadata-api-context-get skill.
platform-custom-field-generate (inline <valueSetDefinition>). Generating the field that references a value set is also platform-custom-field-generate's job; this skill produces the value set itself.Two different metadata types — do not confuse them:
| Concern | GlobalValueSet | StandardValueSet |
|---|---|---|
| Folder | globalValueSets/ | standardValueSets/ |
| File suffix | .globalValueSet-meta.xml | .standardValueSet-meta.xml |
| Root element | <GlobalValueSet> | <StandardValueSet> |
| Name source | filename (dev name) | <fullName> = fixed catalog name |
| Value element | <customValue> | <standardValue> |
| Can add NEW values? | Yes | Yes — copy the attribute pattern of an existing value |
| Can create a new NAME? | Yes | No — only the fixed catalog |
* wildcard in package.xml | Supported | Not supported |
This document defines the mandatory constraints for generating value-set metadata XML. The agent must verify these constraints before outputting XML to prevent Metadata API deployment errors.
File: globalValueSets/<DeveloperName>.globalValueSet-meta.xml
The developer name comes from the filename, not a <fullName> tag.
| Element | Requirement | Notes |
|---|---|---|
<masterLabel> | Required | UI label for the value set |
<sorted> | Required | true = alphabetize values in the UI; false = preserve listed order |
<customValue> | Required (≥1) | One per value (see below) |
<customValue> Sub-Elements| Sub-element | Requirement | Notes |
|---|---|---|
<fullName> | Required | The value's API name. Use the value text as the user spelled it — spaces are allowed and must be preserved (e.g. Closed Won, not Closed_Won). Must start with a letter. This is a value name, NOT a field API name, so do not append __c or replace spaces with underscores. |
<default> | Optional | At most one value true. Omit it (or use false) on the rest — it is not required on every value. |
<label> | Required | UI label for the value |
<color> | Optional | Hex color, e.g. #FF0000 |
<isActive> | Optional | Omit (active) or false to deactivate |
<description> | Optional | Per-value description |
__gvs Suffix — do NOT use it in metadataRule: reference a GlobalValueSet by its bare developer name. Never add __gvs.
In API 57.0+ orgs the platform stores/displays a GlobalValueSet's developer name with a __gvs suffix internally, but the Metadata API (deploy and retrieve) always uses the bare name — <valueSetName>Priority_Levels</valueSetName>, not Priority_Levels__gvs. The suffix was briefly emitted by a Winter '23 change that caused deploy failures and was patched out. So:
globalValueSets/Priority_Levels.globalValueSet-meta.xml — no __gvs in the filename.<valueSetName>Priority_Levels</valueSetName> — no __gvs.Priority_Levels__gvs in the org or you see a "returned from org but not found in local project" warning, that's the expected org-storage display — keep your local metadata on the bare name.<?xml version="1.0" encoding="UTF-8"?>
<GlobalValueSet xmlns="http://soap.sforce.com/2006/04/metadata">
<masterLabel>Priority Levels</masterLabel>
<sorted>false</sorted>
<customValue>
<fullName>Critical</fullName>
<default>false</default>
<label>Critical</label>
</customValue>
<customValue>
<fullName>High</fullName>
<default>false</default>
<label>High</label>
</customValue>
<customValue>
<fullName>Medium</fullName>
<default>true</default>
<label>Medium</label>
</customValue>
<customValue>
<fullName>Low</fullName>
<default>false</default>
<label>Low</label>
</customValue>
</GlobalValueSet>
<GlobalValueSet xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Priority_Levels</fullName> <!-- WRONG: name comes from the filename -->
<masterLabel>Priority Levels</masterLabel>
<!-- WRONG: <sorted> is required and missing -->
<standardValue> <!-- WRONG: GVS uses <customValue>, not <standardValue> -->
<fullName>Critical</fullName>
</standardValue>
</GlobalValueSet>
Errors: missing required sorted; unknown element standardValue; root fullName is rejected because the name is derived from the filename.
File: standardValueSets/<Name>.standardValueSet-meta.xml
closed, forecastCategory, probability and won on OpportunityStage), because omitted attributes are filled with platform defaults that can be wrong.<fullName> whose value is the fixed enum name (e.g. Industry), NOT a masterLabel. The filename must match this name.<standardValue> entries — not <customValue>.<standardValue> block for every existing value, with the requested activations, deactivations, relabels or additions applied. A value you leave out is deactivated on the field: a deploy that named only Web in CaseOrigin left Email, Phone and Agentforce inactive. Never send only the named values, even when the set is large (for example all 30+ Industry entries). Request wording such as "keep only X active" means set X active and every other value inactive, so state that intent in the result. Verify by reading the set back and diffing it against the read taken before the write.<standardValue> — Modifiable Sub-Elements| Sub-element | Modifiable? | Notes |
|---|---|---|
<fullName> | Identifies the value | An existing value, or a new one you are adding |
<label> | Yes | Relabel the value's UI text |
<isActive> | Yes | false deactivates; omit or true keeps active |
<default> | Yes | At most one value true |
<groupingString> | Yes | Category grouping (used by some standard picklists) |
Industry, LeadSource, OpportunityStage, OpportunityType, AccountType, AccountRating, LeadStatus, CaseStatus, CaseOrigin, CasePriority, CaseReason, TaskStatus, TaskPriority, QuoteStatus, Product2Family, Salutation, AccountOwnership, ContractStatus, OrderStatus, PartnerRole.
Full appendix: the complete list of valid standard value set names is at
https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/standardvalueset_names.htm. If the name is not in that appendix, it is not a StandardValueSet — it is either a GlobalValueSet or an inline CustomField picklist.
<?xml version="1.0" encoding="UTF-8"?>
<StandardValueSet xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Industry</fullName>
<standardValue>
<fullName>Technology</fullName>
<default>false</default>
<label>Technology</label>
<isActive>true</isActive>
</standardValue>
<standardValue>
<fullName>Agriculture</fullName>
<default>false</default>
<label>Agriculture</label>
<isActive>false</isActive> <!-- deactivated, but kept in the set -->
</standardValue>
<!-- ... every other existing standardValue entry repeated unchanged ... -->
</StandardValueSet>
<StandardValueSet xmlns="http://soap.sforce.com/2006/04/metadata">
<masterLabel>Industry</masterLabel> <!-- WRONG: StandardValueSet uses <fullName>, not masterLabel -->
<customValue> <!-- WRONG: uses <standardValue>, not customValue -->
<fullName>Renewable Energy</fullName>
<label>Renewable Energy</label>
</customValue>
</StandardValueSet>
Errors: unknown element masterLabel/customValue for a StandardValueSet.
When customizing a StandardValueSet (or extending a shared GlobalValueSet), never invent the existing value list of a standard picklist. Existing values must be repeated exactly as the org has them, and a new value is added only when the request names it.
For well-known standard picklists you already know the canonical values (e.g. Industry, LeadSource, OpportunityStage). When you are unsure which values exist, you can confirm them against the live org — but treat lookup as a confirmation step, not a required first call:
search_metadata and query_metadata to look up live metadata. Use them to read the complete current set, because a write must repeat every existing value with its exact <fullName>/<label>.sf data query --use-tooling-api \
--query "SELECT MasterLabel, Metadata FROM StandardValueSet WHERE MasterLabel = '<name>'"
The point is the output, not the lookup: the written set must contain every existing value unchanged, plus only the changes the request names. Do not invent values the request did not ask for. (This pairs with rule 4 in §3: a write replaces the whole set.)
A picklist/multi-select CustomField references a value set via <valueSetName> inside <valueSet> (instead of an inline <valueSetDefinition>).
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Priority__c</fullName>
<label>Priority</label>
<type>Picklist</type>
<valueSet>
<restricted>true</restricted>
<valueSetName>Priority_Levels</valueSetName> <!-- bare developer name, NO __gvs; see §2 -->
</valueSet>
</CustomField>
<valueSetName> is the bare developer name (e.g. Priority_Levels) — never add __gvs. The suffix is an org-storage display artifact; the Metadata API uses the bare name for both deploy and retrieve (see §2).<valueSetDefinition> — choose one or the other.The agent must reject and explain — not silently "fix" by inventing metadata — the following:
| Violation | Action / Message |
|---|---|
| Create a NEW StandardValueSet name | Reject. The name must be in the standard catalog appendix. Otherwise it is a GlobalValueSet. |
| Value set developer name with spaces / invalid chars | Convert spaces to underscores; must start with a letter; alphanumeric + underscore only. Priority Levels → Priority_Levels. (This applies to the value SET name and the field API name — NOT to individual <customValue><fullName> values, which keep spaces as written.) |
Duplicate value fullName within one set | Reject. Each fullName must be unique within the value set. |
More than one <default>true</default> | Reject. At most one default value per set. |
"Add a
Cryptocurrencyvalue to the Industry picklist."
This is allowed. Read the complete current Industry set, then write it back with every existing value unchanged plus one new <standardValue> for Cryptocurrency. Copy the attribute pattern of an existing value in the set, because omitted attributes get platform defaults that can be wrong.
A value set must deploy before any CustomField that references it.
GlobalValueSet / StandardValueSet first, then the CustomField whose <valueSetName> points at it.valueSetName ... does not exist (or a "not found" error).package.xml: GlobalValueSet supports the * wildcard; StandardValueSet does not — list each standard set member explicitly.| Error / Symptom | Cause | Fix |
|---|---|---|
| Other values of a standard picklist became inactive after a deploy | The deploy listed only some values, and a write replaces the whole set | Resend the complete set with every existing value (§3 rule 4) |
Required field missing: sorted | GlobalValueSet missing <sorted> | Add <sorted>true</sorted> or <sorted>false</sorted> |
Unknown element masterLabel (StandardValueSet) | Used masterLabel instead of fullName | StandardValueSet root uses <fullName> = catalog name |
Unknown element customValue (StandardValueSet) | Used customValue instead of standardValue | Use <standardValue> in standard sets |
valueSetName ... does not exist | Field deployed before its value set, or __gvs wrongly added to the reference | Deploy the value set first; reference it by the bare developer name with NO __gvs (§2) |
| Duplicate value name | Two <customValue> entries share a fullName | Make each fullName unique within the set (spaces in a value name are allowed — do NOT underscore them) |
Before generating value-set XML, verify:
<GlobalValueSet> with namespace http://soap.sforce.com/2006/04/metadata?<masterLabel> present?<sorted> present (true or false)?<customValue>, each with <fullName> and <label> (at most one carrying <default>true</default>)?<fullName> (name comes from the filename)?<valueSetName> the bare developer name with NO __gvs suffix?search_metadata/query_metadata / Tooling API / retrieve) so every existing value is repeated exactly?<StandardValueSet> with the correct namespace?<fullName> set to the fixed catalog name (NOT masterLabel)?<standardValue> entries (NOT customValue)?<default>true</default>?fullNames unique within the set? (Spaces in a value name are fine — preserve them as written; only the value-SET developer name and field API name use underscores.)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub reej-consulting/reej-sf-skills --plugin sf-platform43 skills in this plugin
/crm-analytics-wave-generateUse to build a Wave Recipe, deploy a CRM Analytics dataset or dashboard, or author the full CRMA asset stack — apps, Wave Recipes (.wdpr), datasets, and dashboards — against a connected Salesforce org via REST and Metadata APIs, without CRM Analytics Studio or Dashboard Builder. TRIGGER when: user asks to build or create a Wave Recipe, generate a .wdpr or .wdpr-meta.xml, deploy a .wdash or .wapp, run a recipe or dataflowjob programmatically, upload CSV data via InsightsExternalData, validate a dataset schema with synthetic data, fetch dataset XMD, audit dashboard SAQL re-encoding, or find unused dataset fields. TRIGGER on keywords: Wave Recipe, CRMA, CRM Analytics, wdpr, wdash, wapp, WaveRecipe, Wave dataflow, dataflowjob, InsightsExternalData, SAQL, dataset XMD, Analytics Studio, R3 format, wave/recipes, wave/dashboards, or analytics on Salesforce objects (opportunities, leads, cases, accounts, sales). DO NOT TRIGGER for standard Salesforce reports or LWC components unrelated to CRM Analytics./design-systems-slds2-migrateMigrate Lightning Web Components from SLDS 1 to SLDS 2 by running the SLDS linter and fixing violations. Use this skill whenever users mention SLDS 2, SLDS uplift, linter violations, LWC token migration, class overrides, hardcoded CSS values that need SLDS hook replacement, or styling hook selection. Covers all styling hook categories — color, spacing, sizing, typography, borders, radius, and shadows. Also use when users mention no-hardcoded-values, no-slds-class-overrides, lwc-to-slds-hooks, no-deprecated-tokens-slds1, or ask about SLDS component migration — even if they don't explicitly say "uplift" or "migration"./design-systems-slds-validateAudit Lightning Web Components for SLDS design-system compliance and produce a scored quality report. Runs the SLDS linter and analyzes CSS for theming hook usage and pairing, scoring SLDS findings across categories into an overall grade. Use when asked to "score my component's SLDS", "SLDS scorecard", "SLDS quality report", "audit SLDS compliance", "how good is my SLDS", "check SLDS quality", "rate my SLDS styling", "evaluate my component's SLDS", "is this component's SLDS ready to ship?", "look at my LWC for SLDS issues", "audit SLDS before I submit", "review my component's SLDS before code review", or any time a user wants an SLDS quality assessment or SLDS production-readiness check on an LWC. Not for fixing violations (use design-systems-slds2-migrate), building new components (use design-systems-slds-apply), or accessibility/WCAG/ARIA audits (use experience-accessibility-validate)./dx-apexguru-scanRun an ApexGuru performance scan on a Salesforce Apex project via the ApexGuru SFAP Scan API. Zips the project's Apex (any layout), submits it, polls to completion, decodes the base64 report, and presents performance antipattern violations (SOQL in loop, DML in loop, Schema.getGlobalDescribe(), SOQL without WHERE/LIMIT, unused SOQL fields) grouped by rule with severity, file:line, and suggested fixes — clearly attributed as 'Static only' or 'Production insights'. TRIGGER when the user says 'run ApexGuru', 'ApexGuru scan', 'check Apex performance', 'find governor-limit / performance antipatterns', 'SOQL in loop', 'scan my Apex for performance', or 'ApexGuru performance insights'. DO NOT TRIGGER for general static analysis or security scans (use dx-code-analyzer-run), for fixing code without scanning, or for onboarding an org to ApexGuru./dx-code-analyzer-configureSet up, configure, and troubleshoot Salesforce Code Analyzer for any project. Handles installation, prerequisite checks, diagnosing broken setups, creating and editing code-analyzer.yml overrides, engine-specific settings, ignore patterns, severity overrides, and CI/CD pipeline setup. TRIGGER when: user says 'set up code analyzer', 'configure code analyzer', 'install code analyzer', 'code analyzer not working', 'fix my setup', 'scan failing', 'check my setup', 'enable/disable engine', 'exclude files', 'change severity', 'set up GitHub Actions', 'set up CI/CD', 'add to pipeline', 'pipeline fail', 'update my workflow', 'quality gate', 'fail on violations', 'scan changed files only', 'add SARIF', 'code-analyzer.yml', 'ESLint config', 'increase SFGE memory', or reports errors running Code Analyzer. DO NOT TRIGGER when: user wants to run a scan (use dx-code-analyzer-run), fix violations, explain rules, create custom rules (use dx-code-analyzer-custom-rule-create), or suppress violations./dx-code-analyzer-custom-rule-createCreate custom Code Analyzer rules for Regex (pattern matching), PMD (XPath/AST for Apex and metadata XML), and ESLint (LWC/JavaScript/TypeScript). Use when users want to enforce coding standards, ban patterns, detect hardcoded values, govern metadata, or add rules not in the built-in set. TRIGGER when: user says 'create a rule', 'ban System.debug', 'enforce naming convention', 'detect hardcoded IDs', 'custom rule', 'xpath rule', 'regex rule', 'add a PMD rule', 'enforce a policy', 'create a check for', 'flag this pattern', 'make a rule that catches', 'metadata rule', 'check permissions', 'enforce API version', 'eslint rule', 'lwc rule', 'override rule threshold', 'customize complexity', or describes a pattern to enforce. DO NOT TRIGGER when: user wants to run a scan (use dx-code-analyzer-run), configure engines (use dx-code-analyzer-configure), or explain existing rules (use dx-code-analyzer-run).3 plugins in 2 repositories ship this exact skill · first indexed Oct 24, 2026
Other plugins' skills for the same job