sf-lwc
Lightning Web Components with PICKLES methodology and 165-point scoring. TRIGGER when: user creates/edits LWC components, touches lwc/**/*.js, .html, .css, .js-meta.xml files, or asks about wire service, SLDS, or Jest LWC tests. DO NOT TRIGGER when: Apex classes (use sf-apex), Aura components, or Visualforce.
Security Assessment
About sf-lwc
This skill guides development of Salesforce Lightning Web Components (LWC) using a structured 'PICKLES' methodology and a 165-point quality scoring rubric across eight categories (including SLDS 2 and dark-mode compliance). It solves the problem of building LWC bundles that are architecturally sound, accessible, well-styled, performant, and testable, and it clearly scopes ownership: it handles lwc/**/*.js, .html, .css, and .js-meta.xml files, wire patterns, Apex/GraphQL integration, SLDS 2 styling, and Jest tests, while delegating Apex controllers, Flow XML, and metadata deployment to sibling skills (sf-apex, sf-flow, sf-deploy).
The workflow directs the agent to gather context (component purpose, data source, testing and runtime targets), choose an architecture via the PICKLES mindset (prototype, integrate data, compose boundaries, define interaction, use platform libraries, optimize, enforce security), pick the right data-access pattern from a decision table (LDS/getRecord, base record-form components, cacheable Apex, GraphQL wire adapter, or Lightning Message Service), and start from provided asset bundles (datatables, modals, Flow screen components, GraphQL components, LMS channels, Jest tests, TypeScript components). It codifies high-signal rules such as preferring platform base components, avoiding hardcoded colors in favor of SLDS 2 styling hooks, avoiding rerender loops, and using @wire for reactive reads versus imperative calls for DML. It includes a detailed Jest testing reference and Python-based SLDS linting/validation hooks, plus local development server commands for hot-reload previews.
Target users are Salesforce developers and AI agents building or reviewing LWC front ends who want consistent accessibility, SLDS 2/dark-mode styling, and test coverage. It is a code-convention and development-guidance skill with local tooling, posing no risky operations.
FAQ
What is the PICKLES methodology?
A structured mindset for LWC architecture: prototype, integrate the right data source, compose component boundaries, define the interaction model, use platform libraries, optimize execution, and enforce security.
When should I use this skill versus sf-apex or sf-flow?
Use sf-lwc for LWC bundles, wire/Apex/GraphQL integration, SLDS 2 styling, accessibility, and Jest tests. Delegate Apex controllers to sf-apex, Flow XML to sf-flow, and deployment to sf-deploy.
How do I pick a data access pattern?
The skill provides a decision table: LDS/getRecord for single-record UI, base record-form components for simple CRUD, cacheable Apex for complex queries, the GraphQL wire adapter for related graph data, and Lightning Message Service for cross-DOM communication.
Does it support testing?
Yes. It includes an advanced Jest testing reference and ships example test assets (with a .example suffix) to copy into a component's __tests__ directory, plus a suggested 80% coverage threshold.
Can I preview components locally?
Yes. It documents SF CLI Local Dev commands (sf lightning dev component/app/site) for hot-reload previews that require an active org connection for data and Apex callouts.
All Files
58 filesInstall sf-lwc
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
jaganpro/sf-skills