create-lwc

create-lwc is a command for Claude Code from karkranikhil/sf-ai-toolkit. It costs 0 tokens per session (219 once invoked), scanned A, original, MIT.

A command for creating a Salesforce Lightning Web Component and, when needed, its Apex controller and Jest test. A Lightning Web Component is a reusable user-interface element in Salesforce; Jest is a tool for testing JavaScript.

In plain words
What is it for?
Use it to add Salesforce screens or widgets that display data, accept user interactions, and connect securely to Apex.
Why use it?
It provides handling for loading, errors, and empty results while keeping data access and user-facing text subject to Salesforce security and project conventions.

Command for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to add Salesforce screens or widgets that display data, accept user interactions, and connect securely to Apex.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/karkranikhil/sf-ai-toolkit/create-lwc
Install

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.

Clone the repo
git clone --depth 1 https://github.com/karkranikhil/sf-ai-toolkit

Made for: Claude Code.

Wrote 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.

agentmods badge for create-lwc

README.md
[![agentmods](https://agentmods.dev/badge/commands/karkranikhil/sf-ai-toolkit/create-lwc/github.svg)](https://agentmods.dev/commands/karkranikhil/sf-ai-toolkit/create-lwc)
Your own site
<a href="https://agentmods.dev/commands/karkranikhil/sf-ai-toolkit/create-lwc"><img src="https://agentmods.dev/badge/commands/karkranikhil/sf-ai-toolkit/create-lwc/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.

agentmods 80×15 button for create-lwc

Your own site · 80×15
<a href="https://agentmods.dev/commands/karkranikhil/sf-ai-toolkit/create-lwc"><img src="https://agentmods.dev/badge/commands/karkranikhil/sf-ai-toolkit/create-lwc.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 219 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00219
Opus 5.5 $0.00000 $0.00088
Sonnet 5.5 $0.00000 $0.00044
Haiku 4.5 $0.00000 $0.00022

Measured 2mo ago against content hash 8d9175c0a39a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

create-lwc 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 2mo 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.

examples/existing-project-after/.claude/commands/create-lwc.md · 31 lines

What it actually says

/create-lwc

Create a new Lightning Web Component with loading, error, empty state, and secure Apex integration.

Required input

  • Component name and purpose
  • Data needed (object, fields)
  • User interactions required
  • Whether an Apex controller is needed

What to create

  1. HTML template — with loading spinner, error display, empty state, and main content
  2. JavaScript controller — wire or imperative Apex, error handling, loading state
  3. CSS — minimal, follows existing patterns
  4. Apex controller (if needed) — cacheable where appropriate, CRUD/FLS enforced
  5. Jest test — renders correctly, handles wire data and errors

Rules

  • Always show loading, error, and empty states
  • Use Custom Labels for user-visible strings
  • Enforce CRUD/FLS in Apex controller
  • No sensitive data in component attributes or events
  • Follow existing component patterns in the project

Output

Provide all files. Explain the component structure and data flow.

Changes

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.

  1. 2mo ago First seen · 31 lines · 0 tokens per session scan A 8d9175c0a39a

Subscribe to this mod's changes

create-lwc is a command published in the GitHub repository karkranikhil/sf-ai-toolkit (2 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 219 tokens. 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-08-31.

Related

create-lwc compared with commands from other repositories

create-lwc next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
create-lwckarkranikhil/sf-ai-toolkitCommand26mo agoMITA0Claude Code
checklistgithub/spec-kitCommand148ktodayMITA13Claude Code
clarifygithub/spec-kitCommand148ktodayMITA27Claude Code
specifygithub/spec-kitCommand148ktodayMITA13Claude Code
analyzegithub/spec-kitCommand148ktodayMITA26Claude Code
convergegithub/spec-kitCommand148ktodayMITA35Claude Code
implementgithub/spec-kitCommand148ktodayMITA14Claude Code