Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计通过

web-design-methodology网页设计方法论

Agent Skill

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

总安装

7,512

周安装

313

GitHub Stars

750

下载量

2,504
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:web-design-methodology(网页设计方法论)
来源仓库:https://github.com/jezweb/claude-skills
仓库路径:skills/web-design-methodology
安装命令:
npx skills add https://github.com/jezweb/claude-skills --skill web-design-methodology
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/jezweb/claude-skills --skill web-design-methodology

简介

使用 BEM、语义标记、移动优先响应式设计和可选的暗模式构建的生产级 HTML/CSS。

  • 强制执行 BEM 命名约定、所有设计值的 CSS 自定义属性以及语义 HTML 结构,以确保可维护性和一致性
  • 移动优先工作流程:设计为 375px,通过四个断点(640px、768px、1024px、1440px)向上增强;包括汉堡导航和 44x44px 触摸目标
  • 通过 <html> 上的 JavaScript 类切换可选的三态暗模式
  • 具有配对的前景/背景标记;跳过大多数商业网站
  • 涵盖版式对比度、80/20 颜色分布、呼吸间距系统、阴影层次结构和可访问性要求(4.5:1 对比度、语义 HTML、跳过链接、ARIA)
  • 包括反 AI 模式警告和质量检查表,以避免通用布局、统一填充和过度使用的组件骨架

SKILL.md

Web Design Methodology

Universal patterns for building production-grade HTML/CSS. This skill covers implementation methodology — pair with web-design-patterns for specific component designs.

What You Produce

Production-ready HTML/CSS prototypes with:

  • Semantic CSS custom properties (tokens)
  • BEM-named components
  • Mobile-first responsive design
  • Accessible markup
  • Optional three-state dark mode

File Structure

prototype/
├── index.html
├── about.html
├── services.html
├── contact.html
├── favicon.svg
├── css/
│   ├── variables.css     # Tokens: colours, typography, spacing
│   ├── styles.css        # All component styles (BEM)
│   └── mobile-nav.css    # Mobile menu styles
├── js/
│   ├── theme.js          # Dark mode toggle (only if requested)
│   └── mobile-menu.js    # Hamburger menu
└── media/
    └── images/

Build order:

  1. variables.css — tokens first
  2. favicon.svg — simple SVG from brand colour
  3. styles.css — all BEM components
  4. mobile-nav.css — responsive navigation
  5. JS files — from assets/ templates
  6. index.html — homepage first
  7. Inner pages — about, services, contact
  8. Mobile check — verify at 375px

BEM Naming

Use Block-Element-Modifier naming. No exceptions.

/* Block */
.hero { }
.card { }
.nav { }

/* Element (child of block) */
.hero__title { }
.hero__subtitle { }
.hero__cta { }
.card__image { }
.card__content { }

/* Modifier (variation) */
.hero--split { }
.hero--minimal { }
.card--featured { }
.btn--primary { }
.btn--lg { }

Rules:

  • Blocks are standalone components
  • Elements are children, connected with __
  • Modifiers are variations, connected with --
  • Never nest more than one level: .hero__content__title is wrong
  • Never use element without its block: .card__image only inside .card

CSS Custom Properties

Use semantic tokens. Never hardcode colours, spacing, or typography values.

See references/css-variables-template.md for the complete token template.

/* Always this */
.card {
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
}

/* Never this */
.card {
  background: #ffffff;
  color: #333333;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  padding: 24px;
}

Dark Mode (Optional)

Dark mode is optional — only add if the brief requests it. Most business sites ship faster as light-only.

When to include:

  • Brief explicitly requests it
  • Tech/developer audiences (expected)
  • Portfolio/creative sites (aesthetic choice)

When to skip:

  • Trades, hospitality, professional services
  • When simplicity and fast shipping matter more

If Adding Dark Mode

Use class-based toggle, never CSS media queries.

/* Light mode (default) */
:root {
  --background: #F9FAFB;
  --foreground: #0F172A;
  --card: #FFFFFF;
  --card-foreground: #1E293B;
}

/* Dark mode (via .dark class on html) */
.dark {
  --background: #0F172A;
  --foreground: #F1F5F9;
  --card: #1E293B;
  --card-foreground: #F1F5F9;
}

Rules:

  • .dark class on <html>, toggled via JavaScript
  • NEVER use @media (prefers-color-scheme: dark) — JS handles system preference
  • Every background token needs a paired foreground token
  • Brand colours get lighter/more saturated in dark mode
  • Backgrounds: #0F172A to #1E293B range (not pure black)
  • Every text-on-background combo must pass WCAG AA (4.5:1)

