forcedotcom/sf-skills

platform-report-generate

Use this skill when users need to create, generate, or validate Salesforce Lightning Report metadata.

소스 보기
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

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.jsonpackageDirectories[].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>
TabularNot allowedNot allowedNo
SummaryAt least 1 (max 3)Not allowedNo
MatrixAt least 1 (max 3)At least 1 (max 3)No
JoinedNot at top levelNot at top levelAt 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:

xml
<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
<?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

ElementRequiredNotes
<name>YesReport name (max 40 chars)
<reportType>YesReport type API name
<format>YesTabular, Summary, Matrix, or Joined
<scope>Recommendedorganization (or org for LeadList)
<columns>YesField columns — each has <field> and optional <aggregateTypes>
<filter>NoContains <criteriaItems> with <column>, <operator>, <value>
<groupingsDown>ConditionalRow groupings: <field>, <dateGranularity>, <sortOrder>
<groupingsAcross>ConditionalColumn groupings (Matrix only)
<timeFrameFilter>Recommended<dateColumn>, <interval>, optional <startDate>/<endDate>
<chart>NoSee references/chart-types.md
<buckets>NoBucket field definitions
<crossFilters>NoCross-object filters (with/without)
<showDetails>Recommendedtrue/false
<showGrandTotal>Recommendedtrue/false
<showSubTotals>Recommendedtrue/false
<description>RecommendedBusiness purpose (max 255 chars)
<block>ConditionalJoined format blocks

Filter Syntax

xml
<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:

xml
<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

  1. Gather Requirements — object, fields, groupings, filters, chart needs
  2. Determine Format — no groupings → Tabular; row groupings → Summary; row + column → Matrix; multiple objects → Joined
  3. Identify Column Names — call get_metadata_type_sections MCP tool to get valid platform column names for the report type
  4. Author Metadata — start from closest example in examples/ and adapt
  5. Create Folder — generate folder directory + <FolderName>-meta.xml with <folderShares>
  6. Validate — run through references/verification-checklist.md

Reference File Index

FileWhen to read
references/column-names.mdStep 3 — column name mappings per report type
references/date-intervals.mdWhen setting timeFrameFilter intervals
references/chart-types.mdWhen adding a chart — all 17 types + legendPosition rules
references/filter-operations.mdWhen building filters — complete operator reference
references/verification-checklist.mdStep 6 — pre-deploy validation
references/errors-and-troubleshooting.mdWhen fields are missing or deployment fails
examples/TabularOpportunitiesReport.report-meta.xmlTabular report template
examples/OpportunitiesByStageReport.report-meta.xmlSummary report with chart
examples/OpportunitiesByStageAndQuarter.report-meta.xmlMatrix report template
examples/AccountsCreatedThisYear.report-meta.xmlFiltered report with time frame
같은 저장소의 Skills

더 많은 Skills

모든 Skills
forcedotcom
커뮤니티

agentforce-d360-analyze

Data Cloud 360° view of a single Agentforce session. TRIGGER when user asks to trace, inspect, summarize, or describe a specific Agentforce session by session id (Agent Session UUID 019d… or MessagingSession id 0Mw…). Also triggers on session discovery — find/list/search sessions by time, agent, channel, outcome, or conversation text — when the user has no session id yet. DO NOT TRIGGER for design-time architecture questions (use agentforce-architecture-analyze instead) or for runtime perf/latency/SLO questions that require platform telemetry beyond Data Cloud.

설치 수
1
GitHub Stars
972
업데이트
9월 7일
forcedotcom
커뮤니티

agentforce-generate

Build, modify, audit, repair, optimize, debug, and deploy agents with Agentforce Agent Script. TRIGGER when: user creates, reviews, or changes .agent files or aiAuthoringBundle metadata; asks to fix AgentScript, audit an existing agent, run an AgentScript health check, common-pitfall review, or baseline-versus-candidate repair loop; changes a response, action, subagent, route, state flow, or Agent Spec; previews, debugs, deploys, publishes, or tests agents; uses sf agent generate/preview/publish/test; or manages Agentforce MCP servers, tools, assets, or authentication. DO NOT TRIGGER when: Apex, Flow, Prompt Template, Experience Cloud, or general Salesforce CLI work is unrelated to Agent Script; or the primary input is a production session or trace ID rather than an agent artifact.

설치 수
1
GitHub Stars
972
업데이트
9월 7일
forcedotcom
커뮤니티

platform-quick-deploy

Deploy validated metadata to a Production Salesforce org without re-running tests. TRIGGER when the user wants to deploy to production, says 'quick deploy', 'promote', 'ship to prod', or has just validated and wants to push the change live. REQUIRES a recent sf project deploy validate job ID (≤10 days old, ≤3 days for --use-most-recent). DO NOT TRIGGER for sandbox/scratch deploys (use platform-metadata-deploy) or unvalidated deploys (use platform-deploy-validate first).

설치 수
1
GitHub Stars
972
업데이트
9월 7일
forcedotcom
커뮤니티

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 selection, or custom evaluations; interprets test results or diagnoses test failures; asks about batch testing, regression suites, or CI/CD test integration; requests security testing, OWASP LLM Top 10, red-teaming, penetration testing, prompt-injection tests, a security grade, or a vulnerability assessment of an agent. DO NOT TRIGGER when: user creates, modifies, previews, or debugs .agent files (use agentforce-generate); deploys or publishes agents; writes Agent Script code; uses sf agent preview for development iteration; analyzes production session traces (use agentforce-observe); performs a static safety review of .agent file content (use agentforce-generate Section 15).

설치 수
3
GitHub Stars
972
업데이트
9월 7일