Token导航 LogoToken导航

Agent Skill · 前端设计

generating-custom-lightning-type(生成自定义闪电类型)

generating-custom-lightning-type 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

generating-custom-lightning-type 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 991。

总安装 8,641周安装 353GitHub Stars 212下载 2,796核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:generating-custom-lightning-type(生成自定义闪电类型)
来源仓库:https://github.com/forcedotcom/afv-library
仓库路径:skills/generating-custom-lightning-type
安装命令:
npx skills add https://github.com/forcedotcom/afv-library --skill generating-custom-lightning-type
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/forcedotcom/afv-library --skill generating-custom-lightning-type

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

用于处理 GitHub 仓库、Issue 和 Pull Request 信息,适合前端开发场景。可辅助整理仓库状态和代码协作事项。通过 npx skills add 命令从 GitHub 仓库安装。安装前需确认权限范围和维护状态,避免误触联网或文件读写。

generating-custom-lightning-type 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/generating-custom-lightning-type

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/forcedotcom/afv-library --skill generating-cus…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

generating-custom-lightning-type 怎么安装?

在终端执行 npx skills add https://github.com/forcedotcom/afv-library --skill generating-custom-lightn…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

generating-custom-lightning-type 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

generating-custom-lightning-type 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

generating-custom-lightning-type 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

generating-custom-lightning-type 用的人多吗?

公开数据是累计安装 8,641 次,近一周安装 353 次,下载 2,796 次,GitHub 212 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

generating-custom-lightning-type 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
generating-custom-lightning-type

生成自定义闪电类型 · 本页

8,641212需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

When to Use This Skill

Use this skill when you need to:

  • Create Custom Lightning Types (CLTs) for structured inputs/outputs
  • Generate JSON Schema-based type definitions for Lightning Platform
  • Configure CLTs for Einstein Agent actions
  • Set up editor and renderer configurations for custom UI
  • Troubleshoot deployment errors related to Custom Lightning Types

Specification

CustomLightningType Metadata Specification

Overview & Purpose

Custom Lightning Types (CLTs) are JSON Schema-based type definitions used by the Lightning Platform (including Einstein Agent actions) to describe structured inputs/outputs and drive editor/renderer experiences.

Configuration

  • Choose referenced CLT pattern for nested objects - When you need a reusable or separately deployed nested type, create a CLT for that shape and reference it with "lightning:type": "c__<CLTName>". That string is the referenced type’s lightning:type value / FQN / registered identifier — not the JSON Schema title.
  • Choose standard Lightning types when the structure is simple and can be expressed with properties and supported primitive lightning:type identifiers.
  • Choose Apex class types (@apexClassType/...) when the structure already exists server-side and you want the Apex class to define the shape.
  • Include editor/renderer config only when you need custom UI behavior (custom LWC input/output components). Otherwise, omit.

Critical Rules (Read First)

  • Root object schemas MUST include:

- "type": "object" - "title" - "lightning:type": "lightning__objectType" - "unevaluatedProperties": false

  • "unevaluatedProperties" is enforced as false by the CLT metaschema. Do not set it to true.
  • Root object schemas MUST NOT include "examples" when "unevaluatedProperties": false is set.
  • Nested objects (inside properties) MUST NOT set "lightning:type": "lightning__objectType".

- Nested objects can be: references to other CLTs using c__<CLTName> syntax.

  • List/array properties are highly restricted by the CLT metaschema:

- CRITICAL LIMITATION: the CLT metaschema may reject the items keyword entirely. Treat items as disallowed by default. - Root-level arrays (direct children of the root properties): - MUST include "lightning:type": "lightning__listType" - MUST NOT include "items" - OPTIONAL "type": "array" - Nested arrays (arrays inside nested objects) are the most common failure: - MUST include "type": "array" - MUST NOT include "lightning:type": "lightning__listType" - MUST NOT include "items"

  • When "unevaluatedProperties": false is set, any unknown keyword will fail validation. Prefer removing keywords over relaxing strictness.
  • Apex class CLTs are minimal:

