add-shader-cursor-trail
Skill này làm gì
Skill này hướng dẫn agent thêm hiệu ứng shader vào trang web, nơi con trỏ để lại một vệt chấm mềm. Nó dành cho nhà thiết kế và lập trình viên muốn một hero tương tác nổi bật, có phương án đơn giản cho người xem khác.
Khi nào nên dùng
- ✓Khi bạn muốn một vệt chấm hoặc halftone đi theo con trỏ trên phần hero.
- ✓Khi một trang cần hiệu ứng shader WebGPU nhưng phải tắt trên điện thoại và với người dùng muốn giảm chuyển động.
- ✓Khi bạn muốn thêm hiệu ứng mà không đổi chữ hay hình ảnh của phần đó.
Liên kết skill
https://github.com/MengTo/Skills/blob/main/agent-skills/web-design/add-shader-cursor-trail/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Thêm hiệu ứng vệt halftone theo con trỏ vào phần hero của tôi, với một ảnh tĩnh cho điện thoại.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent cài gói shader và đặt một lớp hiệu ứng toàn chiều rộng phía sau nội dung trang. Hiệu ứng chỉ được tải trên trình duyệt máy tính đủ khả năng, và được tạm dừng khi phần đó nằm ngoài màn hình.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Add Shader Cursor Trail
Implement the exact trail as progressive enhancement. Preserve the host section's semantic content, imagery, controls, and static first frame.
Workflow
- Inspect the framework, rendering mode, existing motion stack, layer order, reduced-motion rules, and package manager. Do not add another smooth-scroll engine or replace the section's content.
- Install
shaderswith the existing package manager. Import from the matching framework subpath:shaders/react,shaders/vue,shaders/svelte, orshaders/solid. - Read references/implementation.md before implementation. Keep the six shader nodes, their order, both invisible drivers, and both ID linkages exact.
- For React or Next.js, copy and adapt the files in
assets/react/. Keep the lightweight capability gate separate from the heavy shader module so ineligible visitors do not request the shader bundle. - Place one full-bleed,
aria-hidden="true"shader layer behind the section content. Keep links and controls above it. Do not setpointer-events: noneon the canvas unless cursor tracking is verified to use global events. - Gate loading on WebGPU, a fine hover pointer, normal motion/transparency preferences, document visibility, window focus, and section intersection. Unmount when the section leaves view so GPU work stops.
- Keep the original image or dark background as the complete fallback. Hide the layer for reduced motion, reduced transparency, coarse/no-hover pointers, and forced colors.
- Adapt only presentation variables such as opacity and blend mode. Do not change the graph to decorative noise, add WebGL/Three.js, or hotlink Shaders preview assets.
Validate
Run the project's lint, typecheck/tests, and production build. For React implementations, also run:
node /path/to/add-shader-cursor-trail/scripts/verify-cursor-trail.mjs \
path/to/CursorTrailShader.tsx \
path/to/CursorTrailGate.tsx \
path/to/cursor-trail.css
Verify the static section with JavaScript unavailable, keyboard access to content above the layer, touch behavior, reduced motion, unsupported WebGPU, focus/visibility cleanup, and absence of runtime requests to previews.shaders.com or data.shaders.com.
Report the chosen blend mode, fallback, capability gates, production-build result, and any browser limitation. Do not claim WebGPU visual verification unless it was actually performed in a compatible browser.
Câu hỏi thường gặp
Người xem trên điện thoại thấy gì?
Skill giữ ảnh tĩnh hoặc khung hình đầu cho thiết bị cảm ứng và cho người dùng muốn giảm chuyển động.
Nó có làm trang chậm không?
Skill chỉ tải shader khi cần và dừng khi phần đó rời khỏi màn hình.
Có hoạt động trên mọi trình duyệt không?
Không. Nó phụ thuộc vào hỗ trợ WebGPU, nên skill có phương án dự phòng cho trình duyệt không hỗ trợ.
Chi tiết
Mô tả gốc của tác giả
Add the Shaders WebGPU mouse effect used for the Tidal Commons hero: a white twinkling halftone cursor trail driven by ChromaFlow, masked through a DotGrid, finished with chromatic ripples and film grain, and protected by static, touch, accessibility, SSR, and performance fallbacks. Use when a user asks for this shader mouse effect, a halftone cursor trail, an interactive WebGPU hero/contact background, or a reusable cursor-following shader layer in React, Next.js, Vue, Svelte, Solid, or plain web projects.
repo: MengTo/Skills
Độ phổ biến
- Sao GitHub
- 7.2k
- Vị trí xếp hạng
- #13393
- Giấy phép
- MIT
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
3d-cloth-material
7.2kGiúp agent của bạn tạo vải dệt 3D trông thật trong Three.js, với sợi dệt, ánh bóng nhẹ, nếp gấp tự nhiên, viền gấu và đường may.
3d-falling-leaves
7.2kGiúp agent của bạn thêm lá rơi chân thực vào cảnh 3D, với lá xoay tròn, trôi theo gió và được tái sử dụng khi máy quay di chuyển.
3d-four-seasons
7.2kGiúp agent của bạn thêm diện mạo xuân, hạ, thu, đông vào cảnh 3D, thay đổi cây cối, ánh sáng, bầu trời và tuyết mà không cần dựng lại cảnh.
3d-high-poly-models
7.2kGiúp agent của bạn dựng mô hình 3D chi tiết với hình dạng mượt và cạnh trông thật, rồi tạo các phiên bản nhẹ hơn chạy tốt trên web.
Skill tương tự
angular-developer
280kGiúp agent của bạn viết code Angular và tư vấn cấu trúc dự án, hữu ích khi bắt đầu dự án mới hoặc cải thiện hiệu suất.
frontend-a11y
280kGiúp agent của bạn làm cho giao diện web dễ tiếp cận với mọi người. Đảm bảo website và ứng dụng hoạt động tốt với trình đọc màn hình và điều hướng bằng bàn phím.
frontend-patterns
280kGiúp agent của bạn áp dụng các mẫu hiện đại trong phát triển frontend. Tối ưu hiệu năng, quản lý trạng thái và tuân theo thực hành tốt nhất với React và Next.js.