技能视觉反馈
- 作者仓库星标 3,406
- 作者仓库 claude-octopus
- 领域
- 工程开发
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @nyldn · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- macOS · Linux · Windows
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 命令执行
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
第一阶段:视觉分析
当用户提供图像反馈时: 步骤 1:确认并检查 步骤 2:对问题进行分类 问题类型 · 示例 样式 · 颜色、字体、间距、边框
第 2 阶段:代码调查
步骤 1:找到相关组件 使用 Glob 查找组件文件: 使用 Grep 查找特定元素: 步骤 2:识别样式系统 步骤 3:读取受影响的文件
第三阶段:根本原因分析
第 1 步:确定问题存在的原因 常见根本原因: 根本原因 · 指标 样式不一致 · 同一元素有多种样式设计方法 缺少设计标记 · 硬编码颜色/间距
第四阶段:实施
步骤 1:创建修复计划 对于每个已识别的问题: 步骤 2:实施修复 使用编辑工具一次应用一个修复: 步骤 3:确保一致性
第五阶段:验证
步骤 1:目视验证清单 步骤 2:请求用户确认
> **Host: Codex CLI** — This skill was designed for Claude Code and adapted for Codex.
> Cross-reference commands use installed skill names in Codex rather than `/octo:*` slash commands.
> Use the active Codex shell and subagent tools. Do not claim a provider, model, or host subagent is available until the current session exposes it.
> For host tool equivalents, see `skills/blocks/codex-host-adapter.md`.
# Visual Feedback Processing
## Overview
Systematic approach to processing image-based UI/UX feedback, identifying visual issues, and implementing fixes.
**Core principle:** Analyze image → Identify issues → Locate code → Fix systematically → Verify visually.
## When to Use
**Use this skill when user provides:**
- Screenshots with UI/UX problems
- "[Image]" prefix with description of visual issues
- Complaints about "messy UI" or "hot mess UX"
- Button styling or layout issues with visual examples
- "This should look like X but shows as Y" with images
**Do NOT use for:**
- Pure code issues without visual context
- Feature requests without UI mockups
- Performance or functional bugs
- Backend issues
## The Process
### Phase 1: Visual Analysis
When user provides image feedback:
#### Step 1: Acknowledge and Examine
```markdown
I can see the screenshot showing [describe what you observe].
Let me analyze the visual issues:
**Observed Problems:**
1. [Issue 1: e.g., Button styles inconsistent]
2. [Issue 2: e.g., Layout misaligned]
3. [Issue 3: e.g., Colors don't match design system]
**Expected Behavior (from description):**
- [What user said it should be]
**Actual Behavior (from image):**
- [What the image shows]
```
#### Step 2: Categorize Issues
| Issue Type | Examples |
|------------|----------|
| **Styling** | Colors, fonts, spacing, borders |
| **Layout** | Alignment, positioning, responsive behavior |
| **Component** | Wrong component used, missing component |
| **State** | Hover states, active states, disabled states |
| **Consistency** | Inconsistent patterns across UI |
```markdown
**Issue Categories:**
- Styling: [list specific styling issues]
- Layout: [list layout issues]
- Component: [list component issues]
- State: [list state-related issues]
- Consistency: [list inconsistency issues]
```
### Phase 2: Code Investigation
#### Step 1: Locate Relevant Components
```bash
# Search for component files related to the issue
# Example: For settings page issues
```
Use Glob to find component files:
```
**/*settings*.{tsx,jsx,ts,js,vue,svelte}
**/*button*.{tsx,jsx,ts,js,vue,svelte}
```
Use Grep to find specific elements:
```
# Search for className patterns
pattern: "className.*button|btn-"
# Search for style definitions
pattern: "style={{|styled\.|makeStyles"
```
#### Step 2: Identify Styling System
```markdown
**Styling Approach Detected:**
- [ ] CSS Modules
- [ ] Styled Components
- [ ] Tailwind CSS
- [ ] Emotion/styled
- [ ] Plain CSS
- [ ] CSS-in-JS (other)
**Design System:**
- [ ] Custom design system
- [ ] Material-UI
- [ ] Ant Design
- [ ] Chakra UI
- [ ] Other: [name]
```
#### Step 3: Read Affected Files
Read the component files and associated styles to understand current implementation.
### Phase 3: Root Cause Analysis
#### Step 1: Identify Why Issue Exists
Common root causes:
| Root Cause | Indicators |
|------------|------------|
| **Inconsistent styling** | Multiple ways to style same element |
| **Missing design tokens** | Hard-coded colors/spacing |
| **Wrong component variant** | Using primary when should use secondary |
| **State not handled** | Missing hover/active/disabled styles |
| **Responsive issues** | Fixed widths, missing breakpoints |
| **Override conflicts** | Specificity wars, !important overuse |
| **Deprecated patterns** | Old styling approach still in use |
```markdown
**Root Cause Analysis:**
Issue: [specific visual problem]
Root Cause: [why it's happening]
Evidence: [code snippet or pattern showing the cause]
Impact:
- Affects: [which pages/components]
- Frequency: [how often users see this]
- Scope: [single instance or systemic]
```
#### Step 2: Scope the Fix
```markdown
**Fix Scope:**
Option 1: **Targeted Fix** (fix just this instance)
- Files to modify: [list]
- Risk: Low
- Coverage: Fixes reported issue only
Option 2: **Systematic Fix** (fix pattern everywhere)
- Files to modify: [list]
- Risk: Medium
- Coverage: Fixes all instances of this pattern
Option 3: **Design System Fix** (update base component)
- Files to modify: [design system files]
- Risk: Higher (affects many components)
- Coverage: Fixes root cause system-wide
**Recommendation:** [which option and why]
```
Use AskUserQuestion to get user preference on scope.
### Phase 4: Implementation
#### Step 1: Create Fix Plan
For each identified issue:
```markdown
**Fix Plan:**
Issue: [description]
File: [file path]
Change: [what to change]
Before: [code snippet or description]
After: [code snippet or description]
```
#### Step 2: Implement Fixes
Apply fixes one at a time, using Edit tool:
```markdown
Fixing [Issue 1]...
- File: [path]
- Change: [description]
✓ Fixed
Fixing [Issue 2]...
- File: [path]
- Change: [description]
✓ Fixed
```
#### Step 3: Ensure Consistency
If "everywhere" or "all instances" is mentioned:
```bash
# Search for all instances of the pattern
# Example: Find all primary buttons
```
Use Grep to find all instances, then fix each one:
```markdown
**Pattern Search:** "button.*primary"
Found in:
1. src/components/Header.tsx:45
2. src/pages/Settings.tsx:123
3. src/pages/Dashboard.tsx:67
Fixing all instances...
```
Fix each file systematically.
### Phase 5: Verification
#### Step 1: Visual Verification Checklist
```markdown
**Verification Checklist:**
Visual Issues:
- [ ] Button styles consistent
- [ ] Layout aligned properly
- [ ] Colors match design system
- [ ] Spacing is uniform
- [ ] Typography consistent
Responsive:
- [ ] Works on mobile
- [ ] Works on tablet
- [ ] Works on desktop
States:
- [ ] Default state correct
- [ ] Hover state correct
- [ ] Active state correct
- [ ] Disabled state correct
- [ ] Focus state accessible
**How to verify:**
1. Run dev server: `npm run dev`
2. Navigate to [affected page]
3. Check all items above
4. Compare with original screenshot
```
#### Step 2: Request User Confirmation
```markdown
✅ **Fixes Applied**
Changes made:
1. [Change 1]
2. [Change 2]
3. [Change 3]
**Please verify:**
- Open [URL or page]
- Check that [specific issue] is now resolved
- Verify no new issues introduced
Let me know if the visual issues are resolved or if further adjustments are needed.
```
## Common Patterns
### Pattern 1: Button Style Consistency
```
User: "[Image] these button styles need to be fixed everywhere"
Process:
1. Analyze image - identify button style issues
2. Search for all button components
3. Identify design system button component
4. Update base button component OR
5. Update all instances to use correct variant
6. Verify consistency across app
```
### Pattern 2: Layout Misalignment
```
User: "[Image] When logo position is set to Top right, it shows as Middle right"
Process:
1. Analyze image - see position mismatch
2. Find logo positioning code
3. Identify why "Top right" maps to "Middle right"
4. Fix the mapping or positioning logic
5. Test all position options
6. Verify with user
```
### Pattern 3: Settings UI Issues
```
User: "[Image] The /settings should be dropdowns not text inputs"
Process:
1. Analyze image - see text inputs instead of dropdowns
2. Navigate to settings component code
3. Identify field definitions
4. Replace input components with select/dropdown
5. Ensure options are populated correctly
6. Verify all settings fields
```
### Pattern 4: General "Hot Mess" Feedback
```
User: "why is the Display Ad Creator UX still a hot mess?"
Process:
1. Ask for specific issues or screenshot
2. If provided, analyze systematically
3. Create prioritized list of issues
4. Fix highest-impact issues first
5. Verify improvements with user
```
## Integration with Other Skills
### With skill-debug
```
Visual issue that doesn't make sense?
→ Use skill-debug to investigate why visual state is incorrect
```
### With skill-audit
```
User says "fix these everywhere"?
→ Use skill-audit to find all instances
→ Use skill-visual-feedback to fix each systematically
```
### With flow-tangle
```
Visual feedback requires new component?
→ Use flow-tangle to implement the component
→ Use skill-visual-feedback to verify it matches design
```
## Best Practices
### 1. Always Acknowledge the Visual Evidence
**Good:**
```
I can see in the screenshot that the button has inconsistent padding and the wrong color scheme compared to other primary buttons in the interface.
```
**Poor:**
```
I'll fix the button.
```
### 2. Be Specific About Changes
**Good:**
```
Changing:
- Button background: #3498db → #2563eb (primary-600)
- Padding: 8px 12px → 12px 16px
- Border radius: 4px → 6px
```
**Poor:**
```
Updating button styles.
```
### 3. Consider Mobile/Responsive
Always check if the fix works across breakpoints:
```markdown
**Responsive Verification:**
- Mobile (< 768px): [status]
- Tablet (768px - 1024px): [status]
- Desktop (> 1024px): [status]
```
## Red Flags - Don't Do This
| Action | Why It's Wrong |
|--------|----------------|
| Fix without analyzing the image | Might fix wrong thing |
| Change only one instance when user says "everywhere" | Incomplete fix |
| Use !important to force styles | Creates specificity problems |
| Hard-code colors instead of using design tokens | Inconsistent with system |
| Skip verification | User has to report same issue again |
| Make assumptions without asking | Might not match user's vision |
## Quick Reference
| User Feedback Pattern | Action Required |
|----------------------|-----------------|
| "[Image] X should be Y" | Analyze image → Find code → Fix → Verify |
| "Button styles everywhere" | Find all instances → Fix systematically |
| "UI is a mess" | Request specifics → Prioritize → Fix incrementally |
| "When X, shows Y instead of Z" | Debug state/logic → Fix mapping → Test all cases |
## The Bottom Line
```
Visual feedback → Image analysis + Systematic fix + Visual verification
Otherwise → Guessing at fixes + Incomplete coverage
```
**See the issue. Understand the root cause. Fix it everywhere. Verify visually.**
章节与文件索引
按说明文件中的顺序排列。
概述
何时使用
第一阶段:视觉分析
第 2 阶段:代码调查
第三阶段:根本原因分析
文件/命令 -> /octo:* · skills/blocks/codex-host-adapter.md · npm run dev · UI/UX · Emotion/styled · colors/spacing · hover/active/disabled · pages/components
内容校验值 -> fb6cd378742f
当前原文的自动摘译,尚未人工审校。
概述
处理基于图像的 UI/UX 反馈、识别视觉问题和实施修复的系统方法。核心原则:分析图像→识别问题→定位代码→系统修复→目视验证。
何时使用
当用户提供以下内容时,请使用此技能: 有 UI/UX 问题的屏幕截图 “[Image]”前缀,带有视觉问题的描述 关于“混乱的 UI”或“混乱的 UX”的投诉 带有视觉示例的按钮样式或布局问题