Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Claude loads one when your task matches it, or you run it by name.
lit, web-components, custom-elements, shadow-dom, accessibility, code-review, refactoring
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
An Agent Plugin (spec v1.0.0) containing comprehensive best practices for building Lit web components, optimized for AI-assisted code generation, review, and refactoring.
This skill contains 34 rules across 9 categories, prioritized by impact to guide automated refactoring and code generation:
| Category | Rules | Focus |
|---|---|---|
| Component Structure | 4 | Properties, state, TypeScript patterns |
| Rendering | 5 | Templates, directives, performance |
| Styling | 4 | Static styles, theming, CSS parts |
| Events | 3 | Custom events, naming, cleanup |
| Lifecycle | 4 | Callbacks, timing, async patterns |
| Accessibility | 4 | ARIA, focus, form association, ElementInternals |
| Performance | 4 | Updates, caching, lazy loading |
| Composition & Data | 3 | Reactive controllers, @lit/task, @lit/context |
| Security | 1 | Untrusted markup in templates |
This repository is a conformant Agent Plugin: clone it (or point your client at it) and the
client discovers skills/lit-best-practices/ from plugin.json.
Install as a plugin (manifest at .claude-plugin/plugin.json, skills auto-discovered from
skills/), or copy the skill directly:
npx skills add artmsilva/lit-best-practices
Copy skills/lit-best-practices/ into your project's skills directory, or paste its SKILL.md
into a conversation.
.
├── plugin.json # Agent Plugins v1.0.0 manifest
├── .claude-plugin/plugin.json # Claude Code plugin manifest
├── README.md # This file
└── skills/
└── lit-best-practices/
├── SKILL.md # Lightweight index + quick reference
├── AGENTS.md # High-level guidance for AI agents
└── rules/ # Individual rule files (loaded on-demand)
├── 1-1-use-decorators.md
├── 2-1-pure-render.md
└── ...
The rules are split into individual files so agents can load only the rules relevant to the current task, saving context.
The skill automatically activates when Claude detects tasks involving:
"Create a Lit component for a dropdown menu with keyboard navigation"
"Review this Lit component for accessibility issues"
"Refactor this component to follow Lit best practices"
"Add form association to this custom input component"
Rules are categorized by impact:
| Priority | Description | Action |
|---|---|---|
| CRITICAL | Major performance or correctness issues | Fix immediately |
| HIGH | Significant impact on maintainability/performance | Address in current PR |
| MEDIUM | Best practice violations | Address when touching related code |
| LOW | Style preferences and micro-optimizations | Consider during refactoring |
@property) from internal state (@state)render() methodsnothing for conditional contentrepeat() directive for keyed listscache() directive for view switchingwillUpdate()<style>):host element styling patternssuper call orderingfirstUpdated for DOM operationswillUpdate vs updated usageupdateCompletedelegatesFocus for interactive componentshasChanged functions@lit/task for async data and abort handling@lit/context instead of prop drillingunsafeHTML/unsafeSVG sanitization rulesContributions welcome! Please ensure:
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Generated from the plugin's indexed repository (artmsilva/lit-best-practices) — no native marketplace selected
npx claudepluginhub p/artmsilva-lit-best-practicesPlugins from other owners that cover similar ground