add-shader-cursor-trail
What it does
This skill guides an AI agent in adding a shader effect to a web page, where the cursor leaves a soft dotted trail. It is for designers and developers who want a striking interactive hero with a plain fallback for other visitors.
When to use it
- ✓When you want a dotted or halftone trail that follows the cursor on a hero section.
- ✓When a page needs a WebGPU shader effect that stays off on phones and for reduced-motion users.
- ✓When you want the effect added without changing the section's text or images.
Skill link
https://github.com/MengTo/Skills/blob/main/agent-skills/web-design/add-shader-cursor-trail/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Add a halftone cursor trail effect to my hero section, with a still image for phones.”
5 new skills a week. 1 minute to read.
How it works
The agent installs the shader package and places a full-width effect layer behind the page content. It only loads the effect on capable desktop browsers, and pauses it when the section is off screen.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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.
FAQ
What do phone visitors see?
The skill keeps the original static image or first frame for touch devices and for visitors who prefer less motion.
Will it slow the page down?
The skill loads the shader only when needed and stops it when the section leaves the screen.
Does it work in every browser?
No. It depends on WebGPU support, so the skill includes a fallback for browsers without it.
Details
Original description by the author
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
Popularity
- GitHub stars
- 7.2k
- Ranking position
- #13393
- License
- MIT
- Updated
- 11/1/2026
Comments
- …
More skills from this repository
3d-cloth-material
7.2kHelps your agent build realistic woven fabric in Three.js, with thread weave, soft sheen, natural folds, hems and seams.
3d-falling-leaves
7.2kHelps your agent add realistic falling leaves to a 3D scene, with leaves that tumble, drift with the wind and recycle as the camera moves.
3d-four-seasons
7.2kHelps your agent add spring, summer, fall and winter looks to a 3D scene, changing foliage, light, sky and snow without rebuilding it.
3d-high-poly-models
7.2kHelps your agent build detailed 3D models with smooth shapes and believable edges, then prepare lighter versions that run well on the web.
Similar skills
angular-developer
280kHelps your agent create Angular code and give project structure advice. Useful for starting new projects, creating code parts, or improving performance and accessibility.
frontend-a11y
280kHelps your agent make web interfaces accessible to everyone. It ensures websites and apps work well with screen readers and keyboard navigation.
frontend-patterns
280kHas your agent apply modern patterns in frontend development. It optimizes performance, manages state, and follows best practices in React and Next.js.