design-spatial
它能做什么
这个工具可以帮你排列设计中的视觉元素,让它们分布均匀、布局平衡。它能确保页面上不会出现歪斜、拥挤或错位的情况。
适用场景
- ✓为网站或应用制作布局时。
- ✓在演示文稿中排列照片和文字时。
- ✓整理数字图片中的物体时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/design-spatial/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“帮我排列这个页面上的元素,让它们不要显得拥挤或错位。”
每周 5 个新技能,1 分钟读完。
工作原理
这个工具会检查视觉元素之间的间距和对齐情况,防止元素重叠或出现不必要的滚动条。它还会给出调整建议,让页面看起来整洁、专业。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Design — spatial composition
When to Use
Use this skill when you need design — spatial composition.
A model cannot trust its own UI output. Everything else follows from two failures.
1. It can't see what it made
UI is generated as a token stream, never as pixels — so the model cannot perceive collisions, overlap, imbalance, or broken spacing. It will write a headline that runs into the hero image and have no idea.
Render it and judge the image, not the code. Serve with any static server (e.g. python3 -m http.server or npx serve) and screenshot headless via Playwright. Screenshot at a few widths.
Critique with fresh eyes — not your own. Grading your own output rationalizes it; the builder looks at its overlapping headline and calls it fine (this is exactly how a real collision shipped in testing). Use a separate judge — a subagent that did not write the page — and tell it to hunt for what's wrong: collisions, edge tangents, ragged alignment, lopsided weight, no clear focal point, breaks at some width. Fix, re-render, re-judge.
2. Its first idea is the average
Whatever it produces first is the mean of its training data — and there is more than one mean:
- the generic-AI mean: Inter, purple-on-white gradients, centered single column, three equal cards;
- the designer-trend mean: oversized condensed caps, dark-mode + grain, monospace "vibes" microtext, sticker badges.
Landing on the second isn't taste — it's a more flattering average, which is why it slips past. Treat your first instinct as the mean and deviate deliberately — toward this product's specific world (use design-thinking's domain / color-world / signature as the direction), not toward another trend. If the result could be any startup, you shipped the mean.
3. So don't prescribe a style
Any fixed rule — a 12-col grid, an 8-point scale, "mono = data" — becomes next cycle's mean, and a blind model executes it into collisions anyway. Prescribe the process, not the look: see it with fresh eyes, and push off the average toward the domain. Taste supplies the direction (design-thinking / design-philosophy); this skill only insists you look and don't ship the mean.
For iterative spatial tuning, a local page with live controls (sliders, pickers, drag handles) beats one-shot critique.
4. NEVER ship horizontal overflow — THE mandatory gate, no exceptions
BLOCKING GATE. You may not call any web UI "done", "working", "fixed", or "looks good" until you have run the
scrollWidthcheck below at a narrow width THIS turn and seen0. Not "I added overflow-x:clip so it's fine." Not "it looked fine at my width." MEASURE. Narrow. Every time. If you didn't measure, it isn't done — say "haven't checked overflow yet" instead of claiming done.
A side-to-side scrollbar that doesn't match the content is the single most common and most embarrassing layout failure, and it ships over and over because the dev viewport is wide enough to hide it — the overflow only appears once the window is narrower than some element. It is invisible at desktop width, so the §1 render-critique loop will NOT catch it unless you screenshot narrow. Separate, explicit, non-negotiable gate.
It recurs because layouts GROW after they were last checked. Every time you add a
nav tab, a toolbar button, a header control, a chip, a wider equation/<pre>, or any
new item to a flex/inline row, you have invalidated the last overflow check — the
row that fit yesterday now pushes past the edge between ~720–1200px while your 1440px
dev window shows nothing wrong. (Real ship, 2026-06, TWICE: a progress-bar edge label
overflowed 23px; then a flex-wrap:nowrap header that grew 4 tabs scrolled the whole
page 309px across 720–1200px — both invisible at dev width, both caught only by
measuring narrow.) So: any change that adds an element to a horizontal row re-arms
this gate. Re-measure.
Default defenses to apply up front (so the gate passes by construction):
- Header / nav / toolbar rows:
flex-wrap: wrap, nevernowrap. A growing single-row flex is the #1 source of this bug. Wrapping is a no-op when it fits and saves you when it doesn't. body { overflow-x: clip }as a backstop on every app (clip, not hidden — keeps sticky/anchored layouts working). A backstop, NOT a substitute for measuring.
…
常见问题
为什么良好的间距很重要?
良好的间距能让设计更赏心悦目、更容易理解,也显得更专业。它还能避免用户被信息弄得困惑或不知所措。
什么是“水平溢出”?
当页面内容比屏幕还宽时,用户就不得不左右滚动,这种情况就叫水平溢出。它被视为严重的设计缺陷,而这个工具可以帮你避免。
工具怎么知道设计好不好?
它并不直接评判设计的好坏,而是检查错位、内容溢出等技术问题。最终效果好不好看,还需要你(或其他人)亲自看一看。
详情
热度
- GitHub 星标
- 48k
- 排名
- #4429
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。