- Include only title, description (optional), and lightning:type set to @apexClassType/.... - Do not add type, properties, required, or unevaluatedProperties.

Additional CLT Metaschema Validations

  • Org namespace validation: titles/descriptions and other string fields may be validated to ensure you are not using an org namespace in places that are disallowed.
  • Lightning type validation: CLTs are validated to prevent referencing internal namespaces (for example, disallowing types from internal namespaces like sfdc_cms where not permitted).
  • Object type validation: the CLT root is validated to ensure lightning:type is exactly lightning__objectType.

Primitive Types & Constraints

  • lightning__textType

- Max length 255

  • lightning__multilineTextType

- Max length 2000

  • lightning__richTextType

- Max length 100000

  • lightning__urlType

- Max length 2000 - Optional lightning:allowedUrlSchemes enum values: https, http, relative, mailto, tel

  • lightning__dateType

- Data pattern: YYYY-MM-DD

  • lightning__timeType

- Data pattern: HH:MM:SS.sssZ

  • lightning__dateTimeType

- Data shape is an object with required dateTime and optional timeZone

  • lightning__numberType

- Decimal numbers; optional maximum, minimum, multipleOf

  • lightning__integerType

- Whole numbers only; optional maximum, minimum

  • lightning__booleanType

- true/false

Allowed Property-Level Keywords

When strict validation is enabled (unevaluatedProperties: false), keep each property minimal and prefer only keywords known to be allowed:

  • title, description, einstein:description
  • type (when used, ensure it matches the chosen lightning:type)
  • lightning:type
  • maximum, minimum, multipleOf (numeric)
  • maxLength, minLength (string)
  • const, enum
  • lightning:textIndexed, lightning:supportsPersonalization, lightning:localizable
  • lightning:uiOptions, lightning:allowedUrlSchemes
  • lightning:tags (metaschema restricts values; currently flow is the only known allowed tag)

Generation Workflow

  1. Confirm the CLT approach

- If referencing Apex: capture the exact class reference (@apexClassType/namespace__ClassName$InnerClass). - If using standard primitives: list the fields, their Lightning primitive types, and which fields are required.

  1. Draft schema.json

- Start with the root object structure (required root fields). - Add properties using valid primitive lightning:type identifiers. - For nested-object properties, use CLT Reference pattern: - "lightning:type": "c__<CLTName>" to reference another CLT - The referenced CLT must be deployed to the org before the parent CLT. - For Apex-based nested objects: Use @apexClassType/... when structure exists server-side. - If the prompt explicitly requires true nested object output, prefer an Apex-based CLT (@apexClassType/...) for deploy-safe nested structures. - For arrays: follow the strict list rules (avoid items; avoid lightning:type on nested arrays). - Before deployment, verify exact lightning:type spellings (for example, use lightning__richTextType, not misspelled variants).

  1. (Optional) Draft editor.json (only if custom UI is required)

- Supported shape: Top-level editor object with editor.componentOverrides and editor.layout. - Top-level editor object. - Use editor.componentOverrides for component overrides. - Use editor.layout for layout. - DEPRECATED: Do NOT use propertyRenderers or view — these are legacy keys. Always use componentOverrides and layout instead. - Root override pattern (most common for fully custom editing UI): - editor.componentOverrides["$"] = {"definition": "c/<yourEditorComponent>", "attributes": {...}} - When passing schema data into a custom LWC, use attribute mapping with the {!$attrs.<name>} syntax: e.g. "attributes": {"myField": "{!$attrs.value}"} so the runtime binds schema values to your component's attributes. - CRITICAL: The <name> in {!$attrs.<name>} must be a property defined in your type schema. For example, if your schema has a property called temperature, use {!$attrs.temperature}, not {!$attrs.value} unless value is an actual property. - Property-level override pattern (for individual fields): - editor.componentOverrides["<propertyName>"] = {"definition": "es_property_editors/<...>"} - Valid editor components (examples): es_property_editors/inputText, es_property_editors/inputNumber, es_property_editors/inputRichText, es_property_editors/inputImage, es_property_editors/inputTextarea. Do not use es_property_editors/inputList. - Collection editor (for root-level lightning__listType properties): Use a collection-level override so the list is edited by a custom component: collection.editor.componentOverrides["$"] = {"definition": "c/<yourCollectionEditorComponent>"}. Alternatively, use editor.layout with lightning/propertyLayout and attributes.property = "<listPropertyName>" for default list editing. - Layout pattern: - editor.layout.definition = "lightning/verticalLayout" - editor.layout.children[*].definition = "lightning/propertyLayout" with attributes.property = "<propertyName>" - CRITICAL: lightning/propertyLayout only accepts the property attribute. Do NOT add label, title, or any other attributes — these will fail validation with additionalProperties: false errors. - Avoid known-invalid patterns: - Do not use es_property_editors/inputList. - Do not use itemSchema attributes.

  1. (Optional) Draft renderer.json (only if custom UI is required)

