一键导入
ui-eng-vision-logic-consolidator
Consolidates manual DOM creation, updates, and constructors into private helper methods and structured state interfaces.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Consolidates manual DOM creation, updates, and constructors into private helper methods and structured state interfaces.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | ui-eng-vision-logic-consolidator |
| description | Consolidates manual DOM creation, updates, and constructors into private helper methods and structured state interfaces. |
| allowed-tools | code_search open_urls |
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.
Identify UI updates Creation:
element.createChild('div'), document.createElement,
element.appendChild).render.Isolate Update and Draw Operations:
#updateSummaryBar(...) or #createEditorToolbar(...)).pageSize,
modified during buttons clicks) into centralized functions like
onPageSizeChanged.Define the State Interface:
Identify the class state and ensure it is captured in the private member variables, e.g.
#entries: Entry[];
#canGoBack: boolean;
#canGoForward: boolean;
#staleWarningVisible: boolean;
Replace direct mutations of UI with updates to these member variables,
followed by a call to the public performUpdate() method that is
calling previously extracted update helpers. Use this specific
identifier.
If there's only one or two update helpers, consider inlining them into the
performUpdate.
Extract/Consolidate Rendering Operations:
If Logic First (imperative DOM remains), make sure all updates to the UI go through the performUpdate method
If Lit First (Lit template already exists), make sure there's a single master call to Lit render inside performUpdate. The master template might include calls to the helper functions e.g.
render(html`
<div class="specific-view">
<span>View Title</span>
${this.renderOverviewSection()}
</div>
`, this.contentElement);
Minimize Diffs (Safety Rule):
Wait for confirmation:
Use when migrating Chromium layout tests to DevTools unit tests
Use when starting a new task, creating a branch, switching branches, managing branches, creating and uploading CLs, handling stacked changes, or checking release and roll status in the DevTools Gerrit-based workflow. ALWAYS use this instead of running standard git checkout/switch commands for branch creation.
Reproduce and investigate flakiness in a test.
Refactor user-facing UIStrings and localization comments in a DevTools module folder according to UX writing guidelines (child task of b/40799900). Use when simplifying wording, checking sentence case, or improving L10n comments in UIStrings for a specific folder or issue. Don’t use for general code changes or non-UIStrings files.
Migrates legacy imperative DOM construction to local declarative Lit-html templates rendered inside existing containers.
High-level orchestrator for managing multi-pass migration of Chrome DevTools legacy components to the modern UI engineering vision (UI.Widget & Lit-html).