Scaffold a Lightning Web Component bundle (.html / .js / .js-meta.xml) with an FLS-aware Apex controller. Use when creating a new LWC.
Scanned 9/23/2026
npx -y skills add mcorbett51090/RavenClaude --skill lwc-component-scaffold --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Lwc Component Scaffold?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/mcorbett51090-lwc-component-scaffold)More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.
---
name: lwc-component-scaffold
description: Scaffold a Lightning Web Component bundle (.html / .js / .js-meta.xml) with an FLS-aware Apex controller. Use when creating a new LWC.
---
# LWC Component Scaffold
Generate a complete LWC bundle wired to a secure, cacheable Apex controller.
## When to use
Creating a new Lightning Web Component that reads or writes Salesforce data.
## Steps
1. **Bundle trio.** Produce `<name>.html`, `<name>.js`, and `<name>.js-meta.xml` with the right `apiVersion`, targets, and exposure. See `templates/lwc-bundle.md`.
2. **Wire data the lightning way.** Prefer `@wire` to a cacheable Apex method or to `getRecord`/UI API over imperative calls; reach for imperative Apex only for user-triggered actions.
3. **FLS-aware controller.** The Apex controller method is `@AuraEnabled(cacheable=true)` for reads, uses `WITH USER_MODE` (or `Security.stripInaccessible`), and is `with sharing`. **At API v67.0+ `WITH SECURITY_ENFORCED` no longer compiles** — use `WITH USER_MODE`. (House opinions #6-#7.) `[verify-at-build]`
4. **Bulk-safe controller.** No SOQL/DML in loops; accept and return collections where the UI is list-shaped.
5. **Error handling.** Surface controller errors to the template; never swallow them.
## Output
The three bundle files, the Apex controller, and a note on which FLS enforcement and sharing mode were applied. Escalate any security concern to `ravenclaude-core/security-reviewer`.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!