- Supported shape: Top-level renderer object with renderer.componentOverrides and renderer.layout. - Top-level renderer object. - Use renderer.componentOverrides for component overrides. - Use renderer.layout for layout. - DEPRECATED: Do NOT use propertyRenderers or view — these are legacy keys. Always use componentOverrides and layout instead. - Root override pattern (most common for fully custom rendering UI): - renderer.componentOverrides["$"] = {"definition": "c/<yourRendererComponent>", "attributes": {...}} - Use {!$attrs.<name>} in attribute mappings when binding schema data to custom renderer component attributes. - CRITICAL: Attribute mappings like {!$attrs.propertyName} must reference properties that actually exist in your type schema. Referencing non-existent properties will fail validation. - Type matching: Attribute values must match the expected type for the component. For example, if a component expects a string attribute, passing an integer will fail validation. - Property-level override pattern: - renderer.componentOverrides["<propertyName>"] = {"definition": "es_property_editors/outputText" | "es_property_editors/outputNumber" | "es_property_editors/outputImage" |...}. Valid renderer components (examples): es_property_editors/outputText, es_property_editors/outputNumber, es_property_editors/outputImage. Avoid input-style components in the renderer. - Layout pattern for renderer: - renderer.layout.definition = "lightning/verticalLayout" - renderer.layout.children[*].definition = "lightning/propertyLayout" with attributes.property = "<propertyName>" - CRITICAL: Same as editor layouts, lightning/propertyLayout only accepts the property attribute. Do NOT add label, title, or any other attributes. - Collection renderer (for root-level lightning__listType properties): Use collection.renderer.componentOverrides["$"] = {"definition": "c/<yourListRendererComponent>"} or es_property_editors/genericListTypeRenderer to render the list.

  1. Place files in the correct bundle structure

- lightningTypes/<TypeName>/schema.json - (Optional) lightningTypes/<TypeName>/lightningDesktopGenAi/editor.json - (Optional) lightningTypes/<TypeName>/lightningDesktopGenAi/renderer.json - For Gen AI / Copilot the standard path is lightningDesktopGenAi/. Other targets (e.g. Experience Builder, Mobile Copilot, Enhanced Web Chat) use different subfolders when supported: experienceBuilder/, lightningMobileGenAi/, enhancedWebChat/.

  1. Configure custom LWC components (if using custom components)

- CRITICAL: Custom LWC components referenced in editor/renderer configs MUST have the correct target configuration in their -meta.xml files: - For editor components (c/<componentName> used in editor.json): The LWC's -meta.xml file must include <target>lightning__AgentforceInput</target> - For renderer components (c/<componentName> used in renderer.json): The LWC's -meta.xml file must include <target>lightning__AgentforceOutput</target> - Without the correct target, deployment will fail with: Invalid target configuration. To use 'c/componentName' as a renderer/editor, your js-meta.xml file must include valid target 'lightning__AgentforceOutput/Input'. - Example -meta.xml for a renderer component: <?xml version="1.0" encoding="UTF-8"?> <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> <apiVersion>60.0</apiVersion> <isExposed>true</isExposed> <targets> <target>lightning__AgentforceOutput</target> </targets> </LightningComponentBundle>

  1. Deploy and validate

