gestalt-laws-detailed

gestalt-laws-detailed is a cursor rule for Cursor from julianoczkowski/create-trimble-app. It costs 0 tokens per session (4,521 once invoked), scanned A, original, MIT.

A detailed guide to Gestalt laws, which describe how people naturally group and interpret visual elements, for interfaces using the Modus design system and Angular.

In plain words
What is it for?
Use it to organize interface elements such as contact lists and cards so related information appears connected and separate items remain distinct.
Why use it?
It helps make layouts easier to understand by showing how spacing, grouping, and visual relationships affect perception.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it to organize interface elements such as contact lists and cards so related information appears connected and separate items remain distinct.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/julianoczkowski/create-trimble-app/gestalt-laws-detailed
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/julianoczkowski/create-trimble-app

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gestalt-laws-detailed

README.md
[![agentmods](https://agentmods.dev/badge/rules/julianoczkowski/create-trimble-app/gestalt-laws-detailed/github.svg)](https://agentmods.dev/rules/julianoczkowski/create-trimble-app/gestalt-laws-detailed)
Your own site
<a href="https://agentmods.dev/rules/julianoczkowski/create-trimble-app/gestalt-laws-detailed"><img src="https://agentmods.dev/badge/rules/julianoczkowski/create-trimble-app/gestalt-laws-detailed/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gestalt-laws-detailed

Your own site · 80×15
<a href="https://agentmods.dev/rules/julianoczkowski/create-trimble-app/gestalt-laws-detailed"><img src="https://agentmods.dev/badge/rules/julianoczkowski/create-trimble-app/gestalt-laws-detailed.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 4,521 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.04521
Opus 5 $0.00000 $0.02261
Sonnet 5 $0.00000 $0.00904
Haiku 4.5 $0.00000 $0.00452

Measured 10d ago against content hash 4d5a4ce78a41, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

gestalt-laws-detailed scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

templates/angular/.cursor/rules/ux/gestalt-laws-detailed.mdc · 515 lines

How it starts

The opening of the file, as written. The whole thing — 515 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Gestalt Laws in UI Design

Scope: Comprehensive Gestalt Laws with Real-World Examples and Modus Design System Integration for Angular

The Gestalt Laws are fundamental principles of visual perception that explain how humans naturally organize visual elements. When applied to UI design, these laws create intuitive, user-friendly interfaces that feel natural and reduce cognitive load.


1. Law of Proximity

Definition: Elements that are close together are perceived as related or grouped together.

Real-World Example: In a contact list, the name, phone number, and email address for each person are grouped closely together with small gaps (gap-2), while each contact is separated by larger gaps (gap-6 to gap-8) from other contacts.

Implementation:

<!-- Contact list example -->
<div class="space-y-6">
  @for (contact of contacts(); track contact.id) {
    <div class="flex items-center gap-2 p-4 bg-card border-default rounded-lg">
      <modus-avatar [name]="contact.name" size="md" />
      <div class="flex flex-col gap-1">
        <div class="text-foreground font-medium">{{ contact.name }}</div>
        <div class="text-foreground-60 text-sm">{{ contact.email }}</div>
        <div class="text-foreground-60 text-sm">{{ contact.phone }}</div>
      </div>
    </div>
  }
</div>

Key Rules:

  • Use gap-2 for related elements within a group
  • Use gap-6 to gap-8 for separation between different groups
  • Group form labels with their inputs using gap-2
  • Separate different sections with gap-6 or larger

2. Law of Similarity

Definition: Elements that look similar (same color, shape, size, or style) are perceived as related or belonging to the same category.

Real-World Example: In a dashboard, all primary action buttons use the same color="primary" style, all secondary actions use color="secondary", and all destructive actions use color="danger". This creates visual consistency that users can quickly understand.

Read the full file on GitHub · 515 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 515 lines · 0 tokens per session scan A 4d5a4ce78a41

Subscribe to this mod's changes

gestalt-laws-detailed is a cursor rule published in the GitHub repository julianoczkowski/create-trimble-app (3 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,521 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.