Community编程与开发github.com

动势现代网页

用原生滚动驱动动效、三层 OKLCH 配色和现行浏览器能力做落地页与产品站。按题材重做版式,而不是给示例页换皮。

动势现代网页 是什么?

面向高张力落地页的建站技能。先检索匹配的原生 Web 能力,再建立原始、语义、组件三层 OKLCH 色阶,并把滚动与状态动效放进减弱动效保护里。示例页只解释机制,不能整页套用。

兼容平台~Claude Code~Codex CLI~Cursor✓Gemini CLI
Part ofReact
npx skills add https://github.com/wangsiyi7/kinetic-modern-web/tree/HEAD

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

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

文档

Kinetic Modern Web (Modern Motion UI Design System v1.3)

Three-tier coupling of Google Chrome Modern Web Guidance 1.0 native browser capabilities, Anti-Boring Visual & Motion System, and an automated code-level review pipeline, ensuring the generated web interface meets engineering standards in platform nativity, visual quality, accessibility, and maintainability.

Use Cases

  • Building standalone HTML/CSS/JS pages, product landing pages, dashboards, or web applications (React, Vue, Svelte, Next/Vite, etc.)
  • Creating educational science demos, interactive courseware, conceptual/data visualizations, step-by-step algorithm/engineering principle walkthroughs, and interactive experiment benches
  • Designing asymmetric Bento Grid layouts, sticky scrolling narrative stages (Scrollytelling), interactive SVG schematics, or 3D Three.js/WebGL spatial interfaces
  • Refactoring legacy front-end code or rigid template styles into native implementations compliant with modern Baseline standards
  • Scope boundary: If you only need to render lightweight interactive widgets within a conversation, prefer generative_ui first; for specialized scientific 3D sidebars (e.g., biomolecular structure viewer), use the corresponding sidebar tool first.

Execution Workflow (Four-Stage Review Loop)

Step 1: Read Visual Preferences and Formulate an "Anti-Template Visual Brief"

First, read aesthetic-preferences.yaml and anti-boring-design-system.md. Before coding, clarify the current theme's surface polarity, hue tendency, spatial topology, and playful interaction mechanisms. Flexibly select or recombine based on content context:

  • Surface Themes:
    • obsidian_precision (Obsidian Precision Dark): Cool-tone deep obsidian ink base (oklch(0.145 0.016 258)), 1px mirror-like hairline borders, ambient radial glow, and proportional width alignment metrics.
    • warm_editorial_atelier (Warm Paper Editorial Atelier): Warm white paper texture (oklch(0.968 0.011 84)), deep charcoal ink text (oklch(0.195 0.016 260)), serif/sans-serif typographic contrast, and generous whitespace.
  • Layout Archetypes:
    • asymmetric_bento (12-column asymmetric Bento Grid), sticky_scrollytelling (fixed 100dvh interactive stage + scroll sections), editorial_index_rail (sticky 220px numbered index rail + 66ch body text).

Step 2: Retrieve Google Modern Web Guidance 1.0

Before writing components, animations, forms, or client-side browser APIs, first search the official guide:

  1. Windows (PowerShell wrapper script, auto-sets DISABLE_TELEMETRY=1 and uses local shared cache):
    powershell -ExecutionPolicy Bypass -File "C:\Users\35398\.gemini\config\skills\kinetic-modern-web\scripts\mwg.ps1" search "<2-5 word generic capability>"
    powershell -ExecutionPolicy Bypass -File "C:\Users\35398\.gemini\config\skills\kinetic-modern-web\scripts\mwg.ps1" retrieve "<guide-id-1,guide-id-2>"
    
  2. macOS / Linux / WSL:
    ./scripts/mwg.sh search "<2-5 word generic capability>"
    ./scripts/mwg.sh retrieve "<guide-id-1,guide-id-2>"
    
    Search term rules: Upstream offline vector search only recognizes English capability keywords, so use 2–5 generic English words describing the underlying capability (e.g., "light dismiss dialog", "scroll driven animation", "auto growing textarea", "anchor positioned popover"); do not include framework names (React/Vue/Tailwind). When doing a comprehensive modernization scan of an old project, use legacy-scan <path> --json and adhere to keepWhen/dropWhen guardrails.
  3. Offline / Degrade Fallback: If Node.js or local cache is unavailable, read directly from modern-web-platform-reference.md and legacy-to-modern-matrix.md.

Step 3: Build Based on Three-Tier OKLCH Token Architecture and Framework-Lossless Adaptation

Refer to kinetic-tokens.css to retain the CSS cascade layer structure (@layer tokens, base, layout, components, motion;), and read starter-bento-demo.html to understand its underlying mechanisms—but starter-bento-demo.html is for mechanism reference only; do not copy the entire page or skin it wholesale; you must flexibly reconstruct layout, colors, and interaction structure based on the current theme context:

  • Unidirectional Token Flow: --p-* (primitive) -> --s-* (semantic role) -> --c-* (component override), build at least 3 OKLCH surface lightness steps; never output raw #ffffff/#000000.
  • Fluid Typography and Contrast: clamp() fluid font sizes, title text-wrap: balance, body text-wrap: pretty (<= 66ch), numbers tabular-nums, meet contrast requirements: body >= 4.5:1, large titles/controls >= 3:1.
  • Framework-Lossless Adaptation (React / Vue / SSR):
    • For new native attributes (closedby, popover, commandfor) in TypeScript/JSX, use type passthrough ({...({ closedby: 'any' } as any)}), never regress to old div hacks;
    • In SSR environments, guard window/HTMLElement; keep :root, @starting-style, and ::details-content in global non-scoped styles; for component multiple instances, use unique IDs (e.g., useId()) to isolate anchor-name and view-transition-name.

Step 4: Orchestrate Native Animations and Interactive Visual Media

  • Scroll-Driven Animations: Place animation-timeline: scroll()/view() inside @supports and @media (prefers-reduced-motion: no-preference) protection.
  • Smooth State Transitions: Wrap tabs, filters, and theme toggles inside document.startViewTransition?.().
  • Declarative Overlays and Intrinsic Sizing: Use <dialog closedby="any">, popover="auto", CSS Anchor Positioning, @starting-style + transition-behavior: allow-discrete, and interpolate-size: allow-keywords / details::details-content.
  • Playful Interactive Diagrams: For educational and visualization tasks, prioritize providing adjustable parameter sliders, step-by-step state evolutions, or interactive SVG/Canvas/Three.js stages; zero Emoji in interface chrome.

Step 5: Code-Level Automatic Diagnosis, Visual Acceptance, and Specification Disclosure

Before delivery, you must execute the review gates defined in review-and-evolution-standard.md:

  1. Run the Code-Level Diagnostic Script (automatically loads 11 built-in core rules + dynamic evolution rules from evolution/rules-registry.json; supports --record to accumulate anonymous hit ledger and --with-mwg to chain the official legacy-scan):
    node "C:\Users\35398\.gemini\config\skills\kinetic-modern-web\scripts\audit-ui.mjs" "<target file or directory>"
    
    For deliberately retained compatibility fallback code, use /* kmw-keep: reason */ comments to exempt.
  2. Self-Evolution Deposition (when new anti-patterns are discovered): If this round fixes a new cross-browser/accessibility/animation anti-pattern, directly solidify it as a new rule using evolve-skill.mjs and automatically run a regression test:
    node "C:\Users\35398\.gemini\config\skills\kinetic-modern-web\scripts\evolve-skill.mjs" promote --id KMW-XXX-001 --severity warn --category "Modern Platform" --scope css --pattern "<regex>" --message "<issue>" --fix "<fix>"
    
  3. Browser Visual Acceptance: For standalone HTML pages or local dev servers, use browser sub-agent to actually test layout, theme switching, and interaction states.
  4. Specification Citation Disclosure: If modern-web-guidance search results were applied in this round, briefly list at the end of the reply the actually used <guide-id>s and the pitfalls avoided (never fabricate IDs from memory).

相关技能