Token导航 LogoToken导航

Agent Skill · 前端设计

visual-hierarchy-refactoring(视觉层次重构)

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

visual-hierarchy-refactoring 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证为 MIT,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 3,836。

总安装 1,102周安装 45GitHub Stars 21下载 353核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:visual-hierarchy-refactoring(视觉层次重构)
来源仓库:https://github.com/sanky369/vibe-building-skills
仓库路径:skills/visual-hierarchy-refactoring
安装命令:
npx skills add https://github.com/sanky369/vibe-building-skills --skill visual-hierarchy-refactoring
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/sanky369/vibe-building-skills --skill visual-hierarchy-refactoring

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。适合生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构或定位布局问题。使用时需结合项目现有设计系统、路由和构建方式,避免生成孤立片段;涉及页面改动时应配合本地预览确认效果。

安装命令:npx skills add https://github.com/sanky369/vibe-building-skills --skill visual-hierarchy-refactoring 注意:涉及真实页面改动时,应通过本地预览和构建检查确认视觉效果。

来源仓库内路径:skills/visual-hierarchy-refactoring

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/sanky369/vibe-building-skills --skill visual-h…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

visual-hierarchy-refactoring 怎么安装?

在终端执行 npx skills add https://github.com/sanky369/vibe-building-skills --skill visual-hierarchy-r…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

visual-hierarchy-refactoring 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

visual-hierarchy-refactoring 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

visual-hierarchy-refactoring 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

visual-hierarchy-refactoring 用的人多吗?

公开数据是累计安装 1,102 次,近一周安装 45 次,下载 353 次,GitHub 21 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

visual-hierarchy-refactoring 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
visual-hierarchy-refactoring

视觉层次重构 · 本页

1,10221只读MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Visual Hierarchy & Refactoring UI

Overview

Visual hierarchy is the principle that design is a function of size, weight, and contrast—not color. When done right, users instantly understand what's important and where to look next. This skill teaches you to establish clear hierarchy through systematic visual decisions.

Core Principle: The Rule of Excessive Whitespace

The most common mistake in interface design is density. When interfaces feel cluttered, the instinct is to shrink text. This is wrong.

The Solution: Start with too much space.

When you have breathing room, users can scan the interface and identify signals amongst the noise. Generous whitespace signals confidence—it implies that the content presented is important enough to stand on its own, without competing for attention.

Application

If a standard margin is 16px, try 32px or 48px. If you feel it's too much space, you're probably on the right track. Reduce from there, but never back to density.

/* Generous whitespace creates confidence */
.card {
  padding: 48px;  /* Not 16px */
  margin-bottom: 32px;  /* Not 8px */
}

.section {
  margin-top: 64px;  /* Breathing room between sections */
  margin-bottom: 64px;
}

Visual Hierarchy Through Size, Weight, and Contrast

1. Size Hierarchy

Size is the most powerful tool for establishing hierarchy. Larger elements draw attention first.

Guidelines:

  • Primary information should be 1.5-2x larger than secondary
  • Each level should be clearly distinguishable
  • Use modular scales (Major Second, Major Third, Perfect Fifth)
/* Size hierarchy */
h1 {
  font-size: 48px;  /* Primary */
}

h2 {
  font-size: 32px;  /* Secondary */
}

h3 {
  font-size: 24px;  /* Tertiary */
}

body {
  font-size: 16px;  /* Base */
}

small {
  font-size: 12px;  /* Tertiary text */
}

2. Weight Hierarchy

Font weight creates visual emphasis without changing size.

Guidelines:

  • Use 2-3 weights maximum (e.g., 400, 600, 700)
  • Bold for emphasis, not for everything
  • Lighter weight for secondary information
/* Weight hierarchy */
h1 {
  font-weight: 700;  /* Bold for primary */
  font-size: 48px;
}

h2 {
  font-weight: 600;  /* Semi-bold for secondary */
  font-size: 32px;
}

body {
  font-weight: 400;  /* Regular for body */
  font-size: 16px;
}

.secondary-text {
  font-weight: 400;  /* Regular, not bold */
  color: var(--text-secondary);
}

3. Contrast Hierarchy

Contrast creates visual separation and guides attention.

Guidelines:

  • High contrast for primary information
  • Medium contrast for secondary
  • Low contrast for tertiary/disabled
/* Contrast hierarchy */
.primary-text {
  color: var(--text-primary);  /* High contrast */
}

.secondary-text {
  color: var(--text-secondary);  /* Medium contrast */
}

.tertiary-text {
  color: var(--text-tertiary);  /* Low contrast */
}

