返回 Skill 列表
extension
分类: 开发与工程无需 API Key

layout-spacing-checker

[设计系统] 根据间距尺度和网格规则验证边距/内边距/间隔值。在以下情况下使用:(1) 检查间距值是否遵循设计系统的尺度,(2) 查找非标准或不一致的间距,(3) 审核组件间布局的一致性,(4) 用户要求'检查间距'、'验证布局'、'审核边距/内边距'或'查找非标准值'。

person作者: jakexiaohubgithub

Layout & Spacing Scale Checker

Validate spacing values against a defined scale and find inconsistencies.

Quick Start

python3 scripts/check_spacing.py --scale spacing.yml --source src/

Issue Types

| Type | Severity | Description | |------|----------|-------------| | off-scale | warning | Value not in spacing scale | | inconsistent | info | Different spacing for similar components | | zero-spacing | info | Potentially missing spacing | | excessive | warning | Unusually large spacing value |

Detection Examples

CSS/SCSS

/* off-scale: 17px not in scale */
.card { padding: 17px; }
/* Suggested: 16px (md) or 20px */

SwiftUI

// off-scale: 15 not in scale
.padding(15)
// Suggested: .padding(16) or spacing token .md