跳到正文
Skillpedia
界面(UI/UX)48k · #6047

ui-states

它能做什么

这个工具可以帮你制作在各种情况下都能正常工作的应用页面,而不只是在一切顺利时才可以用。它能确保页面在没有数据、网络缓慢或出现错误时,仍然能向用户展示有用的信息。

适用场景

  • ✓当你在搭建一个需要展示信息的新页面时。
  • ✓当你审查页面,想确认它在各种场景下都能正常工作时。
  • ✓当页面只考虑了“理想路径”(一切都正常运行)时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/ui-states/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/ui-states/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请为商品列表生成各种页面状态,包括空白、加载中、出错和离线的情况。”

每周 5 个新技能,1 分钟读完。

工作原理

工具会考虑用户可能遇到的各种问题,比如没有内容可看或网络突然断开,然后定义页面在每种情况下应该如何显示和表现。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

UI states · by UXKIN

Real UI, not AI slop.

Most generated screens only show the happy path: perfect data, a fast connection, nothing failing. Real people meet everything else first: an empty list on day one, a spinner that never ends, an error with no way out, a name too long for its box. This skill finds those states for each screen and builds them properly.

It works on its own, with no account, token or server.

When to Use

  • Use when building or reviewing a screen that loads, lists, searches, submits or saves data.
  • Use when asked to make UI production-ready, handle edge cases or "finish" a screen.
  • Use when a screen only shows the happy path.

Connect UXKIN (optional)

UXKIN (https://uxkin.com) is a library of 500,000+ real app screens, user journeys and 15k+ website design systems, each with a DESIGN.md. Connected, it lets you look at how real products solve what you are building. To connect it, the person:

  1. adds the MCP server https://uxkin.com/mcp (name: uxkin) in this app's MCP settings,
  2. signs in with their UXKIN account when the app asks (searches need a UXKIN plan),
  3. or follows the guide for their app: https://uxkin.com/ui-design-mcp

Only set this up when the person asks for it; never add servers or accounts on your own.

1. List the states for each screen

For every screen or component that shows, loads or changes data, go through this list and keep the ones that can happen:

State Ask
First use What does someone see before they've added anything?
Empty What if a list, search or filter has nothing to show?
Loading What shows while data loads, and for how long?
Partial What if some data loads and some doesn't?
Error What if the request fails or times out?
Offline What if there's no connection?
Validation What if the input is wrong, missing or too long?
Permission What if access, a permission or a plan is missing?
Success How does someone know their action worked?
Edge content Very long names, missing images, zero, huge numbers, many items
Busy action What happens while a button's action is running?

Write the list down before building, and confirm the important ones with the person if the right behavior isn't obvious.

2. Build each state properly

  • First use and empty: say what this place is for and give the next step as a button ("Add your first invoice"), not just "No data". Empty because of a filter or search is different: say so and offer to clear it.
  • Loading: keep the layout steady. Use placeholders shaped like the content for lists and cards, an inline spinner for small areas, and progress for long tasks. Don't block the whole screen for a part of it. If it takes more than a few seconds, say what's happening.
  • Error: say what went wrong in plain words, what the person can do, and offer the action (Try again, Edit, Contact support). Keep what they typed. Never show raw error codes or stack traces.
  • Offline: show that the connection is missing, keep what's already loaded visible, and retry automatically when it's back if that's safe.
  • Validation: check at the right moment (on leaving a field or on submit, not on every keystroke), put the message next to the field, and say how to fix it.
  • Permission or plan missing: explain what's missing and how to get it, and keep the rest of the screen usable.
  • Success: confirm briefly and in place (a short message, the item appearing in the list); offer Undo for actions that remove things.
  • Edge content: truncate long text with the full value available, give images a fallback, format big numbers, and paginate or virtualise long lists.
  • Busy actions: disable the button and show progress while it runs so it can't be sent twice.

Use the project's existing components and copy style for every state; don't invent a new look for them.

3. Check each state

Make each state appear for real: empty data, a slow or failed request (through the browser's network tools, a mock or a test flag), offline mode, very long text. Look at each at a phone and a desktop width. Fix what's broken and check again.

Report which states you built, which you checked and how, and any that need a decision from the person (for example, what the error should say for their backend).

Optional: real examples

If the UXKIN MCP tools are connected, find_ui_references finds how

…

常见问题

什么是“界面状态”(UI states)?

指应用页面根据当前情况所呈现的不同外观和行为,例如正在加载数据、没有搜索结果或出现错误。

为什么要考虑这些状态?

因为用户经常会遇到这些情况。在各种状态下都设计得当的页面,能提升用户体验,减少挫败感。

使用这个工具需要绑定账号吗?

不需要,工具可以独立使用。绑定账号只是可选项,用于访问其他应用的示例。

详情

作者的原始描述

Design and build the UI states agents forget: first use, empty, loading, error, offline, no results, long content, permission denied and success.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#6047
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能