lwc

Provide guidelines and best practices for developing Lightning Web Components on the Salesforce Platform.

Updated Jan 23, 2026
One-click install
npx skills add https://github.com/pingqLIN/skill-0 --skill lwc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lwc
Source: https://github.com/pingqLIN/skill-0/tree/main/converted-skills/lwc
Command: npx skills add https://github.com/pingqLIN/skill-0 --skill lwc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides comprehensive guidelines and best practices to ensure efficient, maintainable, and performant development of Lightning Web Components (LWC) on the Salesforce Platform.

Core Features & Use Cases

  • Component Structure: Standardizes LWC folder and file organization.
  • Best Practices: Enforces the use of Lightning components over HTML tags, SLDS compliance, and reactive programming patterns.
  • Performance & Accessibility: Offers guidance on conditional rendering, error handling, and accessibility.
  • Use Case: A Salesforce developer needs to create a new custom component for a customer-facing portal. They consult this Skill to ensure their component adheres to Salesforce's recommended architecture, uses SLDS for styling, and implements proper data handling and error management.

Quick Start

Follow the LWC development guidelines to create a new component named 'accountDetails' within the 'force-app/main/default/lwc/' directory.

Frequently Asked Questions about lwc

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are the best practices for Lightning Web Components folder and file structure?

Standardizing Lightning Web Components folder and file organization involves structuring components within the 'force-app/main/default/lwc/' directory to maintain consistency and improve developer productivity across the codebase.

How do I ensure my LWC component follows Salesforce Lightning Design System compliance?

To ensure Salesforce Lightning Design System compliance, use built-in Lightning components instead of standard HTML tags and avoid custom CSS. This enforces recommended architecture and consistent styling for your LWC components.

What is the best way to handle data in Salesforce Lightning Web Components?

The best way to handle data in Lightning Web Components is by using wire services for reactive programming patterns. This approach ensures proper data handling, optimizes performance, and maintains component responsiveness.

How do I manage reactive properties and event handling in LWC architecture?

Managing reactive properties and event handling in LWC architecture involves using standard reactive programming patterns. This ensures efficient component communication, maintainable code, and proper state management within the Salesforce Platform.

Why should I use Lightning components over standard HTML tags in Salesforce LWC?

You should use Lightning components over standard HTML tags in Salesforce LWC to ensure SLDS compliance, maintain platform consistency, and avoid custom CSS. This approach improves component performance and accessibility.

Does this LWC development guideline cover error handling and accessibility?

Yes, these LWC development guidelines cover error handling and accessibility. They offer specific guidance on conditional rendering, performance optimization, and error management to ensure maintainable and accessible Lightning Web Components.