- Run a final schema sanity check before deploy: valid lightning:type names, required fields present, and no disallowed keywords. - Deploy the bundle using your org's standard metadata deployment flow (e.g. Salesforce CLI or IDE). The MCP client or tooling in use should provide or integrate with the appropriate deploy/retrieve commands for Lightning Type bundles. - Validate incrementally: if deployment fails, remove disallowed keywords first (especially examples, items, nested lightning:type).

Common Deployment Errors

Error / SymptomLikely CauseFix
Schema validation fails due to unknown keywordunevaluatedProperties: false + disallowed keyword (commonly examples, items)Remove the offending keyword; keep schema minimal
Nested object validation failureOrg/channel validation rejects nested object typing in LightningTypeBundleUse CLT reference (c__<CLTName>) or Apex class types
Invalid CLT referenceReferenced CLT doesn't exist in org or incorrect syntaxDeploy the referenced CLT first; c__<CLTName> must match the referenced type’s lightning:type value / FQN / registered identifier, not title
Invalid or misspelled lightning:type (for example, lightning__richtextType instead of lightning__richTextType)Incorrect generated type nameCross-check all lightning:type values against supported type names and correct them before deployment
Array property rejectedUse of items (or lightning:type in nested arrays) rejected by validatorFor nested arrays: keep only type: "array". For root arrays: use minimal structure; remove items if rejected
Apex-based CLT rejectedExtra fields added (e.g., type, properties)Use only title, optional description, and lightning:type
Editor config rejectedUse of invalid patterns (es_property_editors/inputList, itemSchema) or unrecognized top-level keysUse editor.componentOverrides and editor.layout; keep config minimal
additionalProperties error on layout attributesAdding label or other attributes to lightning/propertyLayoutOnly use property attribute in lightning/propertyLayout. Remove label, title, or any other attributes
Invalid target configuration for custom LWCCustom LWC component's -meta.xml missing required target (lightning__AgentforceInput or lightning__AgentforceOutput)Add correct target to LWC's -meta.xml: use lightning__AgentforceInput for editors, lightning__AgentforceOutput for renderers
Attribute mapping doesn't exist in type schemaUsing {!$attrs.propertyName} where propertyName is not defined in schemaEnsure all attribute mappings reference actual properties in your type schema's properties section
additionalProperties error with deprecated keysUsing propertyRenderers or view in editor/renderer configReplace deprecated propertyRenderers with componentOverrides and view with layout
Type mismatch in component attributesPassing wrong type for component attribute (e.g., integer instead of string)Ensure attribute values match the expected type defined by the component

Verification Checklist

  • Root schema has type: "object", title, lightning:type: "lightning__objectType", and unevaluatedProperties: false
  • Root schema does not include examples when strict validation is enabled
  • No nested object includes lightning:type: "lightning__objectType"
  • Arrays are defined minimally (especially nested arrays)
  • Only supported primitive lightning:type identifiers are used for leaf properties
  • Apex class CLTs contain only title/description and lightning:type: "@apexClassType/..."
  • Bundle structure and filenames match Lightning Types requirements
  • Editor config uses only allowed patterns (no es_property_editors/inputList, no itemSchema); use valid components (e.g. es_property_editors/inputText, es_property_editors/inputNumber) or custom c/ components
  • Renderer config uses output-style components (e.g. es_property_editors/outputText, es_property_editors/outputNumber) where applicable, not input editors
  • Layout configurations use lightning/propertyLayout with ONLY the property attribute (no label, title, or other attributes)
  • All attribute mappings ({!$attrs.propertyName}) reference properties that exist in the type schema
  • Custom LWC components have correct targets in -meta.xml: lightning__AgentforceInput for editors, lightning__AgentforceOutput for renderers

平台分布

Codex

35.36%
按下载量换算989

Claude

30.84%
按下载量换算862

Cursor

19.63%
按下载量换算549

Gemini CLI

10.13%
按下载量换算283

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills