AGENT SKILL

web-design

Use when designing or building web UI, frontends, or styling — covers personal web design preferences, fluid layout, and Alpine.js

License 许可
MIT
所属仓库
kejadlen/dotfiles
最近更新
2026-11-14
Stars
★ 10
Forks
0

01 前言 Front Matter

name
web-design
description
Use when designing or building web UI, frontends, or styling — covers personal web design preferences, fluid layout, and Alpine.js

03 SKILL.md 正文

Web design

These are personal defaults for building web interfaces. When a project has its own design system, component library, or established conventions, follow those instead.

For semantic markup, browser support, accessibility, and validation, use web-standards.

CSS

matklad's CSS: the unavoidable bad parts covers more ground — classless CSS, resets, flexbox, and gotchas like margin collapsing. Worth reading and weighing case by case, not adopting wholesale.

Fluid layout with Utopia

Prefer fluid type and space scales over fixed breakpoint jumps. Sizes interpolate continuously between a minimum and maximum viewport with CSS clamp(), so layouts scale smoothly instead of snapping at media-query boundaries.

Why fluid over breakpoints:

  • Type and spacing stay proportional at every viewport width, not just the handful you picked.
  • Fewer media queries to write and maintain.
  • One coherent scale ties heading sizes, body text, and spacing together.

Generate the scales with the Utopia calculators rather than hand-writing clamp() values:

Expose each step as a CSS custom property (--step-0, --step-1, --space-s, --space-m, and so on) and reference the properties throughout, so the scale lives in one place.

Interactivity with Alpine.js

Prefer Alpine.js for interactivity on server-rendered pages. Alpine adds behavior through HTML attributes (x-data, x-show, x-on) with no build step, which suits sites where the markup already comes from the server and only needs light, local interactivity.

Reach for Alpine when:

  • The page is server-rendered and needs sprinkles of behavior (dropdowns, toggles, tabs, small stateful widgets).
  • A full SPA framework would be more machinery than the problem warrants.
  • You want behavior to live next to the markup it controls.

Prefer a heavier framework when the UI is genuinely application-shaped — substantial client-side state, routing, or complex component trees that Alpine's directive model would strain.

References:


This is a self-improving skill. If you used it and it came up short — a missing command, flag, gotcha, or workflow — invoke the self-improving-skills skill and follow it before you finish.

04 同仓库更多 Skills

kejadlen
kejadlen/dotfiles

zoekt

Use when searching code across repositories — prefer zoekt over grep/ripgrep for indexed code search. Covers indexing repos, search syntax, and query patterns.

★ 10
kejadlen
kejadlen/dotfiles

writing-for-accessibility

Use when writing documentation, alt text, diagrams, or any content that should be accessible to people with disabilities. Covers alt text, color contrast, inclusive language, and accessible visuals. Also use when reviewing documents for accessibility.

★ 10
kejadlen
kejadlen/dotfiles

writing-error-messages

Use when writing, reviewing, or improving error messages in code, CLI tools, APIs, or UIs. Covers identifying the cause, explaining the fix, and setting the right tone. Also use when error messages are vague, unactionable, or confusing.

★ 10
kejadlen
kejadlen/dotfiles

working-in-the-open

Use when making design decisions during implementation — routes rationale to the right venue (commits, task comments, code comments, or documentation) based on how durable the context needs to be

★ 10
kejadlen
kejadlen/dotfiles

web-standards

Use when writing or reviewing HTML, CSS, or browser JavaScript — covers semantic markup, native platform features over libraries, Baseline browser support, accessibility and APCA contrast, and optional validation with vnu, axe, and Lighthouse

★ 10
kejadlen
kejadlen/dotfiles

warm-handoff

Use when the user asks to "warm handoff", "/warm-handoff", "hand off this thread", or "redirect this to". Reads a Slack thread and proposes a warm handoff message for the target channel.

★ 10