agentforce-architectur…
Declared architecture snapshot for one Agentforce agent: planner, topics, actions, flows, Apex, prompt templates, and NGA…
Use when users create, generate, modify, or validate Salesforce Lightning pages (FlexiPages). Trigger on RecordPage, AppPage, HomePage, Lightning pages, adding components to a page, page customization (e.g. 'customize the record page'), or .flexipage-meta.xml files (regions,
Claude Code
$ npx -y skills add forcedotcom/sf-skills --skill platform-flexipage-generate --agent claude-code
Codex
$ npx skills add forcedotcom/sf-skills --skill platform-flexipage-generate -a codex -y
Cursor
$ npx skills add forcedotcom/sf-skills --skill platform-flexipage-generate -a cursor -y
Gemini CLI
$ npx skills add forcedotcom/sf-skills --skill platform-flexipage-generate -a gemini-cli -y
GitHub Copilot
$ npx skills add forcedotcom/sf-skills --skill platform-flexipage-generate -a github-copilot -y
OpenCode
$ npx skills add forcedotcom/sf-skills --skill platform-flexipage-generate -a opencode -y
Windsurf
$ npx skills add forcedotcom/sf-skills --skill platform-flexipage-generate -a windsurf -y
name: platform-flexipage-generate
description: "Use when users create, generate, modify, or validate Salesforce Lightning pages (FlexiPages). Trigger on RecordPage, AppPage, HomePage, Lightning pages, adding components to a page, page customization (e.g. 'customize the record page'), or .flexipage-meta.xml files (regions, components, deployment errors). DO NOT TRIGGER for Visualforce pages, page layout assignments in the UI, UI Bundle/Experience Cloud site pages, or Aura/Lightning Web Component development without FlexiPage context."
allowed-tools: Bash Read Write
metadata:
version: "1.2"
domains: ["Platform"]
minApiVersion: "68.0"
cliTools:
- tool: ["python3"]
semver: ">=3.10.0"
- tool: ["sf"]
semver: ">=2.126.4"Use this skill when you need to:
**CRITICAL: When creating NEW FlexiPages, you MUST ALWAYS start with the CLI template command.** Never create FlexiPage XML from scratch - the CLI provides valid structure, proper regions, and correct component configuration that prevents deployment errors.
Generate Lightning pages (RecordPage, AppPage, HomePage) using CLI bootstrapping for component discovery and configuration.
---
**MANDATORY FOR NEW PAGES: This step is NOT optional.** Always use the CLI template command when creating a new FlexiPage. The CLI generates valid XML structure, proper regions, and correct metadata that prevents common deployment errors. Only skip this step if you're editing an existing FlexiPage file.
**`<packageDirectory>`** = the `path` value from `sfdx-project.json` → `packageDirectories[0]` (e.g., `force-app`). Read it from the project file before running commands.
sf template generate flexipage \ --name <PageName> \ --template <RecordPage|AppPage|HomePage> \ --sobject <SObject> \ --primary-field <Field1> \ --secondary-fields <Field2,Field3> \ --detail-fields <Field4,Field5,Field6,Field7> \ --output-dir <packageDirectory>/main/default/flexipages
**CRITICAL:** If the `sf template generate flexipage` command fails, **STOP**.
1. Install the templates plugin:
sf plugins install templates
2. Retry the `sf template generate flexipage` command 3. Verify the FlexiPage XML file was created
Do NOT continue to Step 2 until the template command succeeds. The generated XML is required for the entire workflow.
**RecordPage:**
**AppPage:**
**HomePage:**
Run a **dry-run** deployment to validate the page and dependencies (use the default package directory from `sfdx-project.json`):
sf project deploy start --dry-run -d "<packageDirectory>/main/default" --test-level NoTestRun --wait 10 --json
**Critical:** Fix any deployment errors before proceeding. The page must validate successfully.
After the base page deploys successfully, if the user wants additional components, follow the **Adding Components Dynamically** workflow below. All component additions MUST go through the discovery and inference pipeline — never write component XML from memory alone.
---
**Read `references/xml_rules.md`** for all XML encoding rules, field reference format, region/facet types, fieldInstance structure, unique identifier requirements, and common deployment error resolutions.
**Key rules (quick reminder):**
---
**Read `references/identifiers_and_regions.md`** for the identifier generation algorithm, facet naming patterns (named vs UUID), region selection rules, and container component facet structure.
---
**Location:** `header` region only. See `references/record_flexipage_dynamicHighlights.md` for full structure. CLI generates Facets automatically from `--primary-field` and `--secondary-fields`.
**Use for:** Displaying fields in columns. Three-level nesting: Region → Column Facets → Field Facets. See `references/flexipage_fieldSection.md` for full structure and XM
This repository provides Salesforce agent skills, plugins, and sample apps for building applications.
Declared architecture snapshot for one Agentforce agent: planner, topics, actions, flows, Apex, prompt templates, and NGA…
Use this skill to Upgrade Einstein Bots into Agentforce agents end-to-end in a single pass, orchestrating per-bot Agent Spec…
Data Cloud 360° view of a single Agentforce session. TRIGGER when user asks to trace, inspect, summarize, or describe a specific…
Build, modify, audit, repair, optimize, debug, and deploy agents with Agentforce Agent Script. TRIGGER when: user creates,…
Analyze production Agentforce agent behavior using session traces and Data Cloud, and manage Agent Health Monitoring (AHM)…
Use to design an AI agent persona — identity, voice, tone, behavioral style, guardrails — and encode it into Agent Script (.agent…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.