Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add MengTo/Skills --skill add-shader-cursor-trail -a claude-code
Open on GitHub

What 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-trail and wire it to the contact block, keeping the static background as fallback
  • Run verify-cursor-trail.mjs against 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-code

2Manually: put the files in place

~/.claude/skills/add-shader-cursor-trail/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/add-shader-cursor-trail/

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

Similar skills

Everything for Frontend and UI →

From the same set148

create-game-vfx A skill that steers an AI agent through building Three.js visual effects: attacks, impacts, status effects, telegraphs. Useful when an effect has to read in combat and hold the frame rate. CX Codex +1 1,300installs audit-reference-originality Compares a shipped site with its reference corpus and flags overlaps in copy, brands, numbers, images and code. Useful before release. CX Codex +1 1,300installs browser-video-recording Renders 60 fps 4:3 4K browser demo videos from in-app browser screenshots. Useful for Dribbble UI clips and product presentations with macOS cursor styling. CX Codex +1 1,300installs elevenlabs-tts Creates ElevenLabs speech audio from inline text or script files through local voice profiles. Use it for narration, voiceovers, and other generated speech tracks. CX Codex +1 1,300installs shaders-cursor-ripples Adds interactive WebGPU fluid distortion over existing images using the Shaders library. Useful when replacing old CSS spotlight reveals without altering layout. CX Codex +1 1,400installs threejs-towers Builds pagodas, castles and domes from parameters instead of mesh files, then films the structure assembling from the ground up. CX Codex +1 1,200installs build-rigged-game-assets A skill that walks a rigged character or monster from source model to gameplay: skeleton, animation library, sockets, equipment, catalog card. CX Codex +1 1,200installs audit-ai-design-slop Audits interfaces, mockups, and UI code for decorative clutter, generic AI clichés, and usability defects. It helps streamline products through removal instead of speculative redesigns. CX Codex +1 1,200installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor