Cursor reveal hero
Skill sergekostenchuk/mouse-trail-masking-reveal/skills/cursor-reveal-hero
Build, repair, tune, and validate interactive cursor-trail mask reveal hero effects in frontend projects. Use when implementing canvas-based base/reveal compositing, soft radial cursor masks, fading cursor trails, reveal debug controls, full-screen hero scenes without site text, or browser smoke checks for cursor reveal, hover reveal, before/after reveal, and mask compositing effects.From its SKILL.md
npx -y skills add sergekostenchuk/mouse-trail-masking-reveal --skill cursor-reveal-heroAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
- runs commandsInstructs the agent to run 2 commands, including `scripts/smoke-check-reveal.mjs` and 1 more.
SKILL.md
4.9 KB, 974 tokens by cl100k_base, as published. Nobody here has run it
Cursor Reveal Hero
Use this skill to create or fix a soft cursor-trail reveal effect where a base image is always visible and a reveal image appears only through a fading mask.
Core formula:
final = baseImage + revealImage * softCursorTrailMask
Modes
build: create the effect from scratch in an existing app or from the vanilla template.repair: diagnose broken image loading, mask compositing, pointer handling, sliders, fade, resize, or cache behavior.tune: adjust radius, feather, fade, strength, opacity, and momentum for the intended feel.validate: run browser/canvas checks and inspect screenshots.
Workflow
- If the user is unsure whether the two image layers match, use
$image-layer-alignment-validatorfirst. - Identify the project stack. Prefer the existing framework and asset pipeline.
- For a vanilla implementation, copy
assets/vanilla-template/and replace the image paths. - Keep the page focused on the actual reveal surface. Do not add marketing copy, hero text, or unrelated content unless requested.
- Implement the canvas architecture from
references/canvas-compositing.md. - Add direct controls for tuning: radius, feather, fade, strength, opacity, and momentum.
- Expose
window.revealSettingsand a clear-mask function in development builds when useful. - Run
scripts/smoke-check-reveal.mjsagainst the local URL when a browser target is available. - Report exact changed files, current tuning values, and validation outcome.
Implementation Rules
- Use one visible canvas and offscreen canvases for mask and reveal layers.
- Render at device-pixel-ratio scale while keeping CSS size stable.
- Use pointer events and handle mouse, touch, and pen input.
- For mobile reveal surfaces, set
touch-action: noneon the scene/canvas, start drawing onpointerdown, callsetPointerCapturedefensively, and provide atouchstart/touchmovefallback for environments without Pointer Events. - Use a soft radial gradient, not a hard hover circle.
- Fade old mask content with
destination-out. - Apply the mask to the reveal layer with
destination-in. - Draw the base layer every frame before drawing the masked reveal layer.
- Clear the accumulated mask when control values change so old trails do not confuse tuning.
- Bump cache-buster query strings or hard refresh when static files are cached.
Common Repair Targets
- Sliders move but settings do not change: bind
inputandchange, updatetextContent, clear the mask after setting updates. - Reveal acts like a hard magnifier: increase feather, radius, and fade smoothness; reduce opacity if the reveal dominates.
- Trail never disappears: increase fade or verify
destination-outis applied to the mask canvas. - Reveal image always visible: check
globalCompositeOperation, mask reset, and reveal canvas clear order. - Canvas is blurry: fix DPR scaling and resize handling.
- Effect breaks after resize: rebuild all canvas backing stores and redraw.
- Works on desktop but not on phone: verify
touch-action,pointerdown, pointer capture,touchmovefallback, and that overlays are not intercepting the canvas.
Safety And Privacy
- Keep image assets local unless the user explicitly asks for external generation, hosting, or analysis.
- Do not overwrite original base/reveal assets while tuning the effect.
- Do not add analytics, remote tracking, or third-party runtime dependencies to the effect unless the project already uses them and the user wants that path.
- For browser validation, prefer local URLs and file URLs. Do not automate authenticated or private production pages unless the user explicitly scopes that target.
Validation And Eval
- Use
scripts/smoke-check-reveal.mjswhen a URL is available. - For mobile regressions, run the smoke check with
--input touch --viewport 390x844 --dpr 3. - Inspect a screenshot or live page after automated checks; smoke success does not prove visual quality.
- Verify slider behavior manually when controls were changed.
- Re-test after resizing the viewport and after cache-buster changes.
Resources
- Read
references/canvas-compositing.mdbefore implementing or repairing the core render loop. - Read
references/tuning-and-failure-modes.mdwhen adjusting feel or diagnosing controls. - Read
references/browser-validation.mdbefore final visual checks. - Copy
assets/vanilla-template/for a standalone HTML/CSS/JS starter. - Run
scripts/smoke-check-reveal.mjsfor browser evidence when a local URL is available.
What ships with it: 8 files
24.4 KB alongside SKILL.md, 2 of them executable
agents/
- openai.yaml221 B
assets/
- vanilla-template/index.html2.0 KB
- vanilla-template/script.jsruns7.5 KB
- vanilla-template/styles.css3.1 KB
references/
- browser-validation.md1.4 KB
- canvas-compositing.md1.9 KB
- tuning-and-failure-modes.md1.9 KB
scripts/
- smoke-check-reveal.mjsruns6.2 KB