Visual Edit Precision

作者 wshobson46891e7e60da無授權條款收錄於 2026年10月8日更新於 2026年10月8日

Use when making UI/frontend changes guided by visual context, when the user selects elements visually, draws annotations, or provides screenshots alongside change requests. Also use when editing components where spatial context (element identity, DOM references, layout data) supplements text instructions.

AI 產生的概覽

在提供元素選取、標註或螢幕截圖等視覺脈絡時,引導進行最小幅度、有針對性的 UI/前端修改。

功能
這項技能提供一套流程,用於在視覺脈絡(例如選取的元素、繪製的標註或螢幕截圖)引導下進行 UI 與前端修改。流程包括:找出被指出的確切元素及其所屬元件檔案、將修改範圍限定在所指內容、保留現有樣式與行為、做出達成視覺效果的最小 CSS 或標記修改,並驗證結果。它也涵蓋同時處理多個視覺修改的情況,並列出常見錯誤。
適用情境
當修改請求附帶視覺脈絡時使用,例如使用者以視覺化方式選取元素、繪製標註,或在提出修改請求時提供螢幕截圖。它也適用於編輯元件時,元素身分、DOM 參照或版面配置資料等空間脈絡可補充文字說明的狀況。
執行需求
不需要指令碼或工具,僅為指示型技能。它假定代理程式能存取相關元件檔案與視覺脈絡。

Visual Edit Precision

Overview

When visual context accompanies a change request (element selections, annotations, screenshots), make targeted, minimal edits. Precision over ambition: change exactly what was indicated, preserve everything else.

Process

When visual context is provided:

  1. IDENTIFY - What exact element(s) were indicated? Which component file owns them?
  2. SCOPE - Change ONLY what was pointed at. Don't refactor surrounding code.
  3. PRESERVE - Keep existing styles, classes, and behavior. Only modify what was asked.
  4. TARGETED - Make the minimal CSS/markup change that achieves the visual result.
  5. VERIFY - Confirm the change renders correctly without side effects.

Key Principles

Precision Over Ambition

Visual context gives a SPECIFIC element. Don't:

  • Refactor the entire component when only one style was requested
  • Change the component's API when only its appearance was pointed at
  • Touch logic when only visuals were selected

Do:

  • Find the exact file and line for the selected element
  • Make the minimal edit that achieves the described visual change
  • Preserve all existing behavior, event handlers, accessibility

Multiple Edits

When multiple visual edits arrive:

  • Each targets its own element independently
  • Don't wait for one to finish before processing another
  • If two edits conflict (same element, different requests), handle the most recent

Common Mistakes

  • Rewriting an entire component when the user pointed at one button
  • Changing global config when only one element's color needs adjusting
  • Breaking responsive behavior by adding fixed widths to match a selection
  • Ignoring specificity (user indicated ONE card, agent changed ALL cards)
  • Removing accessibility attributes (aria-*, role, tabindex) during visual edits

來源與署名

來源:wshobson/agents位於plugins/skill-forge-essentials/skills/visual-edit-precision提交46891e7

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架