Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Consolidates manual DOM creation, updates, and constructors into private helper methods and structured state interfaces.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | -33% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -13% | 0% |
| case-06 | ✗→✓ | ▲ Improved | -45% | 0% |
| case-09 | ✗→✓ | ▲ Improved | -29% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -30% | 0% |
This subskill extracts manual layout building, attribute modifications, and rendering loops out of the constructor and scattered event handlers, consolidating them into private helper methods with explicit data contracts.
element.createChild('div'), document.createElement, element.appendChild).
render.methods (e.g., #updateSummaryBar(...) or #createEditorToolbar(...)).
pageSize,modified during buttons clicks) into centralized functions like onPageSizeChanged.
variables, e.g.
typescript #entries: Entry[]; #canGoBack: boolean; #canGoForward: boolean; #staleWarningVisible: boolean;
followed by a call to the public performUpdate() method that is calling previously extracted update helpers. Use this specific identifier.
performUpdate.
go through the performUpdate method
master call to Lit render inside performUpdate. The master template might include calls to the helper functions e.g.
typescript render(html <div class="specific-view"> <span>View Title</span> ${this.renderOverviewSection()} </div> , this.contentElement);
function signature around the existing code to minimize the diff.
code.
that first extracts the code that needs to be reordered into named helper functions and pause the migration, waiting for user confirmation.
Before reporting back or committing, re-read the instructions and verify:
Other measured skills in the registry, with their headline benchmark lift.