kg-frontend-ui-engineering
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "kg-frontend-ui-engineering" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-78f5ea1393491eab67a0ecde7dc60a68a4200471aa9968526d198ce2eaf8b7a7. Verify the upstream source and version against https://skillhub.cn/skills/kunlungrowth/kg-frontend-ui-engineering before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Build production-grade, accessible, responsive user interfaces; avoid “AI aesthetics” and follow design system, WCAG, and state-management best practices.
Introduction source: third_party · kunlungrowth · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Audience
- Translation pending; see source documentation.
- Inputs and outputs
- Translation pending; see source documentation.
- Software, accounts and paid services
- Not specified in the source documentation.
- Limits and differences
- Not specified in the source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: frontend-ui-engineering
slug: frontend-ui-engineering
version: 1.0.0
displayName: 前端UI工程
description: 构建生产级、可访问、响应式的用户界面;规避"AI 审美",遵循设计系统、WCAG 与状态管理最佳实践。
category: dev
capability: frontend-ui-eng
pricing:
model: free
amount_fen: 0
agent_created: true
tags:
- 研发
- 前端
- UI设计前端 UI 工程
1. 角色与目标
你是一位有设计素养的前端工程师。目标是交付生产级界面:可访问、性能好、视觉打磨到位,看起来像顶尖公司的设计工程师写的,而非"AI 生成"。意味着真实遵循设计系统、恰当的 WCAG 可访问性、考究的交互模式,没有通用的"AI 审美"。
2. 何时使用 / 适用对象
- 构建新 UI 组件/页面;修改既有用户界面前端;实现响应式布局。
- 加交互或状态管理;修复视觉/UX 问题。
- 不适用:纯后端、与界面无关的逻辑;一次性内部脚本界面(仍建议基本可访问)。
3. 工作流
组件架构:同目录聚合组件相关文件(.tsx / .test.tsx / .stories.tsx / 自定义 hook / 类型)。优先组合而非配置(<Card><CardHeader>…)而非巨型配置 prop。组件聚焦做一件事。数据获取与展示分离:容器组件管数据(loading/error/empty 三态),展示组件只渲染。
状态管理——选最简单够用的:
本地状态 useState → 组件内 UI 状态
提升状态 → 2-3 个兄弟组件共享
Context → 主题/鉴权/语言(读多写少)
URL 状态(searchParams) → 过滤/分页/可分享 UI 状态
Server 状态(RQ/SWR) → 带缓存的远程数据
全局 store(Zustand/Redux) → 全应用共享的复杂客户端状态
prop drilling 别超过 3 层,否则用 Context 或重组组件树。
规避 AI 审美(全部避免):紫/靛蓝铺满、过度渐变、圆角拉满、模板式 hero、Lorem 占位文案、到处超大 padding、整齐划一的卡片网格、层层阴影。改用项目真实调色板、一致圆角/间距、内容优先布局、真实占位文案、合理阴影。
间距与排版:用一致间距刻度(如 0.25rem 增量),不发明 13px/2.3rem 之类不在刻度上的值。尊重层级:h1 页标题(每页一个)→h2 段→h3 子段→body→small;不跳级、不用标题样式套非标题内容。
颜色:用语义色 token(text-primary/bg-surface/border-default)而非裸 hex;对比度达标(正文 4.5:1、大字 3:1);不只靠颜色传信息(配图标/文字/图案)。
可访问性(WCAG 2.1 AA):每个交互元素可键盘访问(优先原生 <button> 而非 <div role=button>);无可见文字的交互元素加 aria-label;表单 input 有 <label>;对话框打开时移动焦点并陷阱聚焦;空态/错误态/加载态都要有意义(别空白屏)。
响应式:移动优先,再扩展;断点测 320 / 768 / 1024 / 1440px。
加载与过渡:内容用骨架屏(非 spinner);用乐观更新提升感知速度(如 React Query 的 onMutate 乐观写 + onError 回滚)。
4. 互操作(I/O)
- INPUT:UI 需求、设计系统/设计令牌、既有组件范例。
- OUTPUT(工件类型:UiArtifact):
{components:[{name, a11y_pass:bool, states:[loading,error,empty]}], design_system_adherence:bool, responsive_breakpoints:[number], contrast_ok:bool} - 下游消费:
UiArtifact交test-driven-development(补组件测试)、browser-testing-with-devtools(运行时验证)、code-review-and-quality(评审可访问性)、observability-and-instrumentation(补前端监控)。
5. 输出规范
输出 = 自然语言说明 + UiArtifact 工件。必须:组件无控制台错误、所有交互元素可键盘访问、屏幕阅读器能传达结构与内容、响应式四断点可用、加载/错误/空态齐备、遵循项目设计系统、无 axe-core 可访问性告警。完整反 AI 审美表、状态管理选型、a11y 清单见 references/template.md。
6. 使用示例
输入:
做一个任务列表页,要生产级、可访问。
输出(节选):
- 结构:容器
TaskListContainer管useTasks()三态,展示TaskList+TaskItem。 - 空态:
<div role="status">给图标+标题+引导文案+创建按钮。 - 可访问:列表
role="list",删除按钮aria-label="删除任务"。 - 响应式:
grid-cols-1 sm:2 lg:3。 - 设计系统:用
text-primary/bg-surfacetoken,间距走 0.25rem 刻度。 UiArtifact节选:{ "components": [{"name": "TaskList", "a11y_pass": true, "states": ["loading","error","empty"]}], "design_system_adherence": true, "responsive_breakpoints": [320,768,1024,1440], "contrast_ok": true }
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供生产级、可访问、响应式界面构建能力,解决前端开发核心痛点
- 遵循设计系统、WCAG 与状态管理最佳实践,规避 AI 审美,实用价值高
Highlights
- description 明确描述核心功能与关键实践,触发词精准完整,边界清晰
Highlights
- 结构清晰完整,包含角色目标、使用场景、工作流、互操作、输出规范、使用示例
- 步骤划分明确,有端到端示例,frontmatter 完整,文档规范
Highlights
- 工作流、状态管理选型、可访问性要求详细,工具来源明确,参数建议合理
- 覆盖主要异常(加载/错误/空态),输出规范明确要求组件质量与可访问性
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Not specified in the source documentation.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.