Skip to content

forcedotcom/sf-skills / plugins/builder/experience-lwc/skills/experience-lwc-generate

experience-lwc-generate

Unverified

Lightning Web Components with PICKLES methodology and 165-point scoring. Use this skill when the user creates or edits LWC components, builds wire service patterns, or writes Jest tests for LWC. 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 platform-apex-generate), Aura components, or Visualforce.

FileKindSize
README.mdmarkdown4.1 KB
SKILL.mdskill md9.6 KB
assets/apex-controller/LwcController.clsother12.0 KB
assets/basic-component/basicComponent.cssother1.5 KB
assets/basic-component/basicComponent.htmlother4.5 KB
assets/basic-component/basicComponent.jsscript7.3 KB
assets/basic-component/basicComponent.js-meta.xmlconfig4.5 KB
assets/datatable-component/datatableComponent.htmlother4.1 KB
assets/datatable-component/datatableComponent.jsscript13.1 KB
assets/flow-screen-component/flowScreenComponent.cssother1.7 KB
assets/flow-screen-component/flowScreenComponent.htmlother7.1 KB
assets/flow-screen-component/flowScreenComponent.jsscript13.9 KB
assets/flow-screen-component/flowScreenComponent.js-meta.xmlconfig3.9 KB
assets/form-component/formComponent.htmlother6.4 KB
assets/form-component/formComponent.jsscript11.3 KB
assets/graphql-component/graphqlComponent.htmlother4.8 KB
assets/graphql-component/graphqlComponent.jsscript10.7 KB
assets/jest-test/componentName.test.js.exampleother15.6 KB
assets/message-channel/RecordSelected.messageChannel-meta.xmlconfig2.4 KB
assets/message-channel/lmsPublisher.jsscript3.8 KB
assets/message-channel/lmsSubscriber.jsscript7.0 KB
assets/modal-component/modalComponent.htmlother3.2 KB
assets/modal-component/modalComponent.jsscript5.5 KB
assets/record-picker/recordPicker.htmlother2.0 KB
assets/record-picker/recordPicker.jsscript5.4 KB
assets/state-store/store.jsscript9.1 KB
assets/typescript-component/typescriptComponent.cssother1.3 KB
assets/typescript-component/typescriptComponent.htmlother4.3 KB
assets/typescript-component/typescriptComponent.js-meta.xmlconfig2.4 KB
assets/typescript-component/typescriptComponent.test.ts.exampleother13.6 KB
assets/typescript-component/typescriptComponent.tsscript11.7 KB
assets/workspace-api/workspaceComponent.htmlother3.4 KB
assets/workspace-api/workspaceComponent.jsscript8.0 KB
references/accessibility-guide.mdmarkdown22.3 KB
references/advanced-features.mdmarkdown2.8 KB
references/async-notification-patterns.mdmarkdown19.7 KB
references/cli-commands.mdmarkdown12.6 KB
references/component-patterns.mdmarkdown44.5 KB
references/flow-integration-guide.mdmarkdown19.0 KB
references/jest-testing.mdmarkdown25.3 KB
references/lms-guide.mdmarkdown21.9 KB
references/lwc-best-practices.mdmarkdown36.3 KB
references/performance-guide.mdmarkdown20.3 KB
references/scoring-and-testing.mdmarkdown3.8 KB
references/slds-blueprints.jsonconfig781.3 KB
references/slds-design-guide.mdmarkdown10.7 KB
references/state-management.mdmarkdown19.9 KB
references/template-anti-patterns.mdmarkdown20.1 KB
references/triangle-pattern.mdmarkdown12.5 KB
scripts/local-dev-preview.shscript1.1 KB
scripts/lwc-lsp-validate.pyscript8.6 KB
scripts/post-tool-validate.pyscript14.7 KB
scripts/slds_data/deprecated_patterns.jsonconfig3.4 KB
scripts/slds_data/styling_hooks.jsonconfig2.9 KB
scripts/slds_data/valid_slds_classes.jsonconfig7.4 KB
scripts/slds_linter_wrapper.pyscript8.9 KB
scripts/slds_rules/__init__.pyscript593 B
scripts/template_validator.pyscript13.5 KB
scripts/validate_slds.pyscript26.5 KB
# experience-lwc-generate

