AGENT SKILL
web-interaction-prototyping
Use when building website UI. Preserve layout.
- License 许可
- MIT
- 最近更新
- 2026-10-26
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- web-interaction-prototyping
- author
- Hermes Agent
- license
- MIT
- version
- 1.0.0
- metadata
- { "hermes": { "tags": [ "web", "frontend", "ui", "prototype", "accessibility" ] }, "vallenatrix": { "tags": [ "website", "interactive UI", "responsive" ], "triggers": [ "website", "interactive website", "web app", "landing page", "website UI", "frontend", "modal", "menu", "form" ] } }
- platforms
- [ "linux", "macos", "windows" ]
- description
- Use when building website UI. Preserve layout.
02 资源文件 1
- 参考文档references/demo-auth.md1.1 KB
03 SKILL.md 正文
Web Interaction Prototyping
When to Use
Use for changes to interactive website elements, menus, forms, modals, and local demo flows in an existing project.
Workflow
- Read existing markup, stylesheets, entry-point scripts, and target component completely before editing. Identify controls, layout slots, assets, and project-specific specs; extend them rather than creating competing UI. For a cohesive site polish request, inspect page hierarchy and all styles/scripts, reconcile existing brand/content against specs, then finish missing sections and navigation targets without inventing a new app stack. Never overwrite a file from a stale or partial transcript: reread the full current file or use a targeted patch; after a blocked write, inspect disk and retry safely.
- Translate request into visible states and actions: initial state, open/close, submit, feedback, keyboard operation, responsive behavior. Treat concrete placement cues (e.g. beside an existing nav link) as binding layout requirements.
- Keep implementation within project's existing stack and naming conventions. Use smallest cohesive markup, style, and JS changes; add a module only when it has useful independent behavior. For append-only galleries after a scroll-driven canvas sequence, first identify exact DOM ownership of the sequence's height and progress formula. Keep gallery outside the sequence's scroll-height container when progress maps scroll position to frame index; otherwise gallery height changes the mapping and can make it appear during the wrong sequence. Derive frame progress from the explicit sequence travel distance, clamp at final frame, and let subsequent page content follow naturally. Preserve photo slots as explicit user-replaceable asset paths, explain exact folder and filenames, and create that directory when practical. For manually navigated photo galleries, settle presentation before interaction code. When users ask for readable/clean CSS, check whether source is minified; format the existing stylesheet with an installed parser/formatter (PostCSS is sufficient for AST-preserving pretty-printing), then reparse and compare AST signatures before accepting the formatting-only edit. Avoid adding new dependencies for formatting when a parser is already installed; keep CSS values, selector order, duplicate overrides, and at-rule nesting unchanged. Treat the user's latest composition wording literally: “berderet” means all photos in a side-by-side strip; a request for one-at-a-time means one sharp active image with neighboring previews. Do not preserve a previous carousel interpretation after the user changes it. If user wants portrait 9:16, enforce card width as exactly 9/16 of its explicit height or set a fixed flex-basis width and derive height using
aspect-ratio:9/16; do not rely onaspect-ratioalone on flex items with auto sizing, because intrinsic flex sizing can leave cards wider than intended. Bound dimensions separately for desktop/mobile and inspect screenshot/computed boxes after each size revision. If user names a visual reference such as a console carousel, extract only traits compatible with the requested composition (e.g. compact rounded cards, restrained glow, inactive photos dimmed, selected photo lit); don't turn that reference into an excuse to change the layout or add decorative effects. Before changing size or composition, inspect and edit the existing gallery rules rather than appending competing overrides; calculate card/track widths at desktop and mobile so they stay aligned. Use one active index as source of truth for selection classes; wire clicks, drag/swipe, keyboard arrows, and previous/next buttons to it when requested. Keep every displayed photo visible and give inactive photos a deliberate dim state when user wants an item-browsing strip; selected item becomes bright. Place controls flush with the photo's left/right edges, inside the photo's visual bounds; avoid separate wide control rows or layout columns that create conspicuous empty gutters. Derive carousel columns from the card's actual responsive width and make the image track fill only its middle column; keep card width, track width, and grid middle track in sync at desktop and mobile, or the mismatch creates blank space that reads as a broken layout. Do not add autoplay or perpetual translation when user requests manual movement, since oscillation reads as wobble rather than navigation. Inspect the rendered layout at desktop and mobile after each structural change; valid CSS and syntax checks cannot establish intended size/composition. Treat size and placement feedback separately: if user asks only to lower cards, preserve current width and change vertical placement only; if user calls them too small, increase width modestly and keep portrait ratio. Make selected-card enlargement an explicit state change, not a global size reduction. Remove arrow controls and swipe/drag handlers when user asks for click-only selection; retain direct click handlers on each photo. Keep horizontal overflow navigable if all photo cards cannot fit, but don't add visible arrows against that request. When a user flags a visual gap, inspect box sizing, intrinsic widths, grid tracks, margins, and transforms before making another speculative CSS override; verify computed bounds in browser and report honestly if visual verification was unavailable. Build overlap with deliberate stacking order. Never point to nonexistent demo images as if gallery were populated; label/report placeholders clearly. Keep navigation targets linked only to real content sections. For sequential loading-screen word choreography, center one fixed-size overflow-hidden slot and animate each word through identical enter/hold/exit keyframes with staggered delays; keep the loading progress separate so it cannot shift the word's center. When loading completes, don't let the outgoing word animation restart or overlap the page transition. Before editing multiple files, inspect each target completely and record exact component boundaries; then make targeted edits without overwriting unrelated content. For polished motion, choreograph explicit sequential states with matched CSS/JS timing. Measure computed styles and bounding boxes before and after each panel swap; legal CSS can still produce hidden native validation bubbles, nested field errors, zero-size animation targets, overflow clipping, or large intrinsic-height jumps. Make error markup siblings of field wrappers when sibling selectors control visibility. Give stage panels a stable measured height before launching absolute-position effects, and build animation coordinates from live DOMRects. Cancel timers and Web Animations on close/reset/back. When editing complex markup, prefer a short script with multiline literals over deeply nested shell quoting, which can abort an entire edit batch. - For demo-only auth or signup screens, label interface as demo and state plainly that submitted data is not sent or persisted. Prevent form's default network submission, avoid localStorage/sessionStorage/cookies, and clear sensitive fields after simulated result. Never imply Gmail/provider authentication is real unless it uses official OAuth.
- Wire trigger and controls to explicit state; support close button, backdrop, Escape, focus management, and accessible labels/expanded states. For scroll-driven overlays, gate pointer events and keyboard tab stops from the same visibility state so hidden controls cannot be activated or focused; close responsive menus on Escape, outside click, link selection, and desktop resize. For multi-view dialogs, keep one view as source of truth, cancel delayed callbacks and Web Animations on close/reset/back, and restore focus after close. If a page has custom scroll handlers, guard them while modal is open as well as locking body overflow; a CSS scroll lock does not stop JS wheel/scroll logic. Keep overlay copy and navigation free of blur unless user explicitly asks for blur; fades and position transitions suffice and preserve legibility. Check both JS-applied
filterand CSSbackdrop-filter/decorative borders when user reports blur or lines; they are independent sources and must be removed separately when asked. For effects that overlay copy, fade or hide underlying text before effects move through its bounds, and visually inspect timed frames to catch collisions. Apply decorative border/blur only to the exact requested subcomponent, never its shared layout parent; sibling navigation must remain visually independent. Use a translucent blurred surface with deliberate corner geometry only when requested; preserve readable contrast and avoid clipping focus rings or shadows. For nav menus, use existing menu trigger and place full dropdown adjacent to it, not as unrelated fixed edge widget. - Verify JS syntax and inspect rendered behavior/state in a browser where available. Reload after file edits; verify all linked section IDs exist, asset counts match configuration, initial hidden/off state, trigger toggle, responsive behavior, and runtime paths. For a static site, serve over local HTTP and request HTML, CSS, JS, and representative assets; syntax checks and HTTP 200 do not prove visual layout, so report browser inspection as unverified when unavailable. For a Vite app with a local API, start the repository's combined dev script once, confirm both frontend and API ready URLs in process output, and reuse an already-running instance instead of launching duplicates; a frontend port can be ready while API startup fails with
EADDRINUSE. Probe DOM state and rendered geometry rather than trusting event dispatch or code inspection alone. For local AI-generation flows, stub the provider with deterministic in-page SSE fixtures instead of spending live tokens; drive representative flow through final output at 360px and desktop, check scrollWidth against viewport and accessible labels, then verify visible focus after keyboard navigation. Remove only fixture data created during the check. Report any verification not completed. For SVG routes, inspect computed size and line bounding boxes: a zero-size SVG viewport can leave paths invisible even when child elements and CSS exist. Give SVG viewport nonzero dimensions while preserving intended coordinate origin, then verify rendered paths visually. For content changes, search the full page plus reusable section fragments and update only intended sources; counter code may append a default suffix when the explicit suffix is empty, so use nullish rather than truthy fallback.
Rules
- Preserve existing page hierarchy and user-prepared placeholders; don't replace or relocate them without clear instruction.
- Don't add a single-purpose floating widget when user refers to existing
=/hamburger control; attach full menu to that control and include requested navigation items. - Prototype copy should be concise, coherent with surrounding UI, and make simulation boundaries obvious. Remove signup-only headings and helper copy when transitioning to OTP; show a short
DEMO VERIFICATIONlabel and OTP-specific instruction, not duplicate onboarding copy. - Keep auth prototypes visually restrained unless user requests a specific visual treatment. If requested, a translucent backdrop-blurred panel and chamfered corners are valid; preserve readable contrast, visible focus, and the silhouette shadow (clip-path may clip box-shadow, so use a tested drop-shadow). Check
scrollHeightagainstclientHeightat target viewport sizes to catch clipped forms. - Add a login view only when its link opens a distinct local login form with a return-to-signup action. Verify signup↔login transitions and visual fit in browser; valid syntax and event wiring do not prove layout quality.
- For compact OTP rows, prefer CSS grid (
repeat(4, fixed-size), centered gap) with inputs in normal grid flow; do not absolutely stack inputs at one origin. Keep input values as the state source: overwrite typed digit, clear trailing boxes on short paste, synchronize filled classes after programmatic changes/reset, route Backspace and navigation keys explicitly, and guard auto-submit against duplicate completion. Verify renderedgetBoundingClientRect()values show four non-overlapping cells, since valid markup and computed styles can still hide overlap. - For OTP celebration ordered split → spin → merge as
+→ burst → check, start with four visible green digits, animate 1/2/3/4 independently toward up/right/down/left, rotate, merge center, then show a distinct+stage before dispersing particles and revealing check/text. Keep selectors/states ordered so later duplicate CSS declarations don't override choreography. Verify actual animation names and timing in browser; check the layout before testing motion. - Keep user-facing replies concise and in user's language; report changes and verified checks without process narration.
References
- See
references/demo-auth.mdfor safe signup/login simulation behavior and review checklist.
04 同仓库更多 Skills
blocked-page-recovery
Use when a fetch fails: 403/429, paywall, WAF, bot wall.
★ 1
unreal-world-builder
开放世界与环境专家——精通 UE5 World Partition、Landscape、程序化植被、HLOD 和大规模关卡流式加载,打造无缝开放世界体验
★ 1
unreal-technical-artist
Unreal Engine 视觉管线专家——精通材质编辑器、Niagara 特效、程序化内容生成和 UE5 项目的美术到引擎管线
★ 1
unreal-systems-engineer
性能与混合架构专家——精通 C++/Blueprint 边界、Nanite 几何体、Lumen GI 和 Gameplay Ability System,面向 AAA 级 Unreal Engine 项目
★ 1
unreal-multiplayer-architect
Unreal Engine 网络专家——精通 Actor 复制、GameMode/GameState 架构、服务端权威玩法、网络预测和 UE5 专用服务器配置
★ 1
unity-shader-graph-artist
视觉效果与材质专家——精通 Unity Shader Graph、HLSL、URP/HDRP 渲染管线和自定义渲染 Pass,打造实时视觉效果
★ 1