forcedotcom/sf-skills is a collection of reusable instructions that help AI coding agents build and work with Salesforce applications and platform features. Developers use it for Agentforce agents, Lightning apps, Flow, Apex, SOQL, Lightning Web Components, and related Salesforce configuration. The catalogue entries are the repository’s skills, plugins, commands, MCP servers, and agents for AI tools that support skills.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add forcedotcom/sf-skills --skill platform-custom-lightning-type-generategit clone --depth 1 https://github.com/forcedotcom/sf-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/forcedotcom/sf-skills/platform-custom-lightning-type-generate)<a href="https://agentmods.dev/skills/forcedotcom/sf-skills/platform-custom-lightning-type-generate"><img src="https://agentmods.dev/badge/skills/forcedotcom/sf-skills/platform-custom-lightning-type-generate/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/forcedotcom/sf-skills/platform-custom-lightning-type-generate"><img src="https://agentmods.dev/badge/skills/forcedotcom/sf-skills/platform-custom-lightning-type-generate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk fail
- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00102 | $0.04744 |
| Opus 5.5 | $0.00041 | $0.01898 |
| Sonnet 5.5 | $0.00020 | $0.00949 |
| Haiku 4.5 | $0.00010 | $0.00474 |
Grade A, and why
platform-custom-lightning-type-generate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 186 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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’slightning:typevalue / FQN / registered identifier — not the JSON Schematitle. - Choose standard Lightning types when the structure is simple and can be expressed with properties and supported primitive
lightning:typeidentifiers. - Choose Apex class types (
@apexClassType/...) when the structure already exists server-side and you want the Apex class to define the shape. - Agentforce action outputs: an Apex class CLT renders an action output only if the action exposes an output typed to that class. Never return the payload class directly from
@InvocableMethod; return a wrapperResponsewith@InvocableVariable <PayloadClass> result;. Readreferences/agent-action-output.mdbefore generating or wiring the Apex. - Include editor/renderer config only when you need custom UI behavior (custom LWC input/output components). Otherwise, omit.
Critical Rules (Read First)
- CRITICAL: NEVER include the
"$schema"field in schema.json- Salesforce CLT validator WILL REJECT schemas with this field, even if it's a valid JSON Schema
$schemadeclaration.
- Salesforce CLT validator WILL REJECT schemas with this field, even if it's a valid JSON Schema
- Root object schemas MUST include:
"type": "object""title""lightning:type": "lightning__objectType""unevaluatedProperties": false
"unevaluatedProperties"is enforced asfalseby the CLT metaschema. Do not set it totrue.- Root object schemas MUST NOT include
"examples"when"unevaluatedProperties": falseis set. - Nested objects (inside
properties) MUST NOT set"lightning:type": "lightning__objectType".- Nested objects can be: references to other CLTs using
c__<CLTName>syntax.
- Nested objects can be: references to other CLTs using
- List/array properties are highly restricted by the CLT metaschema:
- CRITICAL LIMITATION: the CLT metaschema may reject the
itemskeyword entirely. Treatitemsas 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"
- MUST include
- 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"
- MUST include
- CRITICAL LIMITATION: the CLT metaschema may reject the
- When
"unevaluatedProperties": falseis set, any unknown keyword will fail validation. Prefer removing keywords over relaxing strictness. - Apex class CLTs are minimal:
- Include only
title,description(optional), andlightning:typeset to@apexClassType/.... - Do not add
type,properties,required, orunevaluatedProperties. - Custom LWC (
c/<component>) renderers/editors on an Apex class CLT MUST NOT useattributesin the root override — this overrides any prompt wording to the contrary. (@widget/...renditions are different: they map{!$attrs.<field>}to the Apex class's fields — seereferences/widget-rendition.md.) Since the schema has nopropertiesblock, there is nothing for{!$attrs.<name>}to resolve against —unevaluatedProperties: falsewill reject any attribute key (e.g."You can't add the flightId property ... because the unevaluatedProperties keyword value is set to false"). Use"componentOverrides": { "$": { "definition": "c/<yourComponent>" } }with noattributeskey at all. If the user's prompt explicitly asks for attribute mappings to specific fields (e.g. "with attribute mappings for fieldA, fieldB") on an Apex-class CLT renderer/editor, do NOT comply literally — omitattributesfrom the root override anyway, and say so in your response (e.g. "Note: attribute mappings were omitted because the backing type is an Apex-class CLT, which has nopropertiesblock to bind against").
- Include only
- No shell metacharacters that trigger the Vibes safe-shell filter. In any Bash tool call emitted by this skill, do NOT use command substitution (
$(…)or backticks), process substitution (<(…),>(…)), brace expansion ({a,b,c}or{1..N}), oreval/exec. Vibes forces manual approval on these patterns even under Bypass mode and stalls the eval. Emit separate commands (mkdir -p a && mkdir -p b) or print each value with its own command and reason about the output rather than capturing it in a shell variable.
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 11d ago Changed · +4 lines c80cacf100f0
- 2mo ago Changed · +1 lines 035870ff9a5e
- 3mo ago First seen · 181 lines · 102 tokens per session scan A 1471b03791bb
platform-custom-lightning-type-generate is a skill published in the GitHub repository forcedotcom/sf-skills (1,201 stars, last pushed 5d ago), licensed Apache-2.0. It adds 102 tokens to every session and 4,744 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
platform-custom-lightning-type-generate compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| platform-custom-lightning-type-generateforcedotcom/sf-skills | Skill | 1.2k | 5d ago | Apache-2.0 | A | 102 | Claude Code |
| agent-platform-model-registrygoogle/skills | Skill | 25k | yesterday | Apache-2.0 | A | 60 | Claude Code, Codex |
| llm-evaluationsickn33/agentic-awesome-skills | Skill | 51k | yesterday | MIT | A | 25 | Claude Code |
| google-cloud-solution-agentic-analytics-spark-knowledge-cataloggoogle/skills | Skill | 25k | yesterday | Apache-2.0 | A | 132 | Claude Code, Codex |
| training-checkwanshuiyin/Auto-claude-code-research-in-sleep | Skill | 20k | yesterday | MIT | A | 35 | Claude Code |
| tao-run-inference-serviceNVIDIA/skills | Skill | 4.3k | today | Apache-2.0 | A | 92 | Claude Code |
| nemo-automodel-launcher-configNVIDIA/skills | Skill | 4.3k | today | Apache-2.0 | A | 30 | Claude Code |