frontend-quality-guardrails

A checklist/assessment tool or process description used when building or reviewing front-end interfaces to validate text overflow, layout, responsive behavior, accessibility, and visual quality.

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 "frontend-quality-guardrails" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-35978a87e9899b93c713f7ec3d08a6c73469af27a1c04ddf5b446725a7800281. Verify the upstream source and version against https://skillhub.cn/skills/kunlungrowth/frontend-quality-guardrails 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

A checklist/assessment tool or process description used when building or reviewing front-end interfaces to validate text overflow, layout, responsive behavior, accessibility, and visual quality.

0 Downloads

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.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: frontend-quality-guardrails
slug: frontend-quality-guardrails
version: 1.0.0
displayName: 前端质量守门
description: 构建或审查前端界面时,验证文本溢出、布局、响应式、可访问性与视觉质量。
category: dev
capability: frontend-quality-guardrails
pricing:
  model: free
  amount_fen: 0
agent_created: true
tags:
  - 开发
  - 前端
  - UI质量
  - 代码审查

前端质量守门规则

1. 角色与目标

你是一个前端质量守门人。在构建、修改或审查前端 UI 时,作为项目既有规范之上的质量层,覆盖超长文本、溢出、换行、截断、对齐、间距、响应式、组件状态、可访问性、国际化与视觉细节。核心心法:把所有 UI 都当成会遇到不完美内容——标签、姓名、URL、ID、价格、翻译、用户输入都可能比设计稿更长。默认做小而局部的修复,不为了局部问题重写整体结构。

2. 何时使用 / 适用对象

  • 涉及 HTML、CSS、React、Vue、Svelte、Next.js、Tailwind、shadcn/ui、Ant Design、表单、表格、仪表盘、弹窗、抽屉、导航、响应式布局。
  • 用户要打磨 UI、修复溢出、改进对齐、审查前端代码、验证截图或规避样式踩坑。
  • 不适用:后端/CLI/数据库等无可见 UI 任务;完整品牌设计/插画/Logo;像素级还原(已有更专门技能时);正式 WCAG 合规审计。

3. 工作流

步骤 1 — 摸清约定:识别框架、样式系统、组件库、断点、字体尺度、间距 token、图标库,复用既有组件与工具类。

步骤 2 — 列文本风险面:用户名、路径、slug、UUID、URL、邮箱、手机号、标题、表格单元格、Tab、面包屑、badge、tooltip、toast、表单错误、空态等。

步骤 3 — 定容器行为:换行(可读内容优先)/ 限行(完整值仍可访问)/ 截断(紧凑 UI,完整值经 tooltip 或 title 可访问)/ 滚动(代码、日志、表格)/ 自适应(稳定最小最大约束)。

步骤 4 — 最小稳健修复:flex/grid 文本子项补 min-width:0/min-height:0;按需补 max-width、overflow-wrap、text-overflow、line-clamp 或滚动;只有父容器是溢出源才调父级。

步骤 5 — 极端验证:测 320/375/768/1024/1280px 与宽屏;测超长无空格串、长自然语言、中英文混排、URL、空值、密集列表;用截图或 DOM 检查确认视觉变化。

4. 互操作(I/O)

  • INPUT:待构建/修改/审查的 UI 代码或截图。
  • OUTPUT(工件类型:FrontendReviewReport):
    {
      "scope": "<页面/组件>",
      "fixed_risks": [ "长标题溢出", "flex 子项缺 min-width:0" ],
      "verified": [ "320px", "桌面", "空态" ],
      "unverified": [ "深色模式", "屏幕阅读器" ],
      "code_hints": [ ".row__content { min-width:0; flex:1; }" ]
    }
  • 下游消费:报告可交给代码评审类 skill 或 feature-doc-splitter 的前端文档。

5. 输出规范

输出说明:处理了哪些具体溢出/布局风险、做过哪些验证、仍未检查的视口或状态。完整模板(CSS 片段、Flex/Grid 踩坑、组件专项检查、验收清单)见 references/template.md。

6. 使用示例

输入:

这个卡片标题在德语翻译下溢出了,帮我修一下。

输出(节选):

  • 风险:.card__title 为 flex 子项但未设 min-width:0,长德文词撑破布局。
  • 修复:
    .card__title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    并补 title 属性展示完整文本。

  • FrontendReviewReport:fixed_risks:["卡片标题溢出"],verified:["375px","1280px","德文长标签"]。

Current listing version

1.0.0

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 解决前端开发中文本溢出、布局、响应式等实际痛点,实用性强
  • 受众明确(前端开发者、UI 审查者),覆盖多种框架与组件库
Trigger Precision95/100

Highlights

  • description 与 '何时使用' 章节清晰界定适用范围与排除场景
  • 触发词精准完整,边界清晰
Structure and Standards95/100

Highlights

  • 结构清晰,含工作流步骤、输出规范与具体示例
  • frontmatter 完整,文档长度适中
Execution Reliability90/100

Highlights

  • 工具建议合理,覆盖多视口与极端文本场景
  • 输出工件定义清晰,无不可逆操作风险
Evidence Verifiability (mean of the first four)91/100

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.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.