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 从公开仓库中收录这些内容。

举报或申请下架