kugamon/salesforce-core-skills / plugins/salesforce-core/skills/sf-metadata
sf-metadata
VerifiedSalesforce metadata operations expert. Use when creating custom objects, fields, validation rules, record types, permission sets, or querying org metadata structures via a Salesforce MCP server. Do NOT use for comparing metadata across two orgs (use sf-orgdiff), Named or External Credentials and Platform Events (use sf-integration), or querying and loading records (use sf- data). Usage: /sf-metadata [create|update|delete|describe] {ObjectName|FieldName|type} ...
assets/fields/rollup-summary-field.xml
View on GitHub<?xml version="1.0" encoding="UTF-8"?>
<!--
Roll-Up Summary Field Template
Usage: Aggregate child records (only on Master-Detail parent)
Placeholders:
- {{FIELD_API_NAME}} - API name ending in __c (e.g., "Total_Amount__c")
- {{FIELD_LABEL}} - User-friendly label (e.g., "Total Amount")
- {{SUMMARIZED_OBJECT}} - Child object API name (e.g., "Line_Item__c")
- {{SUMMARY_TYPE}} - SUM, COUNT, MIN, or MAX
- {{SUMMARIZED_FIELD}} - Field to aggregate (for SUM, MIN, MAX)
- {{FILTER_CRITERIA}} - Optional filter (XML block)
- {{PRECISION}} - Total digits (for currency/number results)
- {{SCALE}} - Decimal places
- {{DESCRIPTION}} - Field purpose
- {{HELP_TEXT}} - Inline help for users
Summary Type Options:
- COUNT: Count of child records (no field needed)
- SUM: Sum of numeric field values
- MIN: Minimum value
- MAX: Maximum value
Notes:
- Only available on Master-Detail parent objects
- Cannot summarize formula fields (except cross-object formulas)
- Cannot summarize Long Text Area or Multi-Select Picklist
- For Lookup relationships, use DLRS or trigger-based calculation
-->
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>{{FIELD_API_NAME}}</fullName>
<label>{{FIELD_LABEL}}</label>
<type>Summary</type>
<summarizedField>{{SUMMARIZED_OBJECT}}.{{SUMMARIZED_FIELD}}</summarizedField>
<summaryForeignKey>{{SUMMARIZED_OBJECT}}.{{MASTER_DETAIL_FIELD}}</summaryForeignKey>
<summaryOperation>{{SUMMARY_TYPE}}</summaryOperation>
<!-- Include precision/scale for SUM, MIN, MAX on numeric fields -->
<precision>{{PRECISION}}</precision>
<scale>{{SCALE}}</scale>
<description>{{DESCRIPTION}}</description>
<inlineHelpText>{{HELP_TEXT}}</inlineHelpText>
<trackHistory>false</trackHistory>
<trackTrending>false</trackTrending>
<!--
Optional: Filter criteria (only aggregate records matching criteria)
<summaryFilterItems>
<field>{{SUMMARIZED_OBJECT}}.Status__c</field>
<operation>equals</operation>
<value>Completed</value>
</summaryFilterItems>
-->
</CustomField>
<!--
Examples:
COUNT all line items:
<summaryOperation>count</summaryOperation>
(no summarizedField needed)
SUM of Amount:
<summaryOperation>sum</summaryOperation>
<summarizedField>Line_Item__c.Amount__c</summarizedField>
MAX Close Date:
<summaryOperation>max</summaryOperation>
<summarizedField>Opportunity__c.CloseDate</summarizedField>
With Filter (only Won opportunities):
<summaryFilterItems>
<field>Opportunity__c.StageName</field>
<operation>equals</operation>
<value>Closed Won</value>
</summaryFilterItems>
-->
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |