Migrates legacy imperative DOM construction to local declarative Lit-html templates rendered inside existing containers.
58
67%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.mdThis subskill converts consolidated imperative DOM construction helper methods into reactive, declarative Lit-html templates, rendering them locally inside the existing element containers.
Conserve Abstraction Topology:
Determine Render Lifecycle per Layer:
performUpdate() to execute
the main lit render call, and use this.requestUpdate() to queue
updates.update() or scheduleUpdate()) and invoke render() directly inside
that method. Do not introduce Widget lifecycle methods
(performUpdate) on classes that do not inherit them.Import Modern Templating:
Import the Lit rendering system inside the view module:
import {html, render, nothing} from '../../ui/lit/lit.js';Modern Component Mapping:
devtools-toolbar). Do not assume standard Lit defaults.Local Modular Renders:
appendField or createChild on a parent layout),
prefer local modular renders (rendering templates individually into
each container) to preserve the legacy layout framework. Do not force a
monolithic template if doing so violates the existing topology.Resolve TypeScript Type Friction:
Element. Lit's render()
function expects HTMLElement | DocumentFragment.as HTMLElement or update its class property type definition from Element
to HTMLElement to satisfy the TypeScript compiler.render(this.template(), this.containerField as HTMLElement);Delegate to Unmigrated Rendering Engines:
HTMLElement or Element instances directly. Treat unmigrated utilities as "black boxes" that generate DOM, and embed their output in standard template expressions: htmlHandle Asynchronous DOM Updates:
.then() callback), render the parent container or a placeholder
template first. Once the data is retrieved, execute a local render()
inside the callback targeting the specific sub-container.Template Factorization Strategies:
nothing: Use Lit's nothing sentinel instead of empty
strings '' or empty templates for conditional rendering.LitTemplate. This avoids
monoliths, preserves readability, and reuses template cache strategies.Visual Parity, CSS Adaptation, and Accessibility:
DataGrid with <devtools-data-grid>), inspect and update the associated .css file. Replace legacy class selectors (.data-grid) with tag selectors (devtools-data-grid).span to
div) or drop class names during template translation, as CSS may
depend on them.<devtools-button>) defaults may not match legacy appearance.
Explicitly bind .data=${{variant: Buttons.Button.Variant.OUTLINED}}
(or appropriate variant) rather than relying on defaults.ARIAUtils.markAsAlert()) to native ARIA
attributes in the template (e.g., role="alert", aria-live="polite").Render Templates Syntax & Code Movement:
// clang-format off and // clang-format on to prevent clang-format from
corrupting template indentation.Micro-Commit Strategy:
Wait for confirmation:
Before reporting back or committing, re-read the instructions and verify:
span to div (or vice versa)?aria-*, role, or custom data attributes?// clang-format off?184a74d
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.