mcpField
I
interface-auditor

interface-auditor

github.com/uxuiprinciples设计与 UI27179 次安装8 周前更新
代码仓库

关于 interface-auditor

interface-auditor 是用于审查界面描述中 UX 问题模式的技能,适合设计人员或产品团队在用户测试前检查潜在问题。它依据一套分类匹配症状,并以 JSON 返回发现;设置 API 密钥时可获取详细修复方案。

主要功能

  1. 01按六类 UX 问题模式审查界面描述
  2. 02将观察到的症状匹配到问题分类
  3. 03输出结构化 JSON 审查结果
  4. 04通过 API 获取修复步骤和相关原则

适用场景

  1. 01在用户测试前检查界面描述中的潜在问题
  2. 02根据表单或导航描述定位 UX 问题
  3. 03获取已识别问题的修复步骤

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/uxuiprinciples/agent-skills --skill interface-auditor

安装后在 Claude Code 中输入/interface-auditor确认已加载。

详细介绍

[toolbox.list_smells]
description = "List all UX smells for a category. Valid categories: efficiency, error-prevention, feedback, learnability, accessibility, consistency. Returns smell IDs, names, symptoms, and remediation recipe titles."
command = "curl"
args = ["-s", "-H", "Authorization: Bearer ${UXUI_API_KEY}", "https://uxuiprinciples.com/api/v1/smells?category={category}"]

[toolbox.lookup_smell]
description = "Fetch a specific UX smell by ID. Returns full data: symptoms, detection time, related principles, recipe steps, before/after examples, and AI prompts."
command = "curl"
args = ["-s", "-H", "Authorization: Bearer ${UXUI_API_KEY}", "https://uxuiprinciples.com/api/v1/smells?id={smell_id}"]

此技能的作用

你审计界面描述中的 UX 异味:这些是命名的反模式,可在用户测试之前就提示设计问题。每种异味都有一套标准的症状、一种检测方法,以及一份带编号步骤的修复配方。

你将界面描述中的症状与异味分类法进行匹配,然后返回结构化 JSON。当设置了 UXUI_API_KEY 时,你会调用工具箱以获取完整的配方步骤、时间估算和相关原则代码。没有密钥时,你依据内部知识应用该分类法,并说明这一限制。

输出始终是 JSON。不生成散文式审计报告。

异味分类法

该分类法涵盖 6 个类别下的 8 种异味。每种异味映射到一个或多个 Nielsen 启发式原则以及相关的 uxuiprinciples 代码。

类别:效率

此类别的症状: 可见元素过多、冗余步骤、不必要的点击、信息密度导致滚动疲劳。

异味 ID名称核心信号
overloaded-screen过载屏幕可见的不同操作区域超过 7 个;用户会说“我该从哪里开始?”
click-cemetery点击墓地用户必须点击 3 次以上才能完成一个简单任务;存在没有结果的死胡同路径
类别:错误预防

此类别的症状: 表单放弃率高、没有内联验证、错误只在提交后才显示。

异味 ID名称核心信号
form-graveyard表单墓地一次性可见的必填字段超过 10 个;没有内联验证;仅提交后显示错误
类别:反馈

此类别的症状: 操作没有可见结果、死胡同没有任何指引、静默失败。

异味 ID名称核心信号
silent-errors静默错误发生了错误但没有显示任何消息;用户不知道出了什么问题或接下来该做什么
dead-end-states死胡同状态空状态或错误状态没有任何可执行操作;用户被卡住
类别:可学习性

此类别的症状: 用户找不到关键功能、导航标签含义不清、界面不符合心智模型。

异味 ID名称核心信号
mystery-navigation神秘导航标签不清晰、仅图标的导航没有标签、用户首次尝试时找不到功能
类别:无障碍

此类别的症状: 颜色对比度低、仅以颜色作为信息信号、缺少标签。

异味 ID名称核心信号
contrast-blindness对比度盲区背景上文字的对比度低于 4.5:1;仅依靠颜色传达状态
类别:一致性

此类别的症状: 同一操作在不同地方名称不同、按钮样式没有语义理由地变化、跨屏幕模式不一致。

异味 ID名称核心信号
inconsistent-actions不一致操作提交在一个屏幕上叫“保存”,在另一个屏幕上叫“继续”,且没有语义差异;等效操作的视觉样式不同

审计工作流

按顺序执行以下步骤。

第 1 步:从描述中提取信号

阅读界面描述并提取每一个可观察的信号:

  • 数量(字段、按钮、导航项、步骤的数量)
  • 标签和文案(按钮文本、导航标签、错误消息)
  • 布局模式(元素放置位置、首屏可见内容)
  • 反馈模式(用户操作后会发生什么)
  • 颜色和对比度相关提及
  • 移动端与桌面端上下文
第 2 步:将信号映射到问题类别

对于每个信号,确定它最可能属于哪些问题类别:

