Communitygithub.com

premium-landing

构建完整的优质着陆页:可根据参考截图/URL复刻,也可根据文字需求设计,支持 HTML、React、Next.js 或 Astro。

premium-landing 是什么?

该技能专为构建高质量落地页而设计,旨在确保页面在320px到1920px的所有宽度下保持一致、精确且无意外元素。它严格区分两种工作模式:参考模式(用户提供截图、PDF或URL)下,要求精确复刻,所有CSS必须基于参考图数值测量;简要模式(用户仅描述业务或受众)下,允许自由创作,但必须遵守内部规则和组件库以保证质量基线。技能支持HTML、React、Next.js、Astro四种技术栈,并提供了详细的设计令牌、组件陷阱(如网格、跑马灯、SVG图标的隐形布局错误)以及自动化验证脚本(`scripts/verify.sh`),确保页面无水平溢出、首屏英雄区完美适配、并尊重减少动效偏好。此外,技能还包含一套完整的收尾流程(如平滑滚动、移动端菜单、社交分享图标、构建说明README等),将“优质”定义为可检查的标准:流动的排版、仅作用于transform和opacity的动效、基于坐标轴的间距、无死区以及移动端独立设计。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/brainzcode/premium-landing/tree/HEAD/plugins/premium-landing/skills/landing-page

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

优质着陆页

一个着陆页只有在通过三项检查后才算完成:与参考图或需求说明匹配、在320到1920的每个宽度下都保持完整、且没有任何元素是偶然出现的。大多数工作都集中在第三项上。

先确定模式

参考模式 — 用户提供了截图、PDF、URL或要求“复刻这个”。准确性是目标,“差不多”就是失败。在编写任何CSS之前,先用数值衡量参考数据。加载 reference-replication。

简要模式 — 用户描述了业务、受众或一种感觉,没有图片。构图由你选择;内部规则和组件库设定了质量底线。

如果两者都存在,参考模式优先覆盖其范围,简要模式填补空缺。如果两者都不明确,请询问——为错误模式构建的着陆页是徒劳的。

只询问能改变构建的内容

不要追问。只有四件事会实际改变输出:

  1. 技术栈 — HTML / React / Next / Astro。从 templates/<stack>/ 脚手架搭建。
  2. 品牌基础 — 名称,以及调色板或“从参考图中提取”。
  3. 地区 — 影响货币、日期格式、英式与美式拼写。询问一次,保持一致性。
  4. 组件 — 仅当参考图或明显的页面类型无法推断出它们时才询问。

其他所有内容都有合理的默认值。使用默认值并说明你的假设。

构建顺序

顺序错误的构建会导致返工,因为英雄区的高度限制了首屏以上所有内容,而设计令牌限制了每个组件。

  1. 令牌 — 背景、文字、线条、强调色、圆角、缓动曲线、一套流畅的字体比例体系。references/design-system.md。
  2. 英雄区 — 每次构建中修改最频繁的元素。100svh,使用 vh 单位调整节奏。references/house-rules.md。
  3. 组件,按参考图顺序排列。references/sections.md。 任何需要照片的插槽:立即获取图片,不要保留灰色占位框 — ../stock-imagery/SKILL.md。
  4. 页脚,然后执行下面的完成序列。
  5. 验证。 不可省略 — 见下文。

陷阱

在编写网格、跑马灯、SVG图标或全出血图片代码之前,请阅读 references/traps.md。其中有六个无声故障:有效的 CSS,无错误,但布局在其他地方出错。第一次遇到这些问题会花费数小时,而有了参考文档只需几分钟。

验证是构建的一部分

尚未在实际宽度下截图检查的着陆页不算完成。运行捆绑的验证工具:

scripts/verify.sh <url> --sweep          # 扫描 320→1920 宽度 + 英雄区适配
scripts/verify.sh <url> --shot 390x844   # 单个视口

它可以处理 macOS 500px 窗口限制(该限制会静默伪造所有移动端截图)。详细信息和手动回退方案:references/verification.md。

三项检查必须通过:

  • 无水平溢出 在 320 到 1920 的任何宽度下。
  • 英雄区适配一屏 在 390×844、414×896 和 1600×900 下,或有意识地增长。
  • 减少动效 仍能渲染每个组件 — 没有元素停留在动画中途。

完成序列

