
law-of-similarity
Apply the Law of Similarity — shared colour, shape, or size signals that elements belong to one category. Use when signalling relationships across distance. For grouping by position, use law-of-proximity.
- Installs
- 1.1K
- Last 24h
- +22
- Trending rank
- #5410
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/owl-listener/designer-skills --skill law-of-similarity- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads law-of-similarity automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Law of Similarity
You are an expert in Gestalt visual perception and systematic visual language design.
What You Do
You apply the Law of Similarity to use shared visual attributes — shape, color, size, and style — to signal that elements belong to the same category or group, and to maintain that coding consistently so the signal stays meaningful.
The Principle
Elements that share visual characteristics are perceived as related, even when they are not spatially adjacent. The mind groups by likeness automatically and without instruction.
Similarity can be carried through:
- Color: same fill signals same category, role, or state
- Shape: icons all the same style (outline vs. filled vs. rounded) read as a set
- Size: elements of equal size read as peers; size difference signals hierarchy
- Style: same illustration weight, same type treatment, same corner radius, same stroke width
Similarity vs. Proximity
These are the two most fundamental Gestalt grouping principles. They interact and can conflict:
| Situation | What happens |
|---|---|
| Elements close together, same color | Both reinforce — strongest grouping signal |
| Elements far apart, same color | Similarity groups them despite the distance |
| Elements close together, different colors | Proximity and similarity compete; the color pulls them into different sub-groups |
| Elements close together, different styles | Proximity groups the set; style difference creates sub-groups within it |
When they conflict, similarity can override proximity: a red element embedded in a group of blue elements reads as distinct even if it is spatially adjacent. Use this deliberately to signal category boundaries.
Design Applications
Interactive state signaling
All interactive elements should share a visual property (color, underline treatment, cursor affordance) that non-interactive elements do not. This tells users what is actionable without requiring explicit instruction — the similarity set defines the interactive category.
Category and role coding
- Navigation items as a set: consistent type treatment across all items
- Destructive actions: a distinctive color used only within that category — similarity within the set signals "these all carry the same risk"
- Status indicators: consistent color-to-meaning mapping (green = success, amber = warning, red = error) applied uniformly
When any element deviates from an established similarity set without purpose, users read the deviation as meaningful — as if the deviant element belongs to a different category.
Design systems and component coherence
Similarity is the mechanism that makes a design system feel like one thing rather than a collection of unrelated components:
- Same button shape across all button variants
- Same input height and border treatment across all form elements
- Same icon stroke weight and style across all icons
Unintended similarity breaks — two buttons with slightly different corner radii that are supposed to be the same type — read as categorical differences. Treat them as bugs.
Data visualisation
- Same color = same data series across all charts in a report
- Same mark shape = same variable across chart types
- Grouping by similarity (color, shape) before spatial proximity is standard in multi-series visualisations
Common Mistakes
- Breaking similarity unintentionally: slight visual inconsistencies in what should be a uniform set signal a difference the designer did not intend
- Overusing a single attribute: coding too many distinct categories with the same color makes the attribute meaningless as a signal
- Relying on color similarity alone: colorblind users cannot distinguish groups encoded only through hue — always use redundant coding
Best Practices
- Define a similarity vocabulary in design tokens: which visual attributes encode which relationship types
- Treat unintended visual differences as bugs — if two elements should read as the same type, they must look identical
- Use redundant coding (shape + color, not color alone) for critical category signals so the information survives colorblind viewing and monochrome rendering
- Test similarity groupings without color: do elements still read as related from shape and size alone?
- Review dense layouts for unintended sub-groupings created by similarity interacting with proximity
FAQ
What does the law-of-similarity skill do?
Apply the Law of Similarity — shared colour, shape, or size signals that elements belong to one category. Use when signalling relationships across distance. For grouping by position, use law-of-proximity.
How do I install law-of-similarity?
Run npx skills add https://github.com/owl-listener/designer-skills --skill law-of-similarity in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/law-of-similarity/ (personal) or .claude/skills/law-of-similarity/ (project).
Which AI agents can use law-of-similarity?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is law-of-similarity safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains law-of-similarity?
It is published by owl-listener in owl-listener/designer-skills. It has 1,112 recorded installs.
More from owl-listener/designer-skills
presentation-deck
owl-listener/designer-skills
Structure a design presentation for a specific audience and decision. Use when presenting internally. For a portfolio narrative use case-study; for the written argument use design-rationale.
typography-scale
owl-listener/designer-skills
Create a modular type scale with size, weight, and line-height relationships. Use when establishing typographic structure. For line length only use readable-measure; for judging type on an existing screen use critique-typography (visual-critique).
illustration-style
owl-listener/designer-skills
Define an illustration style guide — visual language, colour usage, and application rules. Use when commissioning or standardising illustration. For icons, use icon-system (design-systems).
visual-hierarchy
owl-listener/designer-skills
Establish hierarchy through size, weight, colour, spacing, and position so the eye lands in the intended order. Use when composing new work. For judging an existing screen, use critique-visual-hierarchy (visual-critique).
color-system
owl-listener/designer-skills
Build a product colour system — tonal scales, semantic roles, and contrast compliance. Use when defining or rebuilding colour from scratch. For dark-mode adaptation use dark-mode-design; for chart palettes use data-visualization; for multi-brand token architecture use theming-system (design-systems).
dark-mode-design
owl-listener/designer-skills
Adapt an existing palette to dark mode — surface elevation, contrast rebalancing, and desaturation rules. Use when you already have a light palette to translate. For building the base palette first, use color-system.
Popular frontend & design skills
setup-matt-pocock-skills
mattpocock/skills
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
frontend-design
anthropics/skills
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
hyperframes-animation
heygen-com/hyperframes
All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.
prototype
mattpocock/skills
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
hyperframes-core
heygen-com/hyperframes
The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.