ui-layout-consistency

ui-layout-consistency is a cursor rule for Cursor from rizkyhaksono/portfolio-v3. It costs 903 tokens per session, scanned A, original, MIT.

A set of project rules for keeping Portfolio v3 interfaces visually consistent. It defines the approved page shells, content boxes, nested sections, borders, spacing, and surface styles.

In plain words
What is it for?
Use it when adding or changing Portfolio v3 layouts, cards, lists, feature sections, window-like shells, nested rows, sidebars, or status cells.
Why use it?
It prevents new screens from mixing unrelated visual patterns or inventing different card styles. Following the shared rules keeps the interface coherent across features.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when adding or changing Portfolio v3 layouts, cards, lists, feature sections, window-like shells, nested rows, sidebars, or status cells.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/rizkyhaksono/portfolio-v3/ui-layout-consistency
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/rizkyhaksono/portfolio-v3

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 ui-layout-consistency

README.md
[![agentmods](https://agentmods.dev/badge/rules/rizkyhaksono/portfolio-v3/ui-layout-consistency.svg)](https://agentmods.dev/rules/rizkyhaksono/portfolio-v3/ui-layout-consistency)
Your own site
<a href="https://agentmods.dev/rules/rizkyhaksono/portfolio-v3/ui-layout-consistency"><img src="https://agentmods.dev/badge/rules/rizkyhaksono/portfolio-v3/ui-layout-consistency.svg" alt="Measured on agentmods" height="20"></a>
Per session 903 This file is loaded in full into every session.
When invoked 903 The same file — it is already loaded in full.
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.00903 $0.00903
Opus 5 $0.00451 $0.00451
Sonnet 5 $0.00181 $0.00181
Haiku 4.5 $0.00090 $0.00090

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

Security

Grade A, and why

ui-layout-consistency 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 7d 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.

.cursor/rules/ui-layout-consistency.mdc · 87 lines

How it starts

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

UI Layout & Surface Consistency

Portfolio v3 uses a monochrome, square, hairline-border design language. Keep every new UI on this system.

Tokens (source of truth)

  • CSS variables in src/app/globals.css (semantic colors only: background, foreground, card, border, muted, primary, …)
  • Radius: all named radii collapse to 0 in tailwind.config.ts (square). Keep rounded-full only for avatars/dots.
  • Shared class tokens: src/lib/design-system.ts (SURFACE, PAGE_WIDTH, SECTION_SPACING)

Never use raw palette classes like neutral-*, text-black, hex hovers (#262626, #D9D9D9), or border-white/10 glass stacks on content cards.

Three surface dialects only

Variant Use for Primitive
solid Content boxes, lists, feature/platform cards Card, FeatureCard, Surface variant="solid"
glass Window chrome only (title bar + frosted shell) MacWindow, Surface variant="glass" / glass-static
inset Nested rows, sidebar blocks, status cells Surface variant="inset"

Forbidden on content cards

Do not invent glass content cards:

border-white/10 bg-white/5 backdrop-blur-md hover:shadow-xl hover:-translate-y-1

Use solid + hover:border-foreground/20 instead.

Page shell recipe (visitor / user)

BaseLayout(sidebar?, rightSidebar?)
  └─ PageBody width="default" | "prose" | "article" | "wide"
       └─ SectionHeading (as="h1" on page routes)
       └─ MacWindow? (tools / lists) OR Card / FeatureCard / Surface rows
  • Prefer PageSection for home/page blocks (mt-10 + optional SectionHeading).
  • Prefer PageBody for width — do not stack extra px-4 lg:px-0 inside BaseLayout (container already pads).
  • Do not invent max-w-8xl (undefined). Use PAGE_WIDTH presets.

Heading & micro-UI

  • Section titles: always SectionHeading (eyebrow + display title + optional serif italic accent).
  • Labels/tags: Eyebrow, Chip.
  • Stat rows: StatStrip.

Read the full file on GitHub · 87 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. 7d ago First seen · 87 lines · 903 tokens per session scan A e4172c1ad8f6

Subscribe to this mod's changes

ui-layout-consistency is a cursor rule published in the GitHub repository rizkyhaksono/portfolio-v3 (6 stars, last pushed today), licensed MIT. It adds 903 tokens to every session, about $0.0045 per session on Opus 5. 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.