每次实际构建都需执行。这是“完成”的定义,而非锦上添花:

  1. lenis-smooth-scroll
  2. premium-mobile-menu
  3. social-share-favicons
  4. build-credit
  5. 关于页面本身的 README.md — 其组件、令牌、断点、部署步骤 — 而非关于生成它的工具
  6. .gitignore;提交信息不包含AI共同作者行,除非被要求
  7. 部署注意事项(GitHub Pages 在路径以 _ 开头时需要 .nojekyll)

这里“优质”的真正含义

它不是渐变和毛玻璃效果。它是:流畅缩放而非在断点处跳跃的字体;仅作用于 transform 和 opacity 的动效;根据所在坐标轴测量的间距;无死区;以及经过设计而非从桌面版继承而来的移动端布局。以上每一点都是可检查的,正因如此它们才是标准。

参考文档

文件何时阅读
references/house-rules.md始终 — 每次构建都会重复出现的修正项
references/traps.md在编写网格、跑马灯、SVG图标、全出血图片之前
references/design-system.md设置令牌和字体比例体系时
references/sections.md构建英雄区、跑马灯、手风琴、卡片导轨、页脚时
references/verification.md验证时,或截图看起来异常时
../reference-replication/SKILL.md提供了参考图片或URL时
../stock-imagery/SKILL.md页面需要摄影图片但未提供时

Individual skills in this repo

This repo contains 7 individual skills — each has its own dedicated page.

brainzcode/premium-landing

Add a studio or agency build credit to a website footer — "Site by <Studio>" linking to the studio's site. Use when finishing or shipping a site, adding a footer, or when asked for an agency credit, build credit, designed-by line, or attribution. Covers wording, placement opposite the client's copyright, markup for each stack, styling from the host site's tokens, and the sitewide-footer-link SEO footprint when the same credit runs across many client sites.

brainzcode/premium-landing

Add Lenis smooth scrolling to a site correctly — setup, anchor offsets for sticky headers, scroll locking for modals and menus, reduced-motion handling. Use when asked for smooth scroll, Lenis, momentum/eased scrolling, or when smooth scroll broke a sticky header, a modal lock, or anchor links. Includes the sticky-position trap that only appears at non-zero scroll.

brainzcode/premium-landing

Build true Apple-style liquid glass in the browser — real refraction via SVG displacement maps, chromatic dispersion, specular edges. Use when asked for liquid glass, glassmorphism, frosted/glass cards, glass navbars, or when a blur-based "glass" effect looks flat. Includes the performance trap that makes backdrop-filter stutter on scroll and the contrast trap that makes text unreadable on glass.

brainzcode/premium-landing

Build a premium mobile nav — a hamburger button that morphs into a close X, a full-screen overlay panel with staggered link reveal, scroll lock, focus trap, and reduced-motion handling. Use when asked for a mobile menu, hamburger/burger button, nav drawer, off-canvas menu, or when a menu loses scroll position, still scrolls behind on iOS, leaks Tab focus to the page underneath, or the close button stops responding. Includes the z-index trap that swallows the close button and the iOS rubber-band trap.

brainzcode/premium-landing

Rebuild a design accurately from a supplied reference — a screenshot, PDF page, mockup or live URL — by measuring it numerically instead of eyeballing it. Use when asked to replicate, clone, match or rebuild a design "exactly", "1 to 1" or "with no mistakes", or when a build drifts from its reference. Covers extracting the true content box from a padded screenshot, deriving element positions as percentages, solving object-fit framing, and knowing when a reference cannot be matched.

brainzcode/premium-landing

Ship link previews and favicons that actually work - Open Graph and Twitter card tags, a correctly framed 1200x630 share image, and a full favicon set (SVG, ICO, apple-touch, maskable manifest icons). Use when asked for social sharing, OG image, open graph, twitter card, link preview, share image, favicon, app icon, apple touch icon, or web manifest. Also use when a shared link previews blank, shows the wrong image, or a favicon will not appear. Includes the absolute-URL trap that silently blanks every preview and the font trap that breaks SVG favicons on other machines.

brainzcode/premium-landing

Source free, licence-clear photography for a site from Unsplash — searching by mood rather than noun, sizing and cropping for the slot, honouring the API's hotlink and download-tracking requirements, and writing real alt text. Use when a page needs a hero image, section photography, avatars or card art and none was supplied; when placeholder greys need replacing with real imagery; or when asked to find, pick or swap photos for a design.

相关技能