Lightning Web Components development skill with PICKLES architecture methodology, 165-point scoring, SLDS 2 compliance, and dark mode support. Build modern Salesforce UIs.

## Features

- **Component Scaffolding**: Generate complete LWC bundles (JS, HTML, CSS, meta.xml)
- **PICKLES Architecture**: Structured methodology for robust components
- **165-Point Scoring**: Validation across 8 categories (SLDS 2 + Dark Mode)
- **Wire Service Patterns**: @wire decorators for Apex & GraphQL
- **Jest Testing**: Comprehensive unit test generation
- **Spring '26 Features**: TypeScript, lwc:on, Complex Expressions

## Quick Start

### 1. Invoke the skill

```yaml
Skill: experience-lwc-generate
Request: "Create a data table component for Account records"
```

### 2. Answer requirements questions

The skill will ask about:
- Component purpose
- Data source (LDS, Apex, GraphQL)
- Target (App Page, Record Page, Flow Screen)
- Accessibility requirements

### 3. Review generated component

The skill generates:
- JavaScript controller with decorators
- HTML template with SLDS styling
- CSS with styling hooks (dark mode ready)
- meta.xml configuration
- Jest test file

## PICKLES Framework

```text
P → Prototype    │ Validate ideas with wireframes & mock data
I → Integrate    │ Choose data source (LDS, Apex, GraphQL, API)
C → Composition  │ Structure component hierarchy & communication
K → Kinetics     │ Handle user interactions & event flow
L → Libraries    │ Leverage platform APIs & base components
E → Execution    │ Optimize performance & lifecycle hooks
S → Security     │ Enforce permissions, FLS, and data protection
```

## Scoring System (165 Points)

| Category | Points | Focus |
|----------|--------|-------|
| Component Structure | 25 | File organization, naming |
| Data Layer | 25 | Wire service, error handling |
| UI/UX | 25 | SLDS 2, responsiveness, dark mode |
| Accessibility | 20 | WCAG, ARIA, keyboard navigation |
| Testing | 20 | Jest coverage, async patterns |
| Performance | 20 | Lazy loading, debouncing |
| Events | 15 | Component communication |
| Security | 15 | FLS, permissions |

## Templates

| Template | Use Case |
|----------|----------|
| `basic-component/` | Simple component starter |
| `graphql-component/` | GraphQL data binding |
| `flow-screen-component/` | Flow screen integration |
| `typescript-component/` | TypeScript support (Spring '26) |

## Cross-Skill Integration

| Related Skill | When to Use |
|---------------|-------------|
| platform-apex-generate | Create @AuraEnabled controllers |
| automation-flow-generate | Embed in Flow screens |
| generating-metadata | Create Lightning Message Channels |
| platform-metadata-deploy | Deploy component to org |


## Spring '26 Features (API 66.0)

- **lwc:on directive**: Dynamic event binding from JavaScript
- **GraphQL Mutations**: executeMutation for create/update/delete
- **Complex Expressions**: JS expressions in templates (Beta)
- **TypeScript Support**: @salesforce/lightning-types package
- **Agentforce Discovery**: lightning__agentforce capability

## Documentation

- [Best Practices](references/lwc-best-practices.md)
- [Flow Integration](references/flow-integration-guide.md)
- [Accessibility Guide](references/accessibility-guide.md)
- [Jest Testing](references/jest-testing.md)

## Jest Configuration for SFDX Projects

If your project uses Jest, scope discovery to your Salesforce source so example assets in agent folders are not picked up during `npm test`.

```javascript
const { jestConfig } = require('@salesforce/sfdx-lwc-jest/config');

module.exports = {
    ...jestConfig,
    roots: ['<rootDir>/force-app'],
    testPathIgnorePatterns: [
        '<rootDir>/node_modules/',
        '<rootDir>/.sfdx/',
        '<rootDir>/.agents/',
        '<rootDir>/.cursor/',
        '<rootDir>/.claude/',
        '<rootDir>/.pi/'
    ]
};
```

Example test assets in this skill now ship with a `.example` suffix. Copy them into your project and rename them before running Jest.

## Requirements

- sf CLI v2
- Node.js 18+ (for Jest tests)
- Target Salesforce org
- API Version 66.0+ (Spring '26)
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall