Skip to content
Back to skills

Minimal Frontend

ASecurity

A default fallback design system for app UI and standalone HTML report pages, covering theme tokens, type and density scale, status colors, container-first responsive rules, anti-slop, and accessibility.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 23, 2026
ai-agentsgonodegitfrontend

Works with

  • cursor
  • cli

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned December 4, 2026

npx -y skills add kargnas/skills --skill minimal-frontend --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Minimal Frontend?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Minimal Frontend
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/kargnas-minimal-frontend/badge)](https://www.skillsdirectory.com/skills/kargnas-minimal-frontend)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: minimal-frontend
description: A default fallback design system for app UI and standalone HTML report pages, covering theme tokens, type and density scale, status colors, container-first responsive rules, anti-slop, and accessibility.
when_to_use: Use when starting frontend work in a project with no existing design system, when asked to make a report.
metadata:
  author: kargnas
  version: "0.17.0"
  argument-hint: <file-or-pattern>
---

# Minimal Frontend

One design system for two kinds of output: app UI and report pages. This file holds the rules both share, written in shadcn/ui and Tailwind CSS v4 names. The file for the output says how to apply them.

## Pick the output

| Request | MUST read before writing code or findings |
|---|---|
| App UI: building or editing screens, components, or flows inside a product, a report screen included | [app.md](app.md) |
| A review or audit of web UI | [app.md](app.md), Review Preflight first; also [report.md](report.md) when the target is a report page |
| Report page: one standalone HTML file that presents findings, an analysis, or a status to readers | [report.md](report.md) |

`app.md` says when to read these, and a report page never needs them: [`app/components.md`](app/components.md) for per-component counts, behavior, and copy limits; [`app/screens/settings.md`](app/screens/settings.md) for settings screens; [`app/legacy.md`](app/legacy.md) for Tailwind CSS v3 and older token names; the Transitions.dev guide [`app/transitions/GUIDE.md`](app/transitions/GUIDE.md) for transitions and motion tokens. `report.md` offers the report options as checkboxes, and a page reads only the checked ones: [`report/options/inline-translation.md`](report/options/inline-translation.md) and [`report/options/speaker-photos.md`](report/options/speaker-photos.md).

## Design System

### Theme tokens

These values are the theme. `app.md` and `report.md` say where each output declares them.

| Tokens | Light | Dark |
|---|---|---|
| `--background`, `--sidebar` | `oklch(0.985 0 0)` | `oklch(0.145 0.002 286.131)` |
| `--card`, `--popover` | `oklch(1 0 0)` | `oklch(0.192 0.004 286.018)` |
| `--foreground`, `--card-foreground`, `--popover-foreground`, `--secondary-foreground`, `--accent-foreground`, `--sidebar-foreground`, `--sidebar-accent-foreground` | `oklch(0.169 0.002 286.177)` | `oklch(0.947 0.003 286.349)` |
| `--muted-foreground` | `oklch(0.551 0.023 264.364)` | `oklch(0.649 0.015 262.359)` |
| `--primary`, `--sidebar-primary`, `--ring`, `--sidebar-ring` | `oklch(0.567 0.159 275.206)` | `oklch(0.567 0.159 275.206)` |
| `--primary-foreground`, `--sidebar-primary-foreground` | `oklch(1 0 0)` | `oklch(1 0 0)` |
| `--accent`, `--muted`, `--secondary`, `--sidebar-accent` | `oklch(0 0 0 / 3.5%)` | `oklch(1 0 0 / 5%)` |
| `--border`, `--sidebar-border` | `oklch(0 0 0 / 8%)` | `oklch(1 0 0 / 8%)` |
| `--input` | `oklch(0 0 0 / 12%)` | `oklch(1 0 0 / 12%)` |

- `primary` is the single accent color, and focus rings use it too. shadcn's `accent` is the hover/selected surface, not the brand color.
- Selected or active backgrounds use `bg-primary/10 dark:bg-primary/14`.
- A new semantic color follows shadcn's pair convention: `--name` and `--name-foreground`, defined for light and dark.
- Every output ships both themes behind a three-way `System / Light / Dark` selector: default System (`prefers-color-scheme`), persisted. Nothing ships light-only.
- `:root` sets `color-scheme: light`, and every rule that sets the dark values also sets `color-scheme: dark`, so native scrollbars, select menus, date pickers, and autofill follow the theme.

The type scale and the only allowed elevation:

```css
@theme {
  --text-kpi: 24px;     /* KPI numbers */
  --text-title: 14px;   /* page, card, dialog titles, bottom-bar buttons */
  --text-body: 13px;    /* body, nav, menus, buttons, inputs, table cells */
  --text-caption: 12px; /* captions, field labels, table headers */
  --text-micro: 11px;   /* kbd, badges, xs buttons, menu shortcuts */
  --text-field: 16px;   /* text fields under touch: iOS Safari zooms into a focused field below 16px */
  --shadow-card: 0 1px 2px rgb(0 0 0 / 0.04);
}
```

The text tokens set font size only. Line height comes from the parent or from a modifier such as `text-body/relaxed`.

### Fonts

- Inter (`font-sans`, UI text), JetBrains Mono (`font-mono` — numbers/ids/paths/status badges), Noto Sans KR/SC/JP appended to the `--font-sans` stack as CJK fallback.
- Numbers, identifiers, file paths, and status badges are ALWAYS `font-mono` — proportional digits jitter when values update.

### Status colors

One status vocabulary for every component (badge, field, toast, chart):

- critical (error, failure, rejected, failed check) = `destructive`.
- warning (expiring soon, missing submission) = amber. Quota/progress bars use amber for the 20-50% remaining band.
- live/streaming = emerald.
- neutral, ok, and informative (beta, limited permission) = `text-muted-foreground`. Positive results (saved, approved, published) count as ok.
- AI features and AI-generated content carry one marker everywhere, including their loading and notice states: the same icon from the project's icon set plus an `AI` label, with no extra color.

### Density scale

- Padding: boxes/cards/bands use the SAME value on all four sides — large cards `p-4`, dense boards/list items `p-3` (shadcn `Card` default and `size="sm"`). Asymmetric padding only on small buttons/chips (and table cells `px-4 py-2`).
- **Padding/gap tokens never exceed 16px (=4)** — `p-5`/`p-6`/`gap-5`+ and `--spacing(5)`+ are forbidden. Gaps: `gap-2/3/4`.
- Vertical rhythm: `mt-8` between sections, `mb-3` between a section title and its content — same scale on every section. Inside a card's internal list: `space-y-3`/`space-y-3.5`.
- Header bars: `h-12` (page header, sidebar logo), `h-11` (card/table header).
- Font sizes — the entire scale is the six `@theme` tokens: `text-kpi`, `text-title`, `text-body`, `text-caption`, `text-micro`, `text-field`. Do not introduce new sizes or arbitrary `text-[Npx]` values.
- Headings are semantic `h1`/`h2` with `text-balance`. Dates and comparable numbers get `tabular-nums`.
- Labels/questions recede visually (small, secondary ink); the answer/content is the visual protagonist.
- A screen may declare an explicit, documented exception to this scale (e.g. an ultra-dense matrix), but the exception must be written down where the screen lives and ideally pinned by a test — never silently drift.

### Layout & Responsive

- Layout responds to **container width**; chrome (nav pattern, target size, popover vs sheet) responds to **input method**. Never bind both to one viewport breakpoint.
- Inside a region (card, form, table, panel) use `@container` on the wrapper and `@md:`-style variants on descendants. Viewport `md:`/`lg:` only for the page skeleton: whether the sidebar exists, header arrangement, sticky bars.
- Grids: `repeat(auto-fit, minmax(min(Npx, 100%), 1fr))`. `min()` lets the single column shrink in a container narrower than N instead of widening the page. Column count is derived from available space, never declared per breakpoint. The `grid-cols-1 md:grid-cols-2 lg:grid-cols-4` ladder is forbidden.
- Narrow ≠ mobile. An 800px desktop window keeps the density scale, hover states, and mouse chrome. Phone chrome (bottom nav, sheets, bottom action bars) is gated by `pointer-coarse:` (`@media (pointer: coarse)`), which reads only the primary input. Touch sizing (44px targets, `text-field`) and the touch reveal of hover actions use `any-pointer-coarse:`, because a touch laptop reports a fine primary pointer while fingers still tap it. Tailwind v4 already scopes `hover:` to `@media (hover: hover)`.
- Navigation follows width and input together. From `md:` up, every input gets the sidebar, and touch adds no bottom tab bar. Below `md:`, touch gets the bottom tab bar, and a mouse gets an always-visible menu button that opens the sidebar as a sheet.
- Regions degrade independently: sidebar → icon rail → hidden; table → hide low-priority columns → horizontal scroll (never row-to-card); grid → fewer columns. One region collapsing must not collapse another.
- No horizontal overflow at any width. `h-dvh`/`min-h-dvh`, not `h-screen` (`100vh`). In-flow widths use `w-full`, never `w-screen` (`100vw`): where scrollbars take up space (Windows, Linux, macOS set to always show them), `100vw` includes the scrollbar and adds a horizontal scroll. When something overflows, fix that element. Never put `overflow-x: hidden` on `html` or `body`: it turns the body into a scroll container, and the sticky top bar scrolls away. Use `overflow-x: clip` on the overflowing region when clipping is the intent.
- A scroll container inside the page contains overscroll on its own axis only, so scrolling past its end doesn't scroll the page behind it, pull to refresh, or swipe back in history: `overscroll-x-contain` on a horizontal one (table, code block, node graph), `overscroll-y-contain` on a vertical one (list pane, sheet body). Plain `overscroll-contain` on a horizontal scroller also blocks vertical page scrolling that starts on it.
- `env(safe-area-inset-*)` is 0 unless the viewport meta sets `viewport-fit=cover`, and `cover` also lets the page run under the notch in landscape. A page that sets `cover` pads every element that touches a screen edge on that side with `max(<its padding>, env(safe-area-inset-<side>))`: a bottom bar pads bottom, left, and right, and the top bar and the page column pad left and right.
- Type and spacing stay on the fixed scale — no `clamp()`. Width changes column count and region visibility, nothing else.
- Verify in one window at 375 / 800 / 1280. 800 must read as a narrow desktop, not a phone. Check 375 once more with touch emulation on (a phone preset in the DevTools device toolbar): a narrow window still reports a mouse, so the touch rules never show without it.

## Anti-slop (never do this)

- **No left accent border** on cards, rows, or nav items — ever, on any page.
- No drop shadows beyond `shadow-card` (dark mode has none at all). A sticky header over scrolling content separates with a hairline (`border-b`), not a shadow.
- No gradient fills (backgrounds, text, borders), no decorative icons beyond the project's icon set (`components.json#iconLibrary`).
- No new font sizes, weights, or spacing values outside the scale above.
- Margin/padding must be consistent with sibling components of the same purpose; misaligned spacing is a bug, not a nit.
- **Stat tiles / big numbers.** A row of label + huge number is the signature AI-slop dashboard move. Rules:
  - Big-number treatment (`text-kpi`) is EARNED by context: the tile must carry a delta vs previous period, a target, or a sparkline. A bare number with no context cannot be a tile — demote it to a table/list row.
  - Cumulative counters (total tokens, total requests, all-time sums) are logs, not KPIs — they belong in a table row, never a stat tile.
  - Never repeat as a big number what a table on the same screen already shows. The tile row is not a table header.
- **Avatar initials / name placeholders.** A circle holding one Hangul syllable, surname or given name (`김`, `민`), identifies no one: too many people share each syllable. Rules:
  - If the people data has no photo field, or most records leave it empty (meeting participants, recordings, imported contacts), draw no avatars. List the names as text, the first one or two and then `+N`, with the full list one click or tap away.
  - If photos are the norm and one is missing, a Korean name's `AvatarFallback` holds a neutral person icon from the project's icon set. It may hold the two-syllable given name instead only when all three hold: the circle fits two syllables at `text-micro` or larger; the data already stores the given name in its own field (never split a full name, since 남궁·제갈·선우 are two-syllable surnames); and the service supports a small fixed set of languages, such as Korean only or Korean and English.

## Accessibility (required, not optional)

- Every interactive element has BOTH a visible focus ring (shadcn's `focus-visible:ring-*` + `focus-visible:ring-ring/*` pair) and a `hover:` state. `outline-none`/`outline-hidden` without a visible focus replacement is forbidden.
- `body` gets `wrap-break-word`, so a long URL, path, or ID breaks instead of widening the page (`wrap-anywhere` in table cells, where `break-word` cannot shrink the column); flex/grid children that hold text get `min-w-0` (the classic invisible-overflow bug).
- Every clickable element shows `cursor-pointer` — buttons, links styled as buttons, clickable rows/cards/list items, tabs, chips, icon buttons. `<button>` is NOT exempt, because its default cursor is `default`: one base rule covers it (`button:not(:disabled), [role="button"]:not(:disabled) { cursor: pointer }`). Disabled controls get `cursor-not-allowed`; text inputs keep the I-beam.
- Every screen is usable on mobile web (375px wide, touch, no hover): nothing is hover-only — an action revealed on `hover:` is also always visible on touch (`any-pointer-coarse:opacity-100`) or reachable from a tap menu, and horizontal scroll lives only inside tables, code, and node graphs (`overflow-x-auto` on that container), never on the page. Check 375px before calling a screen done.
- Target size is 44×44px under touch and at least 24×24px with a fine pointer. Under touch (`any-pointer-coarse:`), a control drawn smaller than 44px grows by 8px and keeps its shape: a 28px button or input becomes 36px, and a 28×28 icon button becomes 36×36. `touch-hit` on the `relative` control then extends its target to 44×44px without changing the visible box. Text fields and native selects can't hold a pseudo-element, so their grown height is their target. Adjacent controls keep at least `gap-2`, so their targets don't overlap, and a `touch-hit` control sits at least `px-2` from the screen edge, because its target sticks out past the box by up to 8px and widens the page. Which screens move their main action to a bottom bar instead is decided in [app/components.md](app/components.md) (Buttons).

  ```css
  /* ::before, because shadcn already uses ::after for checkbox, switch, and radio hit areas and for the tab indicator. */
  @utility touch-hit {
    @media (any-pointer: coarse) {
      &::before { content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); translate: -50% -50%; }
    }
  }
  ```
- Text fields (input, textarea, native select) show their text at `text-field` (16px) under touch (`any-pointer-coarse:text-field`), because iOS Safari zooms the page into a focused field whose text is smaller. Never block that zoom with `maximum-scale` or `user-scalable=no` in the viewport meta: it also stops pinch zoom on Android.
- A shape drawn only with a background color (bar fill, progress or quota bar, timeline dot) also gets `forced-colors:bg-[CanvasText]`: Windows contrast themes replace every background with the page color, and the shape disappears.
- Color never carries information alone: pair it with text or an icon (status, errors, chart series).
- Color pairs outside the theme table (status, chart, and new semantic colors) meet APCA contrast: Lc 75 (90 preferred) for body text, titles, input values, and tooltips; Lc 60 for other text; Lc 30 for placeholder and disabled text.
- Enlarged text (browser zoom, OS text size) wraps instead of clipping, and button rows stack.
- Decorative elements get `aria-hidden`.

Files in this skill

  • SKILL.md11.9 KB
  • app.md22.6 KB
  • references/component-policies.md16.4 KB
  • references/legacy.md5.5 KB
  • report-options/inline-translation.md6.3 KB
  • report-options/speaker-photos.md3.2 KB
  • report.md11.2 KB
  • sub-skills/transitions-dev/01-card-resize.md1.6 KB
  • sub-skills/transitions-dev/02-number-pop-in.md3.7 KB
  • sub-skills/transitions-dev/03-notification-badge.md3.9 KB
  • sub-skills/transitions-dev/04-text-states-swap.md3 KB
  • sub-skills/transitions-dev/05-menu-dropdown.md3.4 KB
  • sub-skills/transitions-dev/06-modal.md2.7 KB
  • sub-skills/transitions-dev/07-panel-reveal.md2.7 KB
  • sub-skills/transitions-dev/08-page-side-by-side.md3.3 KB
  • sub-skills/transitions-dev/09-icon-swap.md2.4 KB
  • sub-skills/transitions-dev/10-success-check.md6.9 KB
  • sub-skills/transitions-dev/11-avatar-group-hover.md7.2 KB
  • sub-skills/transitions-dev/12-error-state-shake.md8.3 KB
  • sub-skills/transitions-dev/13-input-clear-dissolve.md10.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.