enforce-ui-visual-restraint
Skill1 starsChanged 3 months agoMITView on GitHub
Review or refine interface designs so spacing, dividers, containers, and dark surfaces are intentional, compact, and traceable to content hierarchy or an approved design system. Use across Web, Pad, Mobile, dashboard, form, portal, Figma, prototype, or coded UI work when Codex creates excessive whitespace, narrow text boxes, unexplained gray lines, decorative borders or cards, redundant background panels, or black/dark regions with no source. Apply during design generation, revision, visual QA, or before batching a style across screens. Keep this audit independent from cross-device synchronization. Use sync-responsive-figma-from-web separately when the task is specifically Web-to-Pad/Mobile parity.
In this repository16 other files it gives its agents.
- analyze-brand-web-experienceSkill
- audit-public-report-languageSkill
- build-before-after-change-deckSkill
- build-design-skill-packageSkill
- build-html-sharing-reportSkill
- content-source-truth-auditorSkill
- context-first-design-executionSkill
- cross-device-recomposition-specSkill
- design-feedback-to-ruleSkill
- design-qa-evidence-packSkill
- design-system-contract-lockSkill
- extract-design-systemSkill
- html-to-figma-workflowSkill
- interaction-specimen-builderSkill
- sync-responsive-figma-from-webSkill
- web-design-guidelinesSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 13 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Treat every gap, line, box, panel, and dark surface as a design decision that needs evidence.
- Very specific: line 12
Use context-first-design-execution when continuing an existing task or interpreting referential feedback.
- Very specific: line 14
Use sync-responsive-figma-from-web only when Web-to-Pad/Mobile parity is also in scope.
- Distinctive: line 16
Read visual-structure-ledger.md when several sections share the same spacing, divider, container, or dark-surface problem.
- Distinctive: line 49
Use alignment, typography, proximity, and whitespace before adding a visible separator.
- Distinctive: line 64
Prefer content-driven height and Auto Layout over large fixed heights.
- Very specific: line 65
Remove obsolete min-height, spacer layers, invisible placeholders, and nested fixed heights when they create inactive blank zones.
- Distinctive: line 67
Keep density appropriate to the product.
- Distinctive: line 69
When a layout engine resists height reduction, inspect min/max constraints, fixed sizing, Auto Layout behavior, clipping, overflow, and …
- Distinctive: line 96
check readability, information density, clipping, overflow, and overall rhythm.
- Distinctive: line 99
Do not batch from token inspection alone when the complaint concerns geometry, spacing, or invented decoration.
- Distinctive: line 103
Check every scoped screen for:
- Distinctive: line 107
no unexplained gray line, border, card shell, background panel, or dark region.
- Distinctive: line 108
every retained visible boundary tied to a source or semantic role.
- Distinctive: line 109
no clipping, overlap, unintended overflow, or large tail gap.
- Distinctive: line 122
before/after proof from the same context and scale.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Enforce UI Visual Restraint
Treat every gap, line, box, panel, and dark surface as a design decision that needs evidence. Prefer clear hierarchy and compact rhythm over decorative structure.
Load dependencies
- Use
context-first-design-executionwhen continuing an existing task or interpreting referential feedback. - Load the relevant surface Skill before editing, such as the installed Figma or frontend implementation Skill.
- Use
sync-responsive-figma-from-webonly when Web-to-Pad/Mobile parity is also in scope. Report synchronization and visual restraint as separate checks.
Read visual-structure-ledger.md when several sections share the same spacing, divider, container, or dark-surface problem. Use it to trace each visible structure to a source or semantic purpose before batching a correction.
Lock the visual contract
Record:
- the authorized files, pages, frames, or components;
- the latest approved screenshot, design, implementation, or design-system source;
- the content and interactions that must remain unchanged;
- the specific symptoms named by the user;
- the visual evidence required for acceptance.
Inspect the complete root frame or rendered page before judging local colors or spacing. Transparent nodes, inherited fills, hidden constraints, and clipped parents can make an isolated layer misleading.
Require evidence for visible structure
Allow a divider, border, card outline, background panel, or dark region only when at least one condition holds:
- it exists in the approved visual source;
- it is an approved component state or design-system rule;
- it communicates a real semantic boundary, interaction state, selection, warning, or contrast requirement;
- the user explicitly requests it.
Remove or avoid:
- gray horizontal rules added to fill blank space;
- borders around content already grouped by alignment and spacing;
- repeated card shells that reduce information density;
- full-width lines carried over from an unrelated template;
- muted gray panels with no hierarchy or state role;
- black or inverse regions inferred from an isolated transparent layer;
- dark bands added for visual drama without source evidence.
Use alignment, typography, proximity, and whitespace before adding a visible separator. If a visible structure remains, record its source or semantic purpose.
Control spacing at three levels
Review spacing separately:
- Inside an item — icon-to-label, heading-to-body, label-to-value, control padding.
- Inside a module — row gap, card gap, column gap, text-to-media distance.
- Between modules — section padding, transition gap, long-page rhythm, footer offset.
Apply these rules:
- Derive values from the approved source, local design tokens, or repeated neighboring patterns. Do not insert generic large gaps without evidence.
- Preserve a readable hierarchy of gaps: item gaps < module gaps < major section transitions.
- Widen text containers before accepting excessive wrapping, tall rows, or false empty space.
- Prefer content-driven height and Auto Layout over large fixed heights.
- Remove obsolete
min-height, spacer layers, invisible placeholders, and nested fixed heights when they create inactive blank zones. - Recalculate child, parent, root, and following-section positions after vertical edits.
- Keep density appropriate to the product. Compact does not mean cramped; every reduction must preserve readability, target size, and semantic grouping.
When a layout engine resists height reduction, inspect min/max constraints, fixed sizing, Auto Layout behavior, clipping, overflow, and ancestor height before changing visible styles.
Edit in a stable order
For each scoped module, modify in this order:
- container width, columns, and outer padding;
- text width, wrapping, and content-driven height;
- internal gaps and row heights;
- unjustified dividers, borders, cards, and background panels;
- unjustified black or inverse surfaces after checking ancestor fills and themes;
- typography, semantic colors, radii, icons, and media treatment;
- module height, page height, overflow, and downstream positions.
Reuse approved components, variables, and styles. Preserve component linkage. Do not detach instances or change shared main components unless explicitly authorized.
Validate a specimen before batching
Choose one difficult representative module before applying a rule broadly. Prefer long text, metric lists, dense indexes, forms, or a section the user called out.
For the specimen:
- capture the complete before state and its surrounding context;
- inventory visible gaps, dividers, boxes, panels, and dark surfaces;
- trace each retained structural element to a source or semantic reason;
- apply the smallest rule set that resolves the stated problem;
- capture the after state at the same viewport or frame scale;
- check readability, information density, clipping, overflow, and overall rhythm;
- correct the rule before batching it to sibling screens.
Do not batch from token inspection alone when the complaint concerns geometry, spacing, or invented decoration.
Run final QA
Check every scoped screen for:
- compact, consistent, content-driven vertical rhythm;
- text widths and wrapping appropriate to the viewport;
- no unexplained gray line, border, card shell, background panel, or dark region;
- every retained visible boundary tied to a source or semantic role;
- no clipping, overlap, unintended overflow, or large tail gap;
- readability, interaction target size, state clarity, and accessibility preserved;
- content, routes, media, and out-of-scope shared components unchanged.
Return Pass, Open, or Blocked for spacing, visible boundaries, surface colors, and full-screen rhythm. Do not merge these results into cross-device parity status.
Handoff
Return:
- scope and approved visual source;
- content and interactions kept unchanged;
- rules applied for spacing, boundaries, containers, and surface colors;
- before/after proof from the same context and scale;
- full-screen QA status;
- retained exceptions and their evidence;
- explicit remaining issues.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

