/kargnas-skills:minimal-frontendfrom kargnas-skills
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. Use when starting frontend work in a project with no existing design system, when asked to make a report.
Ships in kargnas-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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.
| 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 |
| A review or audit of web UI | app.md, Review Preflight first; also 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 |
app.md says when to read these, and a report page never needs them: app/components.md for per-component counts, behavior, and copy limits; app/screens/settings.md for settings screens; app/legacy.md for Tailwind CSS v3 and older token names; the Transitions.dev guide 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 and report/options/speaker-photos.md.
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.bg-primary/10 dark:bg-primary/14.--name and --name-foreground, defined for light and dark.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:
@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.
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.font-mono — proportional digits jitter when values update.One status vocabulary for every component (badge, field, toast, chart):
destructive.text-muted-foreground. Positive results (saved, approved, published) count as ok.AI label, with no extra color.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).p-5/p-6/gap-5+ and --spacing(5)+ are forbidden. Gaps: gap-2/3/4.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.h-12 (page header, sidebar logo), h-11 (card/table header).@theme tokens: text-kpi, text-title, text-body, text-caption, text-micro, text-field. Do not introduce new sizes or arbitrary text-[Npx] values.h1/h2 with text-balance. Dates and comparable numbers get tabular-nums.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.
Any horizontal scroll container (table, code block, node graph, horizontal tab or chip strip) shows that it hides content whenever its content is wider than its box, because mobile browsers hide native scrollbars until a drag starts and blank margin near the edge makes hidden content look finished. It shows three cues, updated on scroll and ResizeObserver:
mask-image fades each side that still hides content at 24px depth, and a side that has reached its end has no fade.32px toward the hidden side and back (scrollTo with behavior: 'smooth', back after 500ms). Each container nudges once per page load, and not when the reader has already scrolled it or prefers-reduced-motion: reduce matches. Motion catches the eye where a static fade over blank margin does not.border-t on bg-muted. Under a node graph it is a minimap: an aria-hidden copy of the graph's SVG scaled to the strip width, without text, nodes filled with muted-foreground mixed at 35% with transparent and no stroke, arrows 1px with vector-effect: non-scaling-stroke. A viewport rectangle (1.5px primary border, radius 4px, bg-primary/10) marks the visible part. A tap or drag on the strip scrolls the graph so that point sits in the middle, and the strip keeps touch-action: pan-y so a vertical swipe still scrolls the page. Under any other container the strip holds a 3px progress rail: a track in border with a proportional muted-foreground thumb and forced-colors:bg-[CanvasText].Hide every cue when the content fits and in @media print. Toggle visibility with a class/data attribute or [hidden] { display: none; }, because an author display rule overrides the bare HTML hidden attribute.
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.
shadow-card (dark mode has none at all). A sticky header over scrolling content separates with a hairline (border-b), not a shadow.components.json#iconLibrary).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.김, 민), identifies no one: too many people share each syllable. Rules:
+N, with the full list one click or tap away.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.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 (Buttons).
/* ::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.
app.md (opens in a new tab)app/components.md (opens in a new tab)app/legacy.md (opens in a new tab)app/screens/settings.md (opens in a new tab)app/transitions/01-card-resize.md (opens in a new tab)app/transitions/02-number-pop-in.md (opens in a new tab)app/transitions/03-notification-badge.md (opens in a new tab)app/transitions/04-text-states-swap.md (opens in a new tab)app/transitions/05-menu-dropdown.md (opens in a new tab)app/transitions/06-modal.md (opens in a new tab)app/transitions/07-panel-reveal.md (opens in a new tab)app/transitions/08-page-side-by-side.md (opens in a new tab)app/transitions/09-icon-swap.md (opens in a new tab)app/transitions/10-success-check.md (opens in a new tab)app/transitions/11-avatar-group-hover.md (opens in a new tab)app/transitions/12-error-state-shake.md (opens in a new tab)app/transitions/13-input-clear-dissolve.md (opens in a new tab)app/transitions/14-skeleton-reveal.md (opens in a new tab)app/transitions/15-shimmer-text.md (opens in a new tab)app/transitions/16-tabs-sliding.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub kargnas/skills --plugin kargnas-skills13 skills in this plugin
/ai-readyUse only when the user asks to make the repo AI-ready or AI-optimized (AGENTS.md migration, debugging/testing setup, docs). Do not run on your own./git-loreCaptures, queries, and configures decision context in native Git trailers. Use for non-trivial commit messages, decisions, rejected alternatives, follow-ups, Lore history queries, pull request decision summaries, or Lore rules in agent instructions./humanizer-kill-gptRuns a cross-language cleanup for writing tells shared by large frontier LLMs, not only GPT: English source constructs that survive other language translation and language-surface translationese. Use only when the user asks to remove AI/GPT tells from text (de-GPT, GPT 티, AI 티, 번역체 GPT, 자폐 말투 — colloquial shorthand for rigid or over-complete model prose, not a claim about autism).Other plugins' skills for the same job