platform-lightning-app-coordinate

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, f

By forcedotcom · 5,310 installs

npx skills add forcedotcom/sf-skills --skill platform-lightning-app-coordinate

Source repository · Upstream listing

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 platform custom application generate instead 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 platform custom object generate salesforce api context MUST load skill AND call API context Custom Field platform custom field generate salesforce api context MUST load skill AND call API context Custom Tab platform custom tab generate salesforce api context MUST load skill AND call API context FlexiPage platform flexipage generate salesforce api context MUST load skill AND call API context Custom Application platform custom application generate salesforce api context MUST load skill AND call API context List View platform list view generate salesforce api context MUST load skill AND call API context (if requested) Validation Rule platform validation rule generate salesforce api context MUST load skill AND call API context (if requested) Flow automation flow generate metadata experts pipeline MUST load skill AND run pipeline. Exempt from salesforce api context . Permission Set platform permission set generate 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) Metadata types in this phase: 1. platform custom object generate once, with all objects 2. platform custom field generate once, with all fields (including Master Detail, Lookup, Roll up Summary) Phase 2: Business Logic (Optional only if requested) Metadata types in this phase (only if user requested): 1. platform validation rule generate once, if validation requirements mentioned 2. automation flow generate once, if automation/workflow requirements mentioned Phase 3: User Interface Metadata types in this phase: 1. platform list view generate once, for filtered record views (if requested) 2. platform custom tab generate once, with all object tabs 3. platform flexipage generate once, with all record/home/app pages Phase 4: Application Assembly Metadata types in this phase: 1. platform custom application generate once, to create the Lightning App container Phase 5: Security & Access Metadata types in this phase: 1. platform permission set generate 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: 1. Parse user's natural language request 2. Extract business entities (become Custom Objects) 3. Extract attributes/properties (become Custom Fields) 4. Identify relationships (Master Detail, Lookup) 5. Detect validation requirements (become Validation Rules) 6. Detect automation requirements (become Flows) 7. Identify user personas (inform Permission Sets) Output: Build Plan Generate a structured plan listing: 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 platform custom object generate SKILL.md ② API context: Call salesforce api context for 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 platform custom field generate SKILL.md ② API context: Call salesforce api context for 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 platform validation rule generate SKILL.md ② API context: Call salesforce api context for 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 automation flow generate SKILL.md ② Pipeline: Run metadata experts/execute metadata action 3 step pipeline (exempt from salesforce 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 platform list view generate SKILL.md ② API context: Call salesforce api context for 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 platform custom tab generate SKILL.md ② API context: Call salesforce api context for 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 platform flexipage generate SKILL.md ② API context: Call salesforce api context for 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 platform custom application generate SKILL.md ② API context: Call salesforce api context for 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 platform permission set generate SKILL.md ② API context: Call salesforce api context for 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: 1. Salesforce DX Project Directory containing all generated metadata Organized by standard SFDX structure: force app/main/default/ 2. Metadata Files One file per component, organized by type: 3. 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 4. 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: 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.xml includes 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 WARNINGS section These are post generation issues — d