AgentSkillsCN

ux-antipatterns

WordPress MCP SaaS 的 REST API 规范

SKILL.md
--- frontmatter
name: ux-antipatterns
description: Detect UX anti-patterns that frustrate users in frontend code. Use when reviewing, building, or refactoring UI components, pages, forms, or interactive flows. Triggers on frontend code review and building new UI features. Focuses on code-level heuristics that cause real user harm like layout shifts, silent failures, double-submits, focus theft, and missing feedback.

UX Anti-Pattern Detection

Scan frontend code for patterns that cause user frustration.

Core Axioms

Before checking individual rules, internalize these. They are the "why" behind every item below.

#AxiomOne-liner
1Acknowledge every actionEvery user action must produce visible feedback within 100ms, even if the result takes seconds.
2Never destroy user inputNot on error, not on navigation, not on timeout, not on refresh.
3State survives the unexpectedRefresh, double-clicks or double submits, network loss — code must handle edge cases.
4Most recent intent winsStale responses must never overwrite a newer user action.
5Explain every constraintIf it's disabled, say why. If it failed, say how to fix it. If it succeeded, say what happened.
6Don't fight the platformBrowser conventions, OS gestures, native controls, and accessibility APIs encode billions of hours of UX research.

Workflow

  1. Read references/antipatterns.md to load the full detection heuristics.
  2. Scan the code under review against each applicable anti-pattern category.
  3. Report findings grouped by anti-pattern, citing specific file:line locations.
  4. For each finding, state: the anti-pattern name, the user harm, and a concrete fix.

Anti-Pattern Categories

#CategoryUser Harm
1Layout StabilityClick target moves; wrong thing clicked.
2Feedback & ResponsivenessAction feels ignored; user retries, waits, or loses trust that the system is working.
3Error Handling & RecoveryUser is stuck with no way forward; input destroyed; problem unsolvable without guessing.
4Forms & Input InterferencePlatform fights the user's typing; data mangled, basic editing broken.
5FocusUser is typing and the UI yanks them elsewhere.
6Notifications, Interruptions & DialogsUser's flow broken; attention taxed by noise; forced to parse ambiguous choices under pressure.
7Navigation, Routing & State PersistenceUser can't go back; context evaporates on refresh or redirect.
8Scroll & ViewportContent unreachable or unstable; user fights the interface to see what they came for.
9Timing, Debounce & Race ConditionsActions fire twice, responses arrive stale, sessions expire mid-task; system behaves unpredictably under normal use.
10Accessibility as UXEntire interaction modes broken — keyboard users can't navigate, touch users locked out.
11Visual Layering & RenderingUI elements overlap, clip, or hide each other; controls become unreachable.
12Mobile & Viewport-SpecificKeyboard covers input, layout jumps on scroll, tap targets unresponsive; basic mobile interaction degraded.
13Cumulative Decay & Long-Term UXApp degrades over time; preferences lost, performance rots, stale experiments create inconsistencies.