vertical-spacing
БесплатноБез исполняемых скриптовНе проверенUse when computing or fixing vertical spacing (margins, padding, Auto Layout gap) between text blocks or components against a grid base, accounting for…
от monikazapisek903 установки в других каталогахОб этом скилле
Vertical Spacing
Purpose
Compute vertical spacing (margin, padding, Auto Layout gap) as clean multiples of a grid base, applying the proximity rule (elements that relate should sit closer together than elements that don't), and correcting for vertical-trim state so the optical gap matches the set gap.
When To Use
- Reviewing or defining spacing for a card, section, article, or form.
- Fixing an Auto Layout frame in Figma where gap/padding look inconsistent or off-grid.
- Not for spacing within a single line of text (that's
text-typesetting) or column width (line-length-optimizer).
Inputs
grid-base: default8px(or4pxfor denser UI); confirm which the project uses rather than assuming.component-type: card / page section / article / form.hierarchy-level: compact / standard / spacious.base-line-height(LH): the resolvedline-heightof the body text in the flow — required for Workflow step 5 (paragraph/list rhythm), since those gaps are defined as a fraction of it, not as fixed pixel values.- If available: Figma Auto Layout properties (see Figma Node Integration) and the
leadingTrimstate of any text layers inside the frame.
Outputs
- Spacing values, all multiples of
grid-base(e.g. 8, 16, 24, 32, 48, 64, 96). - CSS (flex/grid
gap, margin) or Tailwind utility classes, matching whichever convention the project already uses. - A note on any vertical-trim-driven adjustment (see Workflow step 3).
- For paragraph/list flow:
paragraphSpacing, list-to-paragraph gap, and list-item gap, each shown as both theLH-fraction formula and the resulting pixel value (see Workflow step 5).
Questions
This skill is an audit, not an interview. Work in this order: read what the file or the input already says, report, then ask.
- Ask only when a value can't be read and the answer would change the result. One question at a time.
- Don't ask for anything the request already states or the file shows — say what you took and where it came from.
- If the question can't be answered, state the assumption and carry on. Never stall the report on it.
- Always ask before writing to a file or a Figma node.
Questions this skill may need:
- The grid base (4px or 8px), when the frame's existing values and spacing variables don't show one.
Workflow
Snap every value to
grid-base. Reject or round any spacing value that isn't a clean multiple — flag existing off-grid values found in input CSS rather than silently leaving them.Apply the proximity rule. Spacing above a heading (separating it from the previous, unrelated block) should be noticeably larger — roughly 2–3× — than the spacing below it (to the body text it introduces). E.g.
margin-top: 48px/margin-bottom: 16pxon a heading, not symmetric values on both sides.
2a. Grouping check — internal ≤ external. This is the Gestalt principle of proximity applied to spacing: elements placed close together are read as one group, elements spaced apart as separate ones, and proximity outweighs similarity of colour or shape. The working form of it: the space inside a group is never larger than the space around the group.
| Pair that is read together | Its gap must be smaller than |
|---|---|
| Title and its description | the gap to the next title–description pair, and the container's padding |
| Label and its field | the gap to the next label–field pair |
| Field and its helper or error text | the gap between label and field |
| Items of one list | the gap between the list and the surrounding blocks |
| Icon and its label | the gap to the next icon–label pair |
| Heading and the text it introduces | the gap between that heading and the text above it |
- Walk the frame from the inside out and compare each gap with the one a level up. Flag a pair whose inner gap is larger than the outer one — the grouping reads reversed. Flag equal gaps where two levels should differ — the grouping is ambiguous.
- Report which elements end up reading as one group at the current values, so the finding is about meaning, not numbers.
- The sources give the principle, not a ratio. The "2–3×" in step 2 is this skill's working value for headings; don't present it as a published rule.
- Vertical-trim correction (critical when text is involved):
- If the text layers in this spacing context have vertical-trim off (default), the visually perceived gap can be smaller than the set
gap/marginvalue because the font's built-in leading sits inside the text box. Do not invent a universal pixel correction: the difference depends on the font metrics, line-height, and adjacent glyphs. Either measure the rendered distance or recommend turning vertical-trim on so the spacing value maps to the trimmed text bounds. - If vertical-trim is on, the set spacing value is the true optical distance from baseline/cap-height to the
- If the text layers in this spacing context have vertical-trim off (default), the visually perceived gap can be smaller than the set
Установить vertical-spacing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл vertical-spacing?
Use when computing or fixing vertical spacing (margins, padding, Auto Layout gap) between text blocks or components against a grid base, accounting for vertical-trim state on any text layers involved. Grouping follows the Gestalt principle of proximity — what is read together sits closer than what is read apart.
Как установить скилл vertical-spacing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл vertical-spacing запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic