New to Claude Skills? Learn how to install them →

mengto on GitHub

Shader Cursor Trail

Free

Enhance your web projects with a dynamic cursor effect.

by mengto4.6k stars on mengto/skills
3 views
Updated Aug 9, 2026
Get this skill

Free · Opens the source repo

What Shader Cursor Trail does

The Shader Cursor Trail skill allows developers to implement a visually appealing mouse effect using WebGPU. This effect is characterized by a white twinkling halftone cursor trail, which is driven by ChromaFlow and masked through a DotGrid. The skill is designed to enhance user interaction on web pages without compromising the underlying content or accessibility. It provides a reusable cursor-following shader layer that can be integrated into various frameworks, including React, Next.js, Vue, Svelte, and Solid.

To utilize this skill, developers should follow a structured workflow that emphasizes progressive enhancement. The implementation process includes inspecting the existing framework and rendering mode, installing the necessary shaders, and adapting provided assets. The skill ensures that the visual effects do not interfere with the semantic content of the host section, maintaining usability for all users, including those with reduced motion preferences or accessibility needs.

The skill also includes verification scripts to ensure that the implementation meets performance and accessibility standards. By running these scripts, developers can confirm that the shader operates correctly across different scenarios, including when JavaScript is unavailable or when users have specific accessibility settings enabled. This thorough validation process helps maintain a high-quality user experience while leveraging advanced graphical effects.

Overall, this skill is ideal for developers looking to add a modern touch to their web projects through interactive visual effects. It is particularly suited for those who prioritize both aesthetics and functionality, ensuring that the user experience remains seamless and engaging.

When to use it

Use this skill when you want to implement a dynamic cursor trail effect in web projects, especially in interactive sections.

When not to use it

Avoid this skill if your project does not support WebGPU or if you require a simpler cursor effect without advanced visual enhancements.

What you can build with it

Adding Interactive Effects to a Landing Page

Implement the shader cursor trail on a landing page to create an engaging user experience that captures attention.

Enhancing User Engagement in a Web App

Use the cursor trail effect in interactive sections of a web application to provide visual feedback and improve user interaction.

Creating a Unique Portfolio Site

Incorporate the shader effect into a personal portfolio site to showcase projects with a modern and dynamic visual style.

How to install Shader Cursor Trail

View source

1. Install with the skills CLI

npx skills add mengto/skills/add-shader-cursor-trail --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by mengto

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 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:

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.

Frequently asked questions about Shader Cursor Trail

Similar skills