design-surfaces
Skill9 starsChanged 2 months agoMITView on GitHub
Use when styling cards, dialogs, modals, panels, borders, shadows, elevation, overlays, nested radii, “radius terasa aneh”, “shadow kasar”, or surfaces that lose hierarchy between light and dark themes.
In this repository36 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/design-system-enforcer.mdcCursor rule
- frontend-expertSkill
- accessibilitySkill
- anti-slop-codeSkill
- anti-slop-designSkill
- app-shellSkill
- architectureSkill
- componentsSkill
- content-designSkill
- data-fetchingSkill
- design-colorSkill
- design-directionSkill
- design-foundationsSkill
- design-typographySkill
- design-vocabularySkill
- devtoolsSkill
- engineering-vocabularySkill
- fidelitySkill
- formsSkill
- frontend-expertSkill
- marketingSkill
- monitoringSkill
- motion-inspectionSkill
- motionSkill
- performanceSkill
- polishSkill
- prototypeSkill
- quality-loopSkill
- responsiveSkill
- seoSkill
- skill-authoringSkill
- testingSkill
- tokensSkill
- webglSkill
The file
Files
Design Surfaces
Overview
Surface styling communicates grouping, hierarchy, and state. Geometry and depth follow the project language before any standalone recipe.
When to use
- Nested cards/panels, modal layers, overlays, dividers, or elevation
- Radius mismatch, harsh shadows, excessive borders, or dark-theme flattening
- Button/control families whose radii drift across text, icon, and state variants
- Creating surface tokens or auditing nested containers
When to skip
- Palette construction →
design-color - Large layout grouping →
design-foundations - Enter/exit behavior →
motion
MUST
| Rule | Detail |
| Project language first | Reuse existing radius, border, and elevation tokens |
| Control-family consistency | Buttons and related controls use project radius tokens across text/icon variants and states |
| Purposeful depth | Borders structure; shadows/tonal steps may convey elevation |
| Conditional concentricity | Outer ≈ inner + inset only when curves share a visual center |
| State-aware | Verify hover, focus, selected, disabled, overlay, light, and dark as relevant |
| No card nesting habit | Add a surface only when it communicates a boundary or level |
Workflow
- Inventory — tokens, nesting, surface jobs, themes, and interaction states.
- Simplify — remove redundant wrappers, borders, and competing elevation.
- Align — correct radius geometry and structural separators; compare the control family as a matrix.
- Tune — dark/light tonal separation, shadow opacity, backdrop, and outline.
- Verify — rendered themes, states, small sizes, zoom, and clipping.
Boundaries
- May decide: border, tone, or shadow when the project has no established depth language.
- Must not: make every region a card, apply a radius formula universally, or use shadow as the only focus/state cue.
Checklist
- Every surface has a grouping, hierarchy, or state job
- Nested geometry and exceptional shapes checked
- Modified button/control families use project radius tokens; text/icon variants and relevant states stay geometrically and optically balanced
- Light/dark and interaction states rendered
- Heuristics and waivers identified
Depth
Full guide: references/design-surfaces.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