Use assets/theme-toggle.js for the three-state toggle implementation.

Responsive Design

Mobile-first. Design for 375px, enhance upward.

Breakpoints

/* Base: 375px (mobile) — no media query needed */
@media (min-width: 640px) { /* sm — large phone */ }
@media (min-width: 768px) { /* md — tablet */ }
@media (min-width: 1024px) { /* lg — small desktop */ }
@media (min-width: 1440px) { /* xl — standard desktop */ }

Mobile Priorities

  1. Phone number visible and tappable without scrolling
  2. Primary CTA visible without scrolling
  3. Navigation works via hamburger menu
  4. Touch targets minimum 44x44px
  5. No horizontal scrolling ever
  6. Images scale properly (no overflow)

Wide Screen Constraints

.prose { max-width: 65ch; }
.hero__content { max-width: min(640px, 45vw); }
.container {
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}
.section { padding: clamp(3rem, 6vw, 6rem) 0; }

Use assets/mobile-nav.js for the hamburger menu implementation.

Typography Rules

  1. Dramatic size contrast. Headlines 3-4x body size. clamp(2.5rem, 6vw, 5rem) for hero titles.
  2. Weight variety. Mix 300 and 800 weights. Uniform weight is boring.
  3. One display moment per page. One oversized word, one dramatic headline, one pull quote. Not three.
  4. Left-align body text. Centre only for heroes and short statements. Never centre paragraphs.
  5. Letter spacing on uppercase. Add letter-spacing: 0.05em minimum.

Colour Usage

The 80/20 rule:

  • 80% neutral tones (backgrounds, text, cards)
  • 15% secondary/muted brand tones
  • 5% primary brand colour (CTAs, one accent per viewport)

If primary is on every heading, border, icon — nothing stands out.

Spacing System

Not uniform padding. Sections breathe differently:

/* Tight section (service list, FAQ) */
.section--compact { padding: clamp(2rem, 4vw, 4rem) 0; }

/* Standard section */
.section { padding: clamp(3rem, 6vw, 6rem) 0; }

/* Breathing room (editorial break, testimonial) */
.section--spacious { padding: clamp(4rem, 8vw, 10rem) 0; }

Shadow System

ElementShadow
Cards at rest--shadow-sm
Cards on hover--shadow-md
Dropdowns--shadow-lg
Modals--shadow-xl

Not everything needs shadow. Use sparingly.

Icons

Use Lucide icons via inline SVG:

  • Size: 24px inline, 32-48px for feature blocks
  • Stroke width: 1.5 or 2 (consistent throughout)
  • Colour: currentColor (inherits text colour)
  • Each icon should communicate something specific

Accessibility

Non-negotiable:

  • Semantic HTML: <header>, <nav>, <main>, <section>, <footer>
  • Alt text: Meaningful for content images, empty for decorative
  • Contrast: 4.5:1 minimum (7:1 preferred)
  • Focus styles: Visible on all interactive elements
  • Skip link: First focusable element
  • Form labels: Associated with inputs
  • ARIA: aria-expanded on toggles, aria-label where needed

Performance

  • loading="lazy" on images below the fold
  • loading="eager" on hero image
  • <link rel="preconnect" href="https://fonts.googleapis.com"> in head
  • Keep CSS under 50KB total
  • No JavaScript frameworks — vanilla JS only

Anti-AI Patterns

These patterns signal "AI generated this" — avoid:

  • Hero → trust bar → 3 cards → features → stats → CTA → footer (the skeleton)
  • Every section has identical padding
  • All cards same size in perfect 3-column grid
  • Everything centred
  • Every section: heading + subheading + content (same rhythm)
  • Decorative elements with no purpose
  • "Learn More" as every CTA
  • Inter/Arial/system fonts with no typographic personality

Quality Checklist

Before marking complete:

  • Direction is clear — can describe aesthetic in one phrase
  • Typography makes a statement — not Inter/system
  • Colour is restrained — primary used sparingly
  • No two adjacent sections look the same
  • CTAs are specific — no "Learn More"
  • Mobile works — tested at 375px
  • Dark mode works (only if enabled) — every section checked
  • No hallucinated images — only real file paths
  • Would a designer claim this as their work?

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.98%
按下载量换算876

Claude

29.85%
按下载量换算747

Cursor

18.12%
按下载量换算454

Gemini CLI

9.13%
按下载量换算229

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills