add-shader-cursor-trail — Claude Code skill: WebGPU cursor trail
Installs a WebGPU hero effect: a twinkling white halftone trail that follows the pointer, with chromatic ripples and film grain. Falls back to the static frame.
npx skills add MengTo/Skills --skill add-shader-cursor-trail -a claude-codeWhat add-shader-cursor-trail does
The effect ships as progressive enhancement. A full-bleed shader layer sits behind the section content, while the image, links and controls stay untouched above it. Under the hood there are six shader nodes in a set order, two invisible drivers and paired IDs. You may adjust opacity and blend mode; the graph and its ID wiring stay as given.
The skill expects the shaders package, installed through whatever package manager the project already uses, imported from a framework subpath: shaders/react, shaders/vue, shaders/svelte or shaders/solid. Read references/implementation.md before writing code. React and Next.js users get files in assets/react/, where a small capability gate loads apart from the heavy shader module, so visitors who cannot run it never pull the bundle.
Loading is gated on WebGPU, a fine pointer with hover, normal motion and transparency settings, a visible document, window focus and the section being in view. Once the section scrolls away the layer unmounts and GPU work stops. Without WebGPU the original frame stays whole. A checker script, node scripts/verify-cursor-trail.mjs plus three file paths, covers React builds. The skill tells the agent not to claim visual results in a browser unless it actually ran them.
What it helps with
- add a halftone pointer trail to a hero section
- make a contact-page background respond to the mouse
- ship a WebGPU effect without breaking section semantics
- keep a static fallback for browsers without WebGPU
- screen out ineligible visitors before the shader bundle loads
Example prompts for the agent
- Add the shader cursor trail to my React hero section
- Install
add-shader-cursor-trailand wire it to the contact block, keeping the static background as fallback - Run
verify-cursor-trail.mjsagainst my cursor trail implementation
How to install add-shader-cursor-trail
1Skills CLI (Vercel)
npx skills add MengTo/Skills --skill add-shader-cursor-trail -a claude-code2Manually: put the files in place
~/.claude/skills/add-shader-cursor-trail/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/add-shader-cursor-trail/
1Skills CLI (Vercel)
npx skills add MengTo/Skills --skill add-shader-cursor-trail -a codex2Manually: put the files in place
.agents/skills/add-shader-cursor-trail/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add MengTo/Skills --skill add-shader-cursor-trail -a cursor2Manually: put the files in place
.cursor/skills/add-shader-cursor-trail/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install MengTo/Skills add-shader-cursor-trail2Manually: put the files in place
.github/skills/add-shader-cursor-trail/SKILL.md1Skills CLI (Vercel)
npx skills add MengTo/Skills --skill add-shader-cursor-trail -a gemini-cli2Platform CLI
gemini skills install https://github.com/MengTo/Skills --path agent-skills/web-design/add-shader-cursor-trailManually: put the files in place
.devin/skills/add-shader-cursor-trail/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add MengTo/Skills --skill add-shader-cursor-trail -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about add-shader-cursor-trail
How do I install add-shader-cursor-trail in Claude Code?
Run npx skills add MengTo/Skills --skill add-shader-cursor-trail -a claude-code. The skill file lands at ~/.claude/skills/add-shader-cursor-trail/SKILL.md.
What does add-shader-cursor-trail do?
It builds a WebGPU shader layer for a site section: pointer trail, halftone mask, chromatic ripples and grain. Section content stays in place, and weaker devices get the static frame.
Which browsers and devices get the effect?
Only those with WebGPU, a fine hover pointer, and default motion and transparency settings. Touch screens, reduced motion and forced colors hide the layer.
Source text
SKILL.md · MIT
--- name: add-shader-cursor-trail description: "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." --- # 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 1. 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. 2. Install `shaders` with the existing package manager. Import from the matching framework subpath: `shaders/react`, `shaders/vue`, `shaders/svelte`, or `shaders/solid`. 3. Read [references/implementation.md](references/implementation.md) before implementation. Keep the six shader nodes, their order, both invisible drivers, and both ID linkages exact. 4. 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. 5. Place one full-bleed, `aria-hidden="true"` shader layer behind the section content. Keep links and controls above it. Do not set `pointer-events: none` on the canvas unless cursor tracking is verified to use global events. 6. 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. 7. 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. 8. 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: ```bash 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.
© MengTo · MIT · MengTo/Skills