.disabled-text {
  color: var(--text-disabled);  /* Very low contrast */
  opacity: 0.5;
}

The Color Weight System

Tinted Greys, Not True Greys

A definitive marker of amateur design is using "True Grey" (#808080) or "True Black" (#000000) on colored backgrounds.

The Principle: Always use tinted greys. If your brand is blue, your "grey" should be a deeply desaturated blue. If your brand is warm/orange, your grey should be warm.

/* Bad - True Grey */
.text-on-blue {
  color: #808080;  /* True grey - looks wrong */
}

/* Good - Tinted Grey */
.text-on-blue {
  color: #4B5563;  /* Deeply desaturated blue - feels right */
}

/* Bad - True Black */
.text {
  color: #000000;  /* True black - harsh */
}

/* Good - Tinted Black */
.text {
  color: #030712;  /* Deeply desaturated blue-black - softer */
}

Building a Color Weight System

Create 8-10 shades per hue before writing any code. This prevents "hex code drift" where a codebase accumulates 50 slightly different versions of the same color.

/* Color weight system - 10 shades per hue */
:root {
  /* Primary Blue */
  --blue-50:   #F0F9FF;
  --blue-100:  #E0F2FE;
  --blue-200:  #BAE6FD;
  --blue-300:  #7DD3FC;
  --blue-400:  #38BDF8;
  --blue-500:  #0EA5E9;
  --blue-600:  #0284C7;
  --blue-700:  #0369A1;
  --blue-800:  #075985;
  --blue-900:  #0C3D66;

  /* Tinted Greys (desaturated blue) */
  --gray-50:   #F8FAFC;
  --gray-100:  #F1F5F9;
  --gray-200:  #E2E8F0;
  --gray-300:  #CBD5E1;
  --gray-400:  #94A3B8;
  --gray-500:  #64748B;
  --gray-600:  #475569;
  --gray-700:  #334155;
  --gray-800:  #1E293B;
  --gray-900:  #0F172A;
}

Contrast Hierarchy with Color Weight

Use color sparingly. Text hierarchy should be handled first by lightness (size/weight), then by color.

/* Contrast hierarchy - color reserved for interactive elements */
.heading {
  color: var(--gray-900);  /* Darkest - highest contrast */
  font-weight: 700;
  font-size: 32px;
}

.body-text {
  color: var(--gray-700);  /* Dark - good contrast */
  font-weight: 400;
  font-size: 16px;
}

.secondary-text {
  color: var(--gray-500);  /* Medium - reduced contrast */
  font-weight: 400;
  font-size: 14px;
}

.button-primary {
  background-color: var(--blue-600);  /* Color for interactive elements */
  color: white;
}

.button-secondary {
  background-color: var(--gray-100);  /* Subtle background */
  color: var(--gray-900);
}

Gestalt Principles: How Humans Perceive Visual Groups

Gestalt principles explain how humans naturally group visual elements. Use these to create clear hierarchy and organization.

1. Proximity

Elements that are close together are perceived as related.

Application:

  • Group related items together
  • Increase space between unrelated groups
  • Use spacing to show relationships
/* Proximity - group related items */
.form-group {
  margin-bottom: 24px;  /* Space between groups */
}

.form-group label {
  display: block;
  margin-bottom: 8px;  /* Close to input */
}

.form-group input {
  width: 100%;
}

2. Similarity

Elements that look similar are perceived as related.

Application:

  • Use consistent styling for related items
  • Vary styling to show differences
  • Buttons of the same type should look identical
/* Similarity - consistent styling for related items */
.button-primary {
  background: var(--blue-600);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
}

.button-primary:hover {
  background: var(--blue-700);
}

/* All primary buttons look the same */
.button-primary.small {
  padding: 8px 16px;
  font-size: 14px;
}

3. Figure/Ground

Humans naturally distinguish foreground from background.

Application:

  • Use contrast to separate foreground from background
  • Active states should stand out from inactive
  • Modals should have clear distinction from background
/* Figure/Ground - clear foreground/background separation */
.modal-overlay {
  background: rgba(0, 0, 0, 0.5);  /* Darkened background */
}

.modal {
  background: white;  /* Clear foreground */
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
}

.button.active {
  background: var(--blue-600);  /* Foreground */
  color: white;
}

.button.inactive {
  background: var(--gray-100);  /* Background */
  color: var(--gray-600);
}

4. Closure

Humans complete incomplete shapes. Minimalist designs work because of this principle.

Application:

  • Use negative space to imply forms
  • Incomplete shapes are still perceived as complete
  • Reduces visual clutter while maintaining clarity
/* Closure - incomplete shapes are still perceived */
.icon-incomplete {
  width: 24px;
  height: 24px;
  border: 2px solid currentColor;
  border-right: none;
  border-bottom: none;
  /* Brain completes the square */
}

5. Symmetry & Order

Balanced layouts feel stable. Asymmetry draws attention.

Application:

  • Use grids for stable, organized layouts
  • Intentional asymmetry draws attention to important elements
  • Symmetry creates trust and predictability
/* Symmetry - stable, organized layout */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Asymmetry - draws attention */
.hero {
  display: grid;
  grid-template-columns: 1fr 1.5fr;  /* Unequal columns */
  gap: 48px;
  align-items: center;
}

6. Common Region

Boundaries create groupings. Enclosed areas are perceived as related.

Application:

  • Use cards to group related content
  • Use backgrounds or borders to define regions
  • Sections with backgrounds feel grouped
/* Common Region - boundaries create groupings */
.card {
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 24px;
  background: white;
  /* Everything inside is perceived as grouped */
}

.section-with-background {
  background: var(--gray-50);
  padding: 48px;
  border-radius: 12px;
  /* Content inside is grouped */
}

Practical Refactoring: From Cluttered to Clear

Before: Cluttered Interface

/* Dense, hard to scan */
.old-interface {
  padding: 8px;
  margin: 4px;
}

.old-interface h2 {
  font-size: 16px;
  font-weight: 400;  /* Not bold */
  color: #666;  /* Medium grey */
  margin-bottom: 4px;
}

.old-interface p {
  font-size: 14px;
  color: #999;  /* Light grey */
  line-height: 1.3;
  margin-bottom: 4px;
}

After: Clear Hierarchy

/* Spacious, easy to scan */
.new-interface {
  padding: 48px;
  margin: 32px;
}

.new-interface h2 {
  font-size: 32px;
  font-weight: 700;  /* Bold */
  color: var(--gray-900);  /* Dark */
  margin-bottom: 16px;
}

.new-interface p {
  font-size: 16px;
  color: var(--gray-700);  /* Darker grey */
  line-height: 1.6;
  margin-bottom: 16px;
}

How to Use This Skill with Claude Code

Audit Visual Hierarchy

"I'm using the visual-hierarchy-refactoring skill. Can you audit my interface?
- Is my whitespace generous or cramped?
- Are my size differences clear?
- Am I using tinted greys or true greys?
- Do I apply Gestalt principles effectively?
- What's one thing I could improve immediately?"

Refactor Cluttered Interfaces

"Can you help me refactor this cluttered interface using visual hierarchy principles?
- Increase whitespace
- Establish clear size hierarchy
- Use tinted greys instead of true greys
- Apply Gestalt principles for grouping
- Show me before/after comparison"

Build a Color Weight System

"Can you help me build a color weight system?
- Create 8-10 shades for my brand color
- Create tinted greys for my brand
- Show me how to use them for hierarchy
- Provide CSS variables"

Integration with Other Skills

  • design-foundation — Design tokens for spacing and color
  • typography-system — Size and weight hierarchy
  • color-system — Color weight system and tinted greys
  • component-architecture — Hierarchy in components
  • accessibility-excellence — Contrast and readability

Key Principles

1. Size, Weight, Contrast First Establish hierarchy through these before using color.

2. Whitespace is Active Generous spacing signals confidence and improves scannability.

3. Tinted Greys, Not True Greys Colors should feel cohesive with your brand.

4. Gestalt Principles Guide Perception Use proximity, similarity, and grouping to organize information.

5. Hierarchy Should Be Obvious If you have to explain it, it's not clear enough.

Checklist: Is Your Visual Hierarchy Ready?

  • Whitespace is generous (not cramped)
  • Size differences are clear (1.5-2x between levels)
  • Weight hierarchy is consistent (2-3 weights max)
  • Contrast hierarchy is clear (dark for primary, lighter for secondary)
  • Greys are tinted to your brand (not true grey)
  • Color is used sparingly (interactive elements only)
  • Gestalt principles are applied (proximity, similarity, grouping)
  • Information is easy to scan
  • Hierarchy is obvious without explanation
  • Interfaces feel spacious, not cramped

Clear visual hierarchy transforms interfaces from confusing to intuitive.

平台分布

Claude Code

27.48%
按下载量换算97

Antigravity

25.38%
按下载量换算90

Codex

17.16%
按下载量换算61

Gemini CLI

12.74%
按下载量换算45

OpenCode

7.23%
按下载量换算26

Cursor

3.76%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills