
Salesforce Report Generator
OfficialFreeEffortlessly create and validate Salesforce report metadata.
Free · Opens the source repo
What Salesforce Report Generator does
The Salesforce Report Generator skill is designed to assist users in creating, generating, and validating report metadata for Salesforce Lightning Reports. This skill is particularly useful for Salesforce developers and administrators who need to ensure that their report definitions adhere to the specific requirements of the Salesforce platform. By automating the generation of .report-meta.xml files, this skill streamlines the process of report creation, allowing users to focus on data analysis rather than metadata formatting.
When using this skill, users can trigger it by mentioning various report-related terms such as 'create a report', 'generate a report', or 'add a chart to my report'. The skill provides guidance on the critical rules for report creation, including the correct usage of grouping fields, column names, and filter operations. It also includes references to common pitfalls and deployment issues, ensuring that users can avoid common errors that might lead to report generation failures.
In addition to generating report metadata, the skill offers examples of different report formats, including tabular, summary, matrix, and joined reports. Users can refer to these examples to understand how to structure their reports correctly. The skill emphasizes the importance of using platform-specific column names and provides a workflow for gathering requirements, determining report formats, and authoring metadata based on user needs.
Overall, the Salesforce Report Generator skill is an essential tool for anyone involved in Salesforce reporting, providing a structured approach to report creation while minimizing the risk of errors in metadata configuration.
When to use it
Use this skill when you need to create or validate Salesforce Lightning Report metadata efficiently.
When not to use it
This skill is not suitable for creating custom report types, dashboards, or list views, nor for running existing reports in the UI.
What you can build with it
Creating a New Report
When tasked with generating a new report, use this skill to quickly create the necessary metadata without manual errors.
Validating Report Metadata
Before deploying reports, utilize this skill to validate the metadata against Salesforce requirements, ensuring successful deployment.
Troubleshooting Report Issues
If you encounter issues with report generation, this skill can guide you through troubleshooting common errors related to report metadata.
How to install Salesforce Report Generator
View source1. Install with the skills CLI
npx skills add forcedotcom/sf-skills/platform-report-generate --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by forcedotcomOverview
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:
- Grouping fields in columns — Fields in
<groupingsDown>or<groupingsAcross>must NEVER also appear in<columns> - Wrong column names — Column names are report-type-specific. ALWAYS call MCP tools to verify (see
references/column-names.md) - Wrong scope — LeadList uses
org, notorganization - Filter column dot notation — Filter
<column>values use FLAT names (INDUSTRY,TYPE) NOT dot notation (ACCOUNT.INDUSTRYis INVALID) - 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, notCloseDate) - LeadList scope is
org; Opportunity/AccountList/CaseList useorganization
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> | Recommended | true/false |
<description> | Recommended | Business purpose (max 255 chars) |
<block> | Conditional | Joined format blocks |
Filter Syntax
<filter>
<criteriaItems>
<column>STAGE_NAME</column>
<operator>equals</operator>
<value>Closed Won</value>
</criteriaItems>
</filter>
Multi-value picklist: Use ONE criteriaItem with comma-separated values:
<criteriaItems>
<column>INDUSTRY</column>
<operator>equals</operator>
<value>Technology,Financial Services</value>
</criteriaItems>
Common operators: equals, notEqual, lessThan, greaterThan, contains, startsWith, includes, excludes, isBlank, notBlank. Full list in references/filter-operations.md.
Generation Workflow
- Gather Requirements — object, fields, groupings, filters, chart needs
- Determine Format — no groupings → Tabular; row groupings → Summary; row + column → Matrix; multiple objects → Joined
- Identify Column Names — call
get_metadata_type_sectionsMCP tool to get valid platform column names for the report type - Author Metadata — start from closest example in
examples/and adapt - Create Folder — generate folder directory +
<FolderName>-meta.xmlwith<folderShares> - Validate — run through
references/verification-checklist.md
Reference File Index
| File | When to read |
|---|---|
references/column-names.md | Step 3 — column name mappings per report type |
references/date-intervals.md | When setting timeFrameFilter intervals |
references/chart-types.md | When adding a chart — all 17 types + legendPosition rules |
references/filter-operations.md | When building filters — complete operator reference |
references/verification-checklist.md | Step 6 — pre-deploy validation |
references/errors-and-troubleshooting.md | When fields are missing or deployment fails |
examples/TabularOpportunitiesReport.report-meta.xml | Tabular report template |
examples/OpportunitiesByStageReport.report-meta.xml | Summary report with chart |
examples/OpportunitiesByStageAndQuarter.report-meta.xml | Matrix report template |
examples/AccountsCreatedThisYear.report-meta.xml | Filtered report with time frame |
Frequently asked questions about Salesforce Report Generator
Similar skills
Rhino 3D Scripting
Streamline your Rhinoceros 3D scripting tasks.
MVVM Toolkit
Streamline ViewModel development with source generators.
FreeCAD Scripts
Generate Python scripts for FreeCAD automation and modeling.
Azure Architecture Builder
Design and deploy Azure infrastructure using natural language.
Command Development
Streamline your command creation for Claude Code.
Create Cowork Plugin
Easily build and package plugins through guided sessions.
