/platform-report-generate
Use this skill when users need to create, generate, or validate Salesforce Lightning Report metadata. Trigger when users mention reports, creating reports, report metadata, .report-meta.xml files, tabular reports, summary reports, matrix reports, joined reports, report columns,
$ npx -y skills add forcedotcom/sf-skills --skill platform-report-generate --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/platform-report-generate
Context preview
The summary Claude sees to decide when to auto-load this skill.
Use this skill when users need to create, generate, or validate Salesforce Lightning Report metadata. Trigger when users mention reports, creating reports, report metadata, .report-meta.xml files, tabular reports, summary reports, matrix reports, joined reports, report columns,
SKILL.md
platform-report-generate.SKILL.mdname: platform-report-generate
description: "Use this skill when users need to create, generate, or validate Salesforce Lightning Report metadata. Trigger when users mention reports, creating reports, report metadata, .report-meta.xml files, tabular reports, summary reports, matrix reports, joined reports, report columns, report groupings, report filters, report charts, cross-filters, bucket fields, report formulas, or report time frame filters. Also use when users say things like 'create a report', 'generate a report', 'build a report on Accounts', 'add a chart to my report', or when they encounter deployment errors for .report-meta.xml files. Do NOT trigger for: creating or modifying Custom Report Type metadata (.reportType-meta.xml — use platform-custom-report-type-generate), creating dashboards, creating list views, running or viewing existing reports in the UI, or SOQL queries."
metadata:
version: "1.0"
minApiVersion: "60.0"
relatedSkills:
- "platform-custom-report-type-generate"
mcpTools:
salesforce-api-context:
tools: ["get_metadata_type_sections", "get_metadata_type_context", "get_metadata_type_shape"]
semver: ">=1.0.0"Overview
Lightning Reports define how Salesforce data is queried, grouped, filtered, and displayed. Each report is a single `.report-meta.xml` file placed under `reports/<FolderName>/` within the project's source directory (check `sfdx-project.json` → `packageDirectories[].path` for the source root).
Critical Rules (Read First)
**TOP DEPLOYMENT KILLERS — check these BEFORE generating any report:** 1. **Grouping fields in columns** — Fields in `<groupingsDown>` or `<groupingsAcross>` must NEVER also appear in `<columns>` 2. **Wrong column names** — Column names are report-type-specific. ALWAYS call MCP tools to verify (see `references/column-names.md`) 3. **Wrong scope** — LeadList uses `org`, not `organization` 4. **Filter column dot notation** — Filter `<column>` values use FLAT names (`INDUSTRY`, `TYPE`) NOT dot notation (`ACCOUNT.INDUSTRY` is INVALID) 5. **Multi-value picklist filters** — Use ONE `<criteriaItems>` with comma-separated `<value>` (e.g., `Technology,Financial Services`). Do NOT split into multiple criteriaItems with booleanFilter
Rule 1: Format Determines Required Elements
| Format | `<groupingsDown>` | `<groupingsAcross>` | `<block>` | |--------|-------------------|---------------------|-----------| | `Tabular` | Not allowed | Not allowed | No | | `Summary` | At least 1 (max 3) | Not allowed | No | | `Matrix` | At least 1 (max 3) | At least 1 (max 3) | No | | `Joined` | Not at top level | Not at top level | At least 2 (max 5) |
Rule 2: Use Platform Column Names
Report metadata uses **platform report column names**, NOT raw API field names. **ALWAYS call `get_metadata_type_sections` or `get_metadata_type_context` to confirm valid column names.** See `references/column-names.md` for common mappings per report type.
Rule 3: Valid Report Type Required
`<reportType>` must be a standard API name (e.g., `Opportunity`, `AccountList`, `CaseList`, `LeadList`, `AccountContactRole`) or a deployed custom report type developer name.
Rule 4–5: Chart & Aggregates Require Summary/Matrix
Charts and `<aggregateTypes>` (Sum, Average, etc.) only work in Summary and Matrix reports.
Rule 6–8: Limits
- Max **3 cross-filters** per report, each with up to **5 criteria items**
- `<filterLogic>` must reference all filters sequentially (e.g., `1 AND (2 OR 3)`)
- Joined reports: 2–5 blocks, each block format must be Summary or Matrix (not Tabular)
Rule 9: Folder Structure
Reports must live inside a folder with a corresponding folder metadata file:
<sourceDir>/reports/<FolderName>/<ReportName>.report-meta.xml
<sourceDir>/reports/<FolderName>-meta.xml
Determine `<sourceDir>` from `sfdx-project.json` (commonly `force-app/main/default`, but this is configurable).
Rule 10–11: Date Columns & Scope
- Date columns use platform names (`CLOSE_DATE`, not `CloseDate`)
- LeadList scope is `org`; Opportunity/AccountList/CaseList use `organization`
Rule 12–13: Description & Groupings
- `<description>` max **255 characters**
- Grouping fields must NOT appear in `<columns>` — automatic deployment failure
Rule 14: Folder Metadata Requires `<sharedTo>`
<?xml version="1.0" encoding="UTF-8"?>
<ReportFolder xmlns="http://soap.sforce.com/2006/04/metadata">
<folderShares>
<accessLevel>Manage</accessLevel>
<sharedTo>AllInternalUsers</sharedTo>
<sharedToType>Group</sharedToType>
</folderShares>
<name>My Report Folder</name>
</ReportFolder>Rule 15: Valid Date Intervals Only
Use `INTERVAL_CURRENT` for "this quarter", `INTERVAL_CURY` for "this year", `INTERVAL_LAST30` for last 30 days. Do NOT use `INTERVAL_CURQ` — it is not valid. See `references/date-intervals.md` for the full list.
Top-Level Elements
| Element | Required | Notes | |---------|----------|-------| | `<name>` | Yes | Report name (max 40 chars) | | `<reportType>` | Yes | Report type API name | | `<format>` | Yes | `Tabular`, `Summary`, `Matrix`, or `Joined` | | `<scope>` | Recommended | `organization` (or `org` for LeadList) | | `<columns>` | Yes | Field columns — each has `<field>` and optional `<aggregateTypes>` | | `<filter>` | No | Contains `<criteriaItems>` with `<column>`, `<operator>`, `<value>` | | `<groupingsDown>` | Conditional | Row groupings: `<field>`, `<dateGranularity>`, `<sortOrder>` | | `<groupingsAcross>` | Conditional | Column groupings (Matrix only) | | `<timeFrameFilter>` | Recommended | `<dateColumn>`, `<interval>`, optional `<startDate>`/`<endDate>` | | `<chart>` | No | See `references/chart-types.md` | | `<buckets>` | No | Bucket field definitions | | `<crossFilters>` | No | Cross-object filters (`with`/`without`) | | `<showDetails>` | Recommended | `true`/`false` | | `<showGrandTotal>` | Recommended | `true`/`false` | | `<showSubTotals>` | Recommend
Read more
name: platform-report-generate
description: "Use this skill when users need to create, generate, or validate Salesforce Lightning Report metadata. Trigger when users mention reports, creating reports, report metadata, .report-meta.xml files, tabular reports, summary reports, matrix reports, joined reports, report columns, report groupings, report filters, report charts, cross-filters, bucket fields, report formulas, or report time frame filters. Also use when users say things like 'create a report', 'generate a report', 'build a report on Accounts', 'add a chart to my report', or when they encounter deployment errors for .report-meta.xml files. Do NOT trigger for: creating or modifying Custom Report Type metadata (.reportType-meta.xml — use platform-custom-report-type-generate), creating dashboards, creating list views, running or viewing existing reports in the UI, or SOQL queries."
metadata:
version: "1.0"
minApiVersion: "60.0"
relatedSkills:
- "platform-custom-report-type-generate"
mcpTools:
salesforce-api-context:
tools: ["get_metadata_type_sections", "get_metadata_type_context", "get_metadata_type_shape"]
semver: ">=1.0.0"Overview
Lightning Reports define how Salesforce data is queried, grouped, filtered, and displayed. Each report is a single `.report-meta.xml` file placed under `reports/<FolderName>/` within the project's source directory (check `sfdx-project.json` → `packageDirectories[].path` for the source root).
Critical Rules (Read First)
**TOP DEPLOYMENT KILLERS — check these BEFORE generating any report:** 1. **Grouping fields in columns** — Fields in `<groupingsDown>` or `<groupingsAcross>` must NEVER also appear in `<columns>` 2. **Wrong column names** — Column names are report-type-specific. ALWAYS call MCP tools to verify (see `references/column-names.md`) 3. **Wrong scope** — LeadList uses `org`, not `organization` 4. **Filter column dot notation** — Filter `<column>` values use FLAT names (`INDUSTRY`, `TYPE`) NOT dot notation (`ACCOUNT.INDUSTRY` is INVALID) 5. **Multi-value picklist filters** — Use ONE `<criteriaItems>` with comma-separated `<value>` (e.g., `Technology,Financial Services`). Do NOT split into multiple criteriaItems with booleanFilter
Rule 1: Format Determines Required Elements
| Format | `<groupingsDown>` | `<groupingsAcross>` | `<block>` | |--------|-------------------|---------------------|-----------| | `Tabular` | Not allowed | Not allowed | No | | `Summary` | At least 1 (max 3) | Not allowed | No | | `Matrix` | At least 1 (max 3) | At least 1 (max 3) | No | | `Joined` | Not at top level | Not at top level | At least 2 (max 5) |
Rule 2: Use Platform Column Names
Report metadata uses **platform report column names**, NOT raw API field names. **ALWAYS call `get_metadata_type_sections` or `get_metadata_type_context` to confirm valid column names.** See `references/column-names.md` for common mappings per report type.
Rule 3: Valid Report Type Required
`<reportType>` must be a standard API name (e.g., `Opportunity`, `AccountList`, `CaseList`, `LeadList`, `AccountContactRole`) or a deployed custom report type developer name.
Rule 4–5: Chart & Aggregates Require Summary/Matrix
Charts and `<aggregateTypes>` (Sum, Average, etc.) only work in Summary and Matrix reports.
Rule 6–8: Limits
- Max **3 cross-filters** per report, each with up to **5 criteria items**
- `<filterLogic>` must reference all filters sequentially (e.g., `1 AND (2 OR 3)`)
- Joined reports: 2–5 blocks, each block format must be Summary or Matrix (not Tabular)
Rule 9: Folder Structure
Reports must live inside a folder with a corresponding folder metadata file:
<sourceDir>/reports/<FolderName>/<ReportName>.report-meta.xml <sourceDir>/reports/<FolderName>-meta.xml
Determine `<sourceDir>` from `sfdx-project.json` (commonly `force-app/main/default`, but this is configurable).
Rule 10–11: Date Columns & Scope
- Date columns use platform names (`CLOSE_DATE`, not `CloseDate`)
- LeadList scope is `org`; Opportunity/AccountList/CaseList use `organization`
Rule 12–13: Description & Groupings
- `<description>` max **255 characters**
- Grouping fields must NOT appear in `<columns>` — automatic deployment failure
Rule 14: Folder Metadata Requires `<sharedTo>`
<?xml version="1.0" encoding="UTF-8"?>
<ReportFolder xmlns="http://soap.sforce.com/2006/04/metadata">
<folderShares>
<accessLevel>Manage</accessLevel>
<sharedTo>AllInternalUsers</sharedTo>
<sharedToType>Group</sharedToType>
</folderShares>
<name>My Report Folder</name>
</ReportFolder>Rule 15: Valid Date Intervals Only
Use `INTERVAL_CURRENT` for "this quarter", `INTERVAL_CURY` for "this year", `INTERVAL_LAST30` for last 30 days. Do NOT use `INTERVAL_CURQ` — it is not valid. See `references/date-intervals.md` for the full list.
Top-Level Elements
| Element | Required | Notes | |---------|----------|-------| | `<name>` | Yes | Report name (max 40 chars) | | `<reportType>` | Yes | Report type API name | | `<format>` | Yes | `Tabular`, `Summary`, `Matrix`, or `Joined` | | `<scope>` | Recommended | `organization` (or `org` for LeadList) | | `<columns>` | Yes | Field columns — each has `<field>` and optional `<aggregateTypes>` | | `<filter>` | No | Contains `<criteriaItems>` with `<column>`, `<operator>`, `<value>` | | `<groupingsDown>` | Conditional | Row groupings: `<field>`, `<dateGranularity>`, `<sortOrder>` | | `<groupingsAcross>` | Conditional | Column groupings (Matrix only) | | `<timeFrameFilter>` | Recommended | `<dateColumn>`, `<interval>`, optional `<startDate>`/`<endDate>` | | `<chart>` | No | See `references/chart-types.md` | | `<buckets>` | No | Bucket field definitions | | `<crossFilters>` | No | Cross-object filters (`with`/`without`) | | `<showDetails>` | Recommended | `true`/`false` | | `<showGrandTotal>` | Recommended | `true`/`false` | | `<showSubTotals>` | Recommend
This repository provides a curated collection of Salesforce agent skills for building applications.
Repo: forcedotcom/sf-skills
Other skills on sf-skills.
- /agentforce-generate
Build, modify, optimize, debug, and deploy agents with Agentforce Agent Script. TRIGGER when: user creates, modifies, optimizes, or asks about .agent files or aiAuthoringBundle metadata; changes agent behavior, responses, or conversation logic; designs agent actions, tools,
Open skill - /agentforce-observe
Analyze production Agentforce agent behavior using session traces and Data Cloud. TRIGGER when: user queries STDM session data or Data Cloud trace records; investigates production agent failures, regressions, or performance issues; asks about session traces, conversation logs,
Open skill - /agentforce-test
Write, run, and analyze structured test suites for Agentforce agents — functional AND security. TRIGGER when: user writes or modifies test spec YAML (AiEvaluationDefinition); runs sf agent test create, run, run-eval, or results commands; asks about test coverage strategy, metric
Open skill - /automation-flow-generate
Generate Salesforce Flows using the MCP tool execute_metadata_action. Use when the user asks to create, build, or generate a flow — including Screen, Autolaunched, Record-Triggered (before/after-save), Scheduled. Also trigger for flow-like requests such as \"when a record is
Open skill - /dx-code-analyzer-configure
Set 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
Open skill - /dx-code-analyzer-custom-rule-create
Create 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
Open skill

