
generating-lightning-app
Build complete Salesforce Lightning Experience applications from natural language descriptions. Use this skill when a user requests a "complete app", "Lightning app", "business solution", "management system", or describes a scenario requiring multiple interconnected Salesforce components (objects, fields, pages, tabs, security). Orchestrates all required metadata types in proper dependency order to produce a deployable application.
- Installs
- 3.9K
- Last 24h
- —
- Trending rank
- —
- Security
- Pass
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/forcedotcom/sf-skills --skill generating-lightning-app- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads generating-lightning-app automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
Security audits
Independent scans of the skill's instructions and bundled files.
SKILL.md
The instructions your agent reads when the skill is triggered.
Generating Lightning App
Overview
Build a complete, deployable Salesforce Lightning Experience application from a natural language description by defining a Lightning Custom Application and orchestrating its dependent metadata types in correct dependency order. Invoke specialized metadata skills when available; generate metadata directly when no skill exists.
When to Use This Skill
Use when:
- User requests a "Lightning app", or "end-to-end solution"
- User says "build an app", "create an application", "build a [type] app" (project management, tracking, etc.)
- The work produces a custom app (CustomApplication) plus supporting metadata, not a lone object, page, or tab in isolation
Examples that should trigger this skill:
- "Build a project management lightning app with Tasks, Resources, and Supplies objects"
- "Create a LEX app to track vehicles with Lightning pages and permission sets"
- "I need a Space Station management system with multiple objects and relationships"
- "Build an employee onboarding lightning app with custom Lightning Record Pages"
Do NOT use when:
- Creating a single metadata component (use specific metadata skill instead)
- Troubleshooting or debugging existing metadata
- Building Salesforce Classic apps (not Lightning Experience)
- User asks for just one object, or just one page, or just one permission set (without others)
- User only needs to create or configure an app container (grouping existing tabs) without other metadata; use
generating-custom-applicationinstead
Metadata Type Registry
This table shows which metadata types are commonly needed for Lightning Experience apps, their skill availability, and API context requirement.
| Metadata Type | Skill Name | API Context | Usage Rule |
|---|---|---|---|
| Custom Object | generating-custom-object | salesforce-api-context | MUST load skill AND call API context |
| Custom Field | generating-custom-field | salesforce-api-context | MUST load skill AND call API context |
| Custom Tab | generating-custom-tab | salesforce-api-context | MUST load skill AND call API context |
| FlexiPage | generating-flexipage | salesforce-api-context | MUST load skill AND call API context |
| Custom Application | generating-custom-application | salesforce-api-context | MUST load skill AND call API context |
| List View | generating-list-view | salesforce-api-context | MUST load skill AND call API context (if requested) |
| Validation Rule | generating-validation-rule | salesforce-api-context | MUST load skill AND call API context (if requested) |
| Flow | generating-flow | metadata-experts pipeline | MUST load skill AND run pipeline. Exempt from salesforce-api-context. |
| Permission Set | generating-permission-set | salesforce-api-context | MUST load skill AND call API context |
Usage Rules
SKILL RULE: When a skill exists for a metadata type, you MUST load that skill. Do NOT generate metadata directly without loading the skill first.
API CONTEXT RULE: For every metadata type (except Flow), you MUST call salesforce-api-context tools before generating. Do NOT generate metadata without calling API context first. The skill provides structure and rules; API context confirms what is valid for the current API version. Both are essential.
FALLBACK RULE: When no skill exists for a metadata type you need, generate the metadata directly using your knowledge of Salesforce Metadata API and best practices. API context is still required.
RATIONALE: Skills contain validated patterns and constraints. API context provides version-specific accuracy. Together they prevent deployment failures.
Dependency Graph & Build Order
Phase 1: Data Model (Foundation)
Custom Objects (no dependencies)
↓
Custom Fields (depends on: Objects exist)
↓
Relationships (depends on: Both parent and child objects + fields exist)
Metadata types in this phase:
generating-custom-object- once, with all objectsgenerating-custom-field- once, with all fields (including Master-Detail, Lookup, Roll-up Summary)
Phase 2: Business Logic (Optional - only if requested)
Validation Rules (depends on: Fields exist)
↓
Flows (depends on: Objects, Fields exist)
Metadata types in this phase (only if user requested):
generating-validation-rule- once, if validation requirements mentionedgenerating-flow- once, if automation/workflow requirements mentioned
Phase 3: User Interface
List Views (depends on: Objects, Fields exist)
↓
Custom Tabs (depends on: Objects exist)
↓
FlexiPages (depends on: Objects, Tabs exist)
Metadata types in this phase:
generating-list-view- once, for filtered record views (if requested)generating-custom-tab- once, with all object tabsgenerating-flexipage- once, with all record/home/app pages
Phase 4: Application Assembly
Custom Application (depends on: Tabs exist)
Metadata types in this phase:
generating-custom-application- once, to create the Lightning App container
Phase 5: Security & Access
Permission Sets (depends on: Objects, Fields, Tabs, App exist)
Metadata types in this phase:
generating-permission-set- once, with all permission sets and access to:- Objects (Read, Create, Edit, Delete)
- Fields (Read, Edit)
- Tabs (Visible)
- Custom Application (Visible)
Execution Workflow
STEP 1: Requirements Analysis & Planning
Actions:
- Parse user's natural language request
- Extract business entities (become Custom Objects)
- Extract attributes/properties (become Custom Fields)
- Identify relationships (Master-Detail, Lookup)
- Detect validation requirements (become Validation Rules)
- Detect automation requirements (become Flows)
- Identify user personas (inform Permission Sets)
Output: Build Plan
Generate a structured plan listing:
Lightning App Build Plan: [App Name]
DATA MODEL:
- Custom Objects: [list with object names]
- Custom Fields: [list grouped by object]
- Relationships: [list M-D and Lookup relationships]
BUSINESS LOGIC (if applicable):
- Validation Rules: [list with object and rule name]
- Flows: [list with flow name and type]
USER INTERFACE:
- List Views (if requested): [list with object and view name]
- Custom Tabs: [list with object]
- FlexiPages: [list with page name and type]
- Custom Application: [app name]
SECURITY:
- Permission Sets: [list with purpose]
PER-TYPE EXECUTION (skill + API context for each):
- CustomObject: load generating-custom-object + call salesforce-api-context
- CustomField: load generating-custom-field + call salesforce-api-context
- ValidationRule: load generating-validation-rule + call salesforce-api-context (if requested)
- Flow: load generating-flow + run metadata-experts pipeline (if requested)
- ListView: load generating-list-view + call salesforce-api-context (if requested)
- CustomTab: load generating-custom-tab + call salesforce-api-context
- FlexiPage: load generating-flexipage + call salesforce-api-context
- CustomApplication: load generating-custom-application + call salesforce-api-context
- PermissionSet: load generating-permission-set + call salesforce-api-context
STATUS LINES TO EMIT BEFORE FILE WRITES:
- `type=<Type> skill=complete mcp=complete|unavailable mcp_tools=<tool-list|none>`
- Flow exception: `type=Flow skill=complete pipeline=complete`
DEPENDENCY ORDER:
1. Phase 1: Data Model (Objects -> Fields)
2. Phase 2: Business Logic (Validation Rules -> Flows)
3. Phase 3: User Interface (List Views -> Tabs -> Pages)
4. Phase 4: App Assembly (Application)
5. Phase 5: Security (Permission Sets)
STEP 2: Per-Type Execution
Execute these four steps for each metadata type, one type at a time. Complete all four steps for the current type before moving to the next type. Do NOT skip any step.
| Step | What to do | Why |
|---|---|---|
| ① Load skill | Search for and read the per-type SKILL.md | Gives you the XML structure, required elements, naming rules, and validation constraints |
| ② Call API context | Call salesforce-api-context tools for this metadata type using one or more of: get_metadata_type_sections, get_metadata_type_context, get_metadata_type_fields, get_metadata_type_fields_properties, search_metadata_types | Gives you the current valid values — allowed enum values, required vs. optional fields, child types for this API version. The skill provides structure; API context provides version-specific accuracy. |
| ③ Record status | Emit: type=<Type> skill=complete mcp=complete|unavailable mcp_tools=<tool-list|none> | Confirms both steps were attempted before any files are written and records which API context tools were used |
| ④ Generate files | Generate all files for this type, then checkpoint | Only after ①②③ are done. Verify, then move to the next type. |
Do NOT combine ① and ② into a single action or skip ② after completing ①. They are separate steps that serve different purposes. After loading the skill you may feel ready to generate — stop and do ② first.
If salesforce-api-context is unavailable after a real attempt, record mcp=unavailable and generate using skill knowledge alone. Not attempting ② at all is a bug.
1. Custom Objects
- ① Load skill: Read
generating-custom-objectSKILL.md - ② API context: Call
salesforce-api-contextfor CustomObject - ③ Status:
type=CustomObject skill=complete mcp=complete|unavailable mcp_tools=<tool-list|none> - ④ Generate + Checkpoint: Generate all Custom Object files, then proceed to #2
2. Custom Fields
- ① Load skill: Read
generating-custom-fieldSKILL.md - ② API context: Call
salesforce-api-contextfor CustomField - ③ Status:
type=CustomField skill=complete mcp=complete|unavailable mcp_tools=<tool-list|none> - ④ Generate + Checkpoint: Generate all Custom Field files, then proceed to #3
3. Validation Rules (only if requested)
- ① Load skill: Read
generating-validation-ruleSKILL.md - ② API context: Call
salesforce-api-contextfor ValidationRule - ③ Status:
type=ValidationRule skill=complete mcp=complete|unavailable mcp_tools=<tool-list|none> - ④ Generate + Checkpoint: Generate all Validation Rule files, then proceed to #4
4. Flows (only if requested)
- ① Load skill: Read
generating-flowSKILL.md - ② Pipeline: Run
metadata-experts/execute_metadata_action3-step pipeline (exempt fromsalesforce-api-context) - ③ Status:
type=Flow skill=complete pipeline=complete - ④ Generate + Checkpoint: Generate all Flow files via the pipeline, then proceed to #5
5. List Views (only if requested)
- ① Load skill: Read
generating-list-viewSKILL.md - ② API context: Call
salesforce-api-contextfor ListView - ③ Status:
type=ListView skill=complete mcp=complete|unavailable mcp_tools=<tool-list|none> - ④ Generate + Checkpoint: Generate all List View files, then proceed to #6
6. Custom Tabs
- ① Load skill: Read
generating-custom-tabSKILL.md - ② API context: Call
salesforce-api-contextfor CustomTab - ③ Status:
type=CustomTab skill=complete mcp=complete|unavailable mcp_tools=<tool-list|none> - ④ Generate + Checkpoint: Generate all Custom Tab files, then proceed to #7
7. FlexiPages
- ① Load skill: Read
generating-flexipageSKILL.md - ② API context: Call
salesforce-api-contextfor FlexiPage - ③ Status:
type=FlexiPage skill=complete mcp=complete|unavailable mcp_tools=<tool-list|none> - ④ Generate + Checkpoint: Generate all FlexiPage files, then proceed to #8
8. Custom Application
- ① Load skill: Read
generating-custom-applicationSKILL.md - ② API context: Call
salesforce-api-contextfor CustomApplication - ③ Status:
type=CustomApplication skill=complete mcp=complete|unavailable mcp_tools=<tool-list|none> - ④ Generate + Checkpoint: Generate the Custom Application file, then proceed to #9
9. Permission Sets
- ① Load skill: Read
generating-permission-setSKILL.md - ② API context: Call
salesforce-api-contextfor PermissionSet - ③ Status:
type=PermissionSet skill=complete mcp=complete|unavailable mcp_tools=<tool-list|none> - ④ Generate + Checkpoint: Generate all Permission Set files — all types complete
STEP 3: Final Artifact Assembly
After all phases complete, consolidate outputs into deployment-ready structure.
Output
The completed build produces:
-
Salesforce DX Project Directory containing all generated metadata
- Organized by standard SFDX structure:
force-app/main/default/
- Organized by standard SFDX structure:
-
Metadata Files - One file per component, organized by type:
force-app/main/default/ ├── objects/ # Custom Objects (.object-meta.xml) ├── fields/ # Custom Fields (.field-meta.xml) ├── tabs/ # Custom Tabs (.tab-meta.xml) ├── flexipages/ # Lightning Pages (.flexipage-meta.xml) ├── applications/ # Custom Applications (.app-meta.xml) ├── permissionsets/ # Permission Sets (.permissionset-meta.xml) ├── flows/ # Flows (.flow-meta.xml) - if applicable └── objects/.../validationRules/ # Validation Rules (.validationRule-meta.xml) - if applicable -
Deployment Manifest (
package.xml)- Lists all components with proper API version
- Organized by metadata type in dependency order
- Ready for Salesforce CLI deployment or Metadata API deployment
-
Build Summary Report - A markdown file listing:
- Every component created
- Component type and API name
- File path location
- Dependency relationships
- Any warnings or recommendations
Example Summary Structure:
Lightning App Build Complete: Project Management App
METADATA GENERATED:
1 Custom Objects
- Project__c -> force-app/main/default/objects/Project__c/Project__c.object-meta.xml
- Task__c -> force-app/main/default/objects/Task__c/Task__c.object-meta.xml
- Resource__c -> force-app/main/default/objects/Resource__c/Resource__c.object-meta.xml
2 Custom Fields
- Project__c.Name -> force-app/main/default/objects/Project__c/fields/Name.field-meta.xml
- Project__c.Status__c -> force-app/main/default/objects/Project__c/fields/Status__c.field-meta.xml
[... etc ...]
3 Custom Tabs
- Project__c -> force-app/main/default/tabs/Project__c.tab-meta.xml
[... etc ...]
4 Lightning Record Pages
- Project_Record_Page -> force-app/main/default/flexipages/Project_Record_Page.flexipage-meta.xml
[... etc ...]
5 Custom Application
- Project_Management -> force-app/main/default/applications/Project_Management.app-meta.xml
6 Permission Sets
- Project_Manager -> force-app/main/default/permissionsets/Project_Manager.permissionset-meta.xml
- Project_User -> force-app/main/default/permissionsets/Project_User.permissionset-meta.xml
WARNINGS: None
Validation
Before presenting the completed build to the user, verify cross-component integrity:
- Object-Tab Coverage: Every Custom Object has at least one Custom Tab
- Relationship Integrity: Every Custom Object referenced in a relationship (parent or child) exists in the build
- Field References in Pages: Every field referenced in a FlexiPage exists on the corresponding object
- Tab References in App: Every tab referenced in the Custom Application was successfully created
- Permission Set Completeness: Permission Sets grant access to all generated objects, fields, tabs, and the application
- No Orphaned Components: No tabs without objects, no pages without corresponding tabs, no app without tabs
- Deployment Manifest Completeness:
package.xmlincludes all generated components in proper dependency order
Validation Failure Handling (Category 2):
- If validation fails, include failed checks in the Build Summary Report under a
VALIDATION WARNINGSsection - These are post-generation issues — do NOT block delivery of the build, but clearly communicate what needs manual review or correction
- Provide specific remediation steps for each failed validation check
Note: Individual component validations (reserved words, name lengths, field types, etc.) are handled by specialized metadata skills and do not need to be re-validated here.
Error Handling
Category 1: Stop and Ask User
Stop execution and ask for clarification if:
- User request is too vague to extract any objects or fields
- Conflicting requirements detected (e.g., "make it private" + "everyone should see it")
- Invalid Salesforce naming detected (reserved words like
Order,Group)
Category 2: Post-Generation Warnings (Log Warning, Continue)
Log warning and continue if:
- Cross-component validation check fails (e.g., field referenced in FlexiPage doesn't exist on object)
- Optional component generation fails (e.g., List View generation has minor issues)
- Validation Rule or Flow has minor output issues
Warning Pattern:
Warning: [Component Type] generation encountered issue
Component: [Name]
Issue: [Description]
Impact: [What won't work]
Recommendation: [How to fix manually]
Continuing with remaining components...
Best Practices
1. Always Follow Dependency Order
Never invoke skills out of sequence. Fields need objects, pages need tabs, apps need tabs.
2. Use Skills When Available
Don't reinvent the wheel. Specialized skills have field-specific validation that prevents deployment errors.
3. Generate Thoughtful Defaults
When user doesn't specify details:
- Use Text name fields for human entities
- Use AutoNumber for transactions
- Enable Search and Reports for user-facing objects
- Set sharingModel based on relationships
4. Validate Before Building
Check for:
- Reserved words in API names
- Relationship limits (max 2 M-D per object)
- Name length limits
- Duplicate names
FAQ
What does the generating-lightning-app skill do?
Build complete Salesforce Lightning Experience applications from natural language descriptions. Use this skill when a user requests a "complete app", "Lightning app", "business solution", "management system", or describes a scenario requiring multiple interconnected Salesforce components (objects, fields, pages, tabs, security). Orchestrates all required metadata types in proper dependency order to produce a deployable application.
How do I install generating-lightning-app?
Run npx skills add https://github.com/forcedotcom/sf-skills --skill generating-lightning-app in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/generating-lightning-app/ (personal) or .claude/skills/generating-lightning-app/ (project).
Which AI agents can use generating-lightning-app?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is generating-lightning-app safe to install?
Security partners have reviewed it: Gen Agent Trust Hub passed; Socket passed; Snyk passed. As with any skill, read the SKILL.md and bundled scripts before installing.
Who maintains generating-lightning-app?
It is published by forcedotcom in forcedotcom/sf-skills. It has 3,924 recorded installs.
More from forcedotcom/sf-skills
platform-apex-generate
forcedotcom/sf-skills
Primary Apex authoring skill for class generation, refactoring, and review. ALWAYS ACTIVATE when the user mentions Apex, .cls, triggers, or asks to create/refactor a class (service, selector, domain, batch, queueable, schedulable, invocable, DTO, utility, interface, abstract, exception, REST resource). Use this skill for requests involving SObject CRUD, mapping collections, fetching related records, scheduled jobs, batch jobs, trigger design, @AuraEnabled controllers, @RestResource endpoints, custom REST APIs, or code review of existing Apex.
platform-apex-test-generate
forcedotcom/sf-skills
Use to generate and validate Apex test classes with TestDataFactory patterns, bulk testing (251+ records), mocking, assertions, and disciplined test-fix loops. Use when creating Apex test classes (for triggers, services, controllers, batch jobs, queueables, and callouts), improving coverage, debugging or fixing failing Apex tests, or running test/coverage analysis. Triggers on Test.cls files, sf apex run test, coverage reports. Do NOT trigger for production Apex (use platform-apex-generate) or Jest/LWC tests.
platform-apex-test-run
forcedotcom/sf-skills
Apex test execution, coverage analysis, and test-fix loops with 120-point scoring. Use when the user runs Apex tests, checks code coverage, fixes failing tests, or touches Test.cls / Test.cls files. DO NOT TRIGGER when writing Apex production code (use platform-apex-generate), Agentforce agent testing (use agentforce-test), or Jest/LWC tests (use experience-lwc-generate).
platform-apex-logs-debug
forcedotcom/sf-skills
Salesforce debug log analysis and troubleshooting with 100-point scoring. TRIGGER when: user analyzes debug logs, hits governor limits, reads stack traces, or touches .log files from Salesforce orgs. DO NOT TRIGGER when: running Apex tests (use platform-apex-test-run), generating or fixing Apex code (use platform-apex-generate), or Agentforce session tracing (use agentforce-observe).
platform-soql-query
forcedotcom/sf-skills
Use when the user needs SOQL/SOSL authoring or optimization: natural-language-to-query generation, relationship queries, aggregates, query-plan/selectivity analysis, and performance or safety improvements. TRIGGER when the user writes, optimizes, or debugs SOQL/SOSL, touches .soql files, or asks about relationship queries, aggregates, or query performance. DO NOT TRIGGER for bulk data operations (use platform-data-manage), Apex DML logic (use platform-apex-generate), or report/dashboard queries.
platform-metadata-deploy
forcedotcom/sf-skills
Salesforce DevOps automation using sf CLI v2. TRIGGER when: user deploys metadata, validates a deploy or does a dry-run, deploys to a Production org, quick-deploys a validated job ID, ships/promotes to prod, creates/manages scratch orgs or sandboxes, sets up CI/CD pipelines, or troubleshoots deployment errors with sf project deploy. DO NOT TRIGGER when: writing Apex code, building LWC components (use experience-lwc-generate), creating metadata definitions (use platform-custom-object-generate), deleting metadata from an org (use platform-destructive-deploy), or querying org data (use platform-data-manage).
Popular security skills
azure-compliance
microsoft/azure-skills
Run Azure compliance and security audits with azqr plus Key Vault expiration checks. Covers best-practice assessment, resource review, policy/compliance validation, and security posture checks. WHEN: compliance scan, security audit, BEFORE running azqr (compliance cli tool), Azure best practices, Key Vault expiration check, expired certificates, expiring secrets, orphaned resources, compliance assessment.
minimal-run-and-audit
lllllllama/rigorpilot-skills
Rigor Run skill for README-first deep learning repo reproduction. Use when the task is specifically to capture or normalize evidence from the selected smoke test or documented inference or evaluation command and write standardized reprooutputs/ files, including patch notes when repository files changed. Do not use for training execution, initial repo intake, generic environment setup, paper lookup, target selection, hidden scientific-meaning changes, or end-to-end orchestration by itself.
seo-audit
coreyhaines31/marketingskills
When the user wants to audit, review, or diagnose SEO issues on their site. Also use when the user mentions "SEO audit," "technical SEO," "why am I not ranking," "SEO issues," "on-page SEO," "meta tags review," "SEO health check," "my traffic dropped," "lost rankings," "not showing up in Google," "site isn't ranking," "Google update hit me," "page speed," "core web vitals," "crawl errors," "indexing issues," "stuck on page 2," "striking distance keywords," "title tag rewrite," "low CTR," "local SEO," "Google Business Profile," or "map pack." Use this even if the user just says something vague like "my SEO is bad" or "help with SEO" — start with an audit. For building pages at scale to target keywords, see programmatic-seo. For adding structured data, see schema. For AI search optimization, see ai-seo.
firebase-security-rules-auditor
firebase/agent-skills
Audits Firebase (Firestore, Cloud Storage) security rules for vulnerabilities, privilege escalation, role bypasses, create vs update inconsistencies, resource exhaustion, type safety, size limits, and hasOnly ownership checks. Use when auditing/reviewing rules, running red-team rule assessments, or scoring against auditor checklists. Don't use for Firebase CLI (login, deploy), Auth, Crashlytics, Remote Config, or database queries.
audit
pbakaus/impeccable
Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.
competitors
coreyhaines31/marketingskills
When the user wants to create competitor comparison or alternative pages for SEO and buyer-facing use. Also use when the user mentions 'alternative page,' 'vs page,' 'competitor comparison,' 'comparison page,' '[Product] vs [Product],' '[Product] alternative,' 'competitive landing pages,' 'how do we compare to X,' 'competitor teardown,' 'audit our competitor pages,' 'are our comparison pages out of date,' or 'competitive asset audit.' Use this for any content that positions your product against competitors. Covers four formats: singular alternative, plural alternatives, you vs competitor, and competitor vs competitor. For auditing existing claims (not researching competitors from scratch, which is competitor-profiling; not technical SEO on these pages, which is seo-audit), use the asset audit here. For internal battle cards and sales-specific competitor docs, see sales-enablement.