generating-custom-lightning-type

Generates Custom Lightning Type schemas and editor/renderer configurations for Salesforce Einstein Agent actions.

1|Updated May 7, 2026
One-click install
npx skills add https://github.com/amanpraaj/sf-skill-hub --skill generating-custom-lightning-type-amanpraaj
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: generating-custom-lightning-type
Source: https://github.com/amanpraaj/sf-skill-hub/tree/main/skills/salesforce/generating-custom-lightning-type
Command: npx skills add https://github.com/amanpraaj/sf-skill-hub --skill generating-custom-lightning-type-amanpraaj

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Creating Custom Lightning Types (CLTs) for Salesforce Einstein Agent actions requires strict adherence to a restrictive metaschema, and small mistakes like using items on arrays or adding examples cause cryptic deployment failures. This Skill encodes the validation rules, bundle structure, and deployment error fixes so CLTs deploy correctly. ## Core Features & Use Cases - Schema Generation: Produces valid schema.json files with correct root object requirements, primitive lightning:type identifiers, and CLT reference patterns (c__<CLTName>) for nested objects. - Editor/Renderer Configuration: Creates editor.json and renderer.json using componentOverrides and layout patterns, including custom LWC component bindings with {!$attrs.<name>} mappings. - Deployment Troubleshooting: Maps common deployment errors (unknown keywords, invalid targets, array rejections) to concrete fixes. - Use Case: When building an Einstein Agent action that returns a structured list of records, use this Skill to generate the CLT bundle, configure a custom LWC renderer with the lightning__AgentforceOutput target, and deploy without validation errors. ## Quick Start Ask the agent to create a Custom Lightning Type schema for your Einstein Agent action, describing the fields and any nested objects or custom UI components you need.

Frequently Asked Questions about generating-custom-lightning-type

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Custom Lightning Type for an Einstein Agent action?▼

Create a `schema.json` with `type: "object"`, a `title`, `lightning:type: "lightning__objectType"`, and `unevaluatedProperties: false`, then define properties using primitive lightning types. Place it in `lightningTypes/<TypeName>/` and deploy via Salesforce CLI.

How do I handle nested objects in a Custom Lightning Type schema?▼

Nested objects cannot use `lightning__objectType` directly. Reference a separately deployed CLT with `"lightning:type": "c__<CLTName>"`, or use an Apex class type (`@apexClassType/...`) when the structure already exists server-side.

Why does my Custom Lightning Type deployment fail on array properties?▼

The CLT metaschema rejects the `items` keyword. Root-level arrays must include `lightning:type: "lightning__listType"` without `items`, while nested arrays must only include `type: "array"` with no `lightning:type` or `items`.

What LWC target is required for custom CLT editor and renderer components?▼

Editor components need `<target>lightning__AgentforceInput</target>` and renderer components need `<target>lightning__AgentforceOutput</target>` in their `-meta.xml` files. Missing targets cause an invalid target configuration deployment error.

When should I use an Apex class type instead of a standard CLT schema?▼

Use `@apexClassType/...` when the data structure already exists as an Apex class server-side or when you need deploy-safe true nested object output. Apex-based CLTs contain only `title`, optional `description`, and the `lightning:type` reference.