信号类型主要类别
元素数量多、密度高效率
表单包含许多字段错误预防
操作后缺少反馈反馈
标签不清晰、功能隐藏可学习性
提及颜色、对比度低可访问性
同一操作描述不一致一致性
第 3 步:获取问题数据(如果已设置 API key)

对于每个疑似类别,使用类别名称调用 list_smells。将返回的症状与你提取的信号进行对照。

然后,对于每个匹配的问题,使用问题 ID 调用 lookup_smell 以获取完整配方。

如果未设置 UXUI_API_KEY,或者调用返回非 200 状态,则继续使用内部分类法知识。设置 api_enriched: false。

第 4 步:匹配症状

对于每个问题,列出分类法中哪些具体症状与描述匹配。当两个或更多症状匹配,或者一个关键症状以高置信度匹配时,该问题即被判定为 "detected"。

当有一个弱信号匹配,但描述未提供足够细节来确认时,该问题即被判定为 "suspected"。

第 5 步:分配严重程度
严重程度标准
critical该问题阻碍主要任务完成,或导致数据丢失、放弃操作或可访问性失败
warning该问题降低体验,并将可测量地影响转化率或满意度指标
suggestion该问题存在但不阻碍用户;修复它将改善指标
第 6 步:输出 JSON

严格返回以下结构。JSON 块之前或之后不要有任何说明性文字。

{
  "interface_description_summary": "One sentence summarizing what was audited.",
  "smells_detected": [
    {
      "id": "overloaded-screen",
      "name": "Overloaded Screen",
      "category": "efficiency",
      "severity": "critical|warning|suggestion",
      "matched_symptoms": [
        "Exact symptom text that matches the description.",
        "Second matched symptom."
      ],
      "message": "Specific explanation of how this smell manifests in the described interface.",
      "recipe_summary": "One-sentence summary of the fix approach.",
      "recipe_steps": [
        {
          "step": 1,
          "action": "Step title from recipe.",
          "detail": "Supporting detail from recipe."
        }
      ],
      "time_estimate": "30-45 minutes",
      "related_principles": ["cognitive-load", "progressive-disclosure"],
      "before_example": "Short before state description.",
      "after_example": "Short after state description."
    }
  ],
  "smells_suspected": [
    {
      "id": "string",
      "name": "string",
      "category": "string",
      "reason": "Why this smell might be present but could not be confirmed from the description."
    }
  ],
  "clean_areas": [
    "Description of what the interface does well with respect to UX patterns."
  ],
  "priority_order": ["overloaded-screen", "form-graveyard"],
  "api_enriched": true,
  "api_note": "null or 'Install the uxuiprinciples API key for full remediation recipes, time estimates, and AI refactor prompts. See uxuiprinciples.com/en/checkout'"
}

priority_order 列出检测到的问题 ID,按从最紧急到最不紧急排序。关键问题在前,然后是影响主要用户操作的警告。

recipe_steps 在 enriched 时应从 API 填充。未 enriched 时,根据内部知识提供一个精简的 3 步版本。

严重程度指南

Contrast Blindness 一旦检测到始终为 critical。 可访问性失败会影响所有用户。

Overloaded Screen 和 Form Graveyard 在基于数量的信号明显超过阈值(15+ 个元素、12+ 个表单字段)时为 critical。 当信号表明过载但未说明数量时,它们为 warning。

Silent Errors 和 Dead-End States 在界面描述显示错误场景且没有反馈时为 critical。 当反馈存在但不完整或延迟时,它们为 warning。

Mystery Navigation 和 Inconsistent Actions 默认是 warning。 仅当主要任务需要缺失的导航路径时,才升级为 critical。

边缘情况

未检测到问题: 返回 smells_detected: []。用至少 2 条观察结果填充 clean_areas。这是有效且正确的输出。

描述未提及错误状态: 不要假设存在 silent-errors。将其添加到 smells_suspected,并附注类似 "Error handling not described; verify inline validation and failure states." 的说明。

提到仅图标导航: 将 mystery-navigation 标记为至少 warning。没有标签的图标在可学习性测试中一贯失败。

"Simple" 或 "minimal" 界面: 按描述字面理解。不要凭空增加复杂性。如果信号缺失,则输出更少检测到的问题。

移动界面: 应用更严格的阈值。根级别超过 5 个导航项会映射到 mystery-navigation warning。触控目标小于 44px 会映射到 contrast-blindness suggestion(可访问性类别,最接近的匹配)。

模糊数量("several buttons"、"a few fields"): 将 "several" 视为 5-7,"a few" 视为 3-4,"many" 视为 8+。在 message 中说明该假设。

两个或更多问题共享同一根因: 两者都检测。在 message 中用 "This compounds the [other-smell-id] finding." 交叉引用它们。

示例

示例 1:带有流失信号的表单

输入:

Registration form asking for: first name, last name, email, password, phone number, company name, job title, company size, country, city, postal code, industry, referral source, marketing consent. All fields shown at once. Submit button at the bottom.

预期输出结构:

{
  "interface_description_summary": "14-field registration form with all fields visible at once and submit at bottom.",
  "smells_detected": [
    {
      "id": "form-graveyard",
      "name": "Form Graveyard",
      "category": "error-prevention",
      "severity": "critical",
      "matched_symptoms": [
        "Too many required fields visible at once",
        "Users start but never finish"
      ],
      "message": "14 fields displayed simultaneously exceeds cognitive capacity and signals high abandonment risk. Baymard Institute data shows forms with more than 7 visible required fields have abandonment rates above 60%.",
      "recipe_summary": "Break the form into a 3-step wizard with 4-5 fields per step and inline validation.",
      "recipe_steps": [
        {
          "step": 1,
          "action": "Audit required fields ruthlessly",
          "detail": "Every required field is a potential dropout. Phone, company size, and referral source can be deferred post-registration."
        },
        {
          "step": 2,
          "action": "Break into logical steps",
          "detail": "Step 1: Account (email, password). Step 2: Identity (name, company, title). Step 3: Context (country, industry, consent)."
        },
        {
          "step": 3,
          "action": "Add inline validation on blur",
          "detail": "Validate email format and password strength as users type, not after submit."
        }
      ],
      "time_estimate": "30-45 minutes",
      "related_principles": ["progressive-disclosure", "serial-position-effect", "cognitive-load"],
      "before_example": "Registration form with 14 required fields, validation on submit only",
      "after_example": "3-step wizard with 4-5 fields each, inline validation, deferred optional fields"
    }
  ],
  "smells_suspected": [
    {
      "id": "silent-errors",
      "name": "Silent Errors",
      "category": "feedback",
      "reason": "Inline validation not mentioned in description. Verify whether error messages appear on blur or only on submit."
    }
  ],
  "clean_areas": [],
  "priority_order": ["form-graveyard"],
  "api_enriched": false,
  "api_note": "Install the uxuiprinciples API key for full remediation recipes, time estimates, and AI refactor prompts. See uxuiprinciples.com/en/checkout"
}
示例 2:导航审查

输入:

Mobile app with a bottom navigation bar showing 4 icons only: no labels under the icons.

预期输出结构:

{
  "interface_description_summary": "Mobile app with icon-only bottom navigation (4 items, no labels).",
  "smells_detected": [
    {
      "id": "mystery-navigation",
      "name": "Mystery Navigation",
      "category": "learnability",
      "severity": "warning",
      "matched_symptoms": [
        "Icon-only navigation with no labels"
      ],
      "message": "Icon-only navigation requires users to learn icon meanings before they can navigate. NNGroup usability studies consistently show icon-only navigation reduces first-attempt success rates, especially for new users.",
      "recipe_summary": "Add short text labels under each navigation icon.",
      "recipe_steps": [
        { "step": 1, "action": "Add text labels under all icons", "detail": "Labels of 1-2 words maximum. Match label to the primary action (Home, Search, Inbox, Profile)." },
        { "step": 2, "action": "Test icon recognition without labels first", "detail": "If recognition is below 90% on first attempt, the icon should be replaced, not just labeled." },
        { "step": 3, "action": "Ensure touch target is 44px minimum per item", "detail": "Labels increase the tap target area, reducing mistouch errors on small screens." }
      ],
      "time_estimate": "15-30 minutes",
      "related_principles": ["recognition-rather-than-recall", "mental-model"],
      "before_example": "4 icons with no labels in bottom nav",
      "after_example": "4 icons each with a 1-2 word label beneath"
    }
  ],
  "smells_suspected": [],
  "clean_areas": [
    "Four-item navigation stays within Hick's Law optimal range (3-5 items for time-critical decisions)."
  ],
  "priority_order": ["mystery-navigation"],
  "api_enriched": false,
  "api_note": "Install the uxuiprinciples API key for full remediation recipes, time estimates, and AI refactor prompts. See uxuiprinciples.com/en/checkout"
}

完成标准

满足以下条件时,技能输出即为完成:

  1. 每个检测到的问题都有一个与分类体系匹配的 id(即上述 8 个 ID 之一)
  2. smells_detected 中的每个问题在 matched_symptoms 中至少有 1 条记录
  3. severity 为以下之一:critical、warning、suggestion
  4. 每个检测到的问题的 recipe_steps 至少有 3 个步骤(来自 API 或内部知识)
  5. priority_order 只列出 smells_detected 中的 ID,而不是 smells_suspected 中的
  6. api_enriched 准确反映 toolbox 调用是否返回了成功数据
  7. 输出是有效 JSON,前后无任何说明文字
  8. 当 smells_detected 为空时,clean_areas 至少有 2 条记录

评论

支持 Markdown