emil-surfaces
БесплатноБез исполняемых скриптовНе проверенShadows, borders, gradients, depth, and dark-mode surface treatment for interfaces. Use when styling cards, buttons, containers, modals, dropdowns, or images…
от freekmurze★ 1 019 звёзд на GitHubОб этом скилле
Surfaces
Depth in an interface comes from how surfaces meet: the radius where they nest, the shadow or border that separates them, the gradient that fades them out. Most interfaces that feel "off" fail here — mismatched nested radii, harsh solid borders, banded gradients, or light-mode shadows pasted into dark mode. These are cheap to fix and compound into an interface that feels considered.
Match the project's styling system
Before making changes, check how the project styles things — Tailwind, plain CSS, CSS Modules, or CSS-in-JS — and express every fix in that system. Don't introduce a styles.css full of custom classes into a Tailwind codebase, and don't inline Tailwind-style utilities into a styled-components project. Shadow and color tokens belong wherever the project keeps its design tokens (Tailwind @theme / config, :root variables, or the theme object).
Core Principles
1. Derive nested radii, don't repeat them
A rounded child inside a rounded parent gets its radius by subtraction: innerRadius = outerRadius − padding. Copying the parent's radius onto the child makes the corner gap pinch — the single most frequent giveaway of an unpolished UI. The rule loses force once the gap between layers passes 24px; at that distance the surfaces read as independent, so pick each radius on its own merits.
2. Shadows over borders for depth
Elements that use a border to signal elevation — cards, buttons, containers — should carry a stacked translucent box-shadow instead. Transparency composites with whatever sits underneath, so one token works everywhere; a solid border color is tuned to exactly one background. Keep real borders where the job is layout separation (dividers, table cells, form inputs).
3. Dark mode flattens shadows to rings
Stacked depth shadows can't be seen against dark surfaces. When the theme goes dark, collapse each shadow token down to one low-opacity white ring at 1px.
4. Hairline borders on retina
Dividers and fine lines should render at 0.5px on high-density screens via a media-query-driven CSS variable, falling back to 1px on standard displays.
5. Eased gradients, masks for fades
Plain linear gradients between solid colors band visibly — use eased gradients instead. For fading content out, prefer mask-image over a gradient overlay; masks work with whatever is behind them. Never put a fade on scrollable content — it cuts off what the user is trying to read.
6. Image outlines: pure black or pure white only
Every image gets a 1px low-opacity outline for consistent depth. Light mode: black at 10%. Dark mode: white at 10%. Never a tinted neutral (slate, zinc, #111827) and never the accent color — a tinted line inherits whatever surface sits behind it and ends up looking like grime along the edge instead of a clean boundary.
7. Dark mode flips variables, not classes
Define colors as a numbered scale of CSS variables and swap the values under the dark theme selector. Don't scatter manual dark: overrides across components.
Nested Radii
The inner radius is computed, never copied:
/* Derived — corner gap stays even all the way around */
.dialog {
border-radius: 16px;
padding: 6px;
}
.dialog-body {
border-radius: 10px; /* 16 − 6 */
}
/* Pinched — child repeats the parent's radius */
.dialog,
.dialog-body {
border-radius: 16px;
}
// Tailwind — subtract the padding when picking the child's radius
<section className="rounded-3xl p-3"> {/* 24px outer, 12px gap */}
<article className="rounded-xl"> {/* 24 − 12 = 12px ✓ */}
...
</article>
</section>
Depth Without Borders
A card or button that draws a solid border to look raised has two problems: the color was picked against one specific background, and the edge reads flat. Replace it with a shadow stack built from three ingredients — a 1px spread that stands in for the border, a tight crisp layer just beneath the element, and a wider soft layer for ambient depth:
:root {
--elevation-raised:
0 0 0 1px rgb(0 0 0 / 0.05),
0 1px 3px rgb(0 0 0 / 0.05),
0 4px 10px -4px rgb(0 0 0 / 0.05);
--elevation-raised-hover:
0 0 0 1px rgb(0 0 0 / 0.07),
0 1px 3px rgb(0 0 0 / 0.07),
0 4px 10px -4px rgb(0 0 0 / 0.08);
}
/* Hook into however the project switches themes:
a class, a data attribute, or prefers-color-scheme */
.dark {
--elevation-raised: 0 0 0 1px rgb(255 255 255 / 0.09);
--elevation-raised-hover: 0 0 0 1px rgb(255 255 255 / 0.14);
}
For hover, transition only the shadow — nothing else:
.panel {
box-shadow: var(--elevation-raised);
transition: box-shadow 150ms ease-out;
}
.panel:hover {
box-shadow: var(--elevation-raised-hover);
}
The lone spread ring is also useful on its own, anywhere a real hairline border sits awkwardly against its background:
/* Ring shadow standing in for a 1px border */
box-shadow: 0 0 0 1px rgb(0 0 0 / 0.07);
Leave separation bor
Установить emil-surfaces в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл emil-surfaces?
Shadows, borders, gradients, depth, and dark-mode surface treatment for interfaces. Use when styling cards, buttons, containers, modals, dropdowns, or images, choosing between borders and shadows, fixing nested border radii, adding gradients or fades, defining elevation, or adapting surfaces to dark mode. Triggers on: box-shadow, shadow, border, borders, border-radius, rounded corners, nested radius, concentric radius, elevation, depth, layering, surface, card, container, gradient, gradient banding, eased gradient, mask-image, fade, fade-out, hairline border, 0.5px border, divider, outline, image outline, image border, dark mode, dark theme, theme variables, color scale, oklch, "looks flat", "border looks harsh", "card feels off".
Как установить скилл emil-surfaces?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл emil-surfaces запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic