vantajs — Claude Code skill: what it does, how to install
Adds animated Vanta.js backgrounds and explains setup for static sites, React, and Next.js.
npx skills add MengTo/Skills --skill vantajs -a claude-codeWhat vantajs does
This skill guides the integration of animated Vanta.js backgrounds. Vanta inserts a canvas into a container and starts an effect such as VANTA.WAVES; the setup usually needs three.min.js or a supplied THREE object plus one Vanta effect bundle. Options can be changed later with setOptions().
It covers resizing with resize() and cleanup through destroy(). For React, the suggested pattern creates the effect in useEffect, keeps it in a ref, and destroys it when the component unmounts. The same guidance applies to static sites and Vue integrations.
The target container needs an explicit size or the effect will not appear. Multiple WebGL canvases add GPU load, while mobile and older GPUs may need a fallback color or image and possibly a small-screen disable path. Some framework builds require window.THREE or THREE in the options, so check that configuration before wiring it in.
What it helps with
- add an animated background behind a hero section
- configure Vanta.js effect parameters
- resize the canvas when its container changes
- clean up a WebGL effect on React unmount
- provide a fallback for mobile GPUs
Example prompts for the agent
- Use the
vantajsskill to addVANTA.WAVESto#heroand configure an animated hero background. - Use
vantajsto integrate Vanta.js in React withuseEffect, a ref, anddestroy()on unmount. - Review a
vantajsintegration in Next.js and check container sizing,window.THREE, resize handling, and a mobile fallback.
How to install vantajs
1Skills CLI (Vercel)
npx skills add MengTo/Skills --skill vantajs -a claude-code2Manually: put the files in place
~/.claude/skills/vantajs/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/vantajs/
1Skills CLI (Vercel)
npx skills add MengTo/Skills --skill vantajs -a codex2Manually: put the files in place
.agents/skills/vantajs/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add MengTo/Skills --skill vantajs -a cursor2Manually: put the files in place
.cursor/skills/vantajs/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install MengTo/Skills vantajs2Manually: put the files in place
.github/skills/vantajs/SKILL.md1Skills CLI (Vercel)
npx skills add MengTo/Skills --skill vantajs -a gemini-cli2Platform CLI
gemini skills install https://github.com/MengTo/Skills --path agent-skills/web-design/vantajsManually: put the files in place
.devin/skills/vantajs/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add MengTo/Skills --skill vantajs -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 vantajs
How do I install vantajs in Claude Code?
Run npx skills add MengTo/Skills --skill vantajs -a claude-code, then run npx skills add MengTo/Skills --skill vantajs -a claude-code again. The skill file is at ~/.claude/skills/vantajs/SKILL.md.
What does the vantajs skill do?
It guides animated Vanta.js background setup, effect parameters, resizing, and cleanup with destroy(). It also covers React and Next.js integration.
What does a Vanta.js effect need before it can run?
The target container needs a defined width and height. The usual setup includes three.min.js or THREE and one Vanta effect bundle; some framework builds also need window.THREE.
Source text
SKILL.md · MIT
---
name: vantajs
description: Use when adding animated WebGL background effects with Vanta.js (setup, parameters, resizing, performance, integration in React/Next.js).
---
# Vanta.js — Animated WebGL Backgrounds Skill
## When to use
- Decorative animated backgrounds behind hero sections
- You want “wow” quickly without building a full three.js scene
- Lightweight integration into static sites or React/Vue
## How it works
- Vanta injects a canvas into a container element and renders an effect (many use three.js).
- Typical usage: include `three.min.js` (or provide THREE) + one Vanta effect bundle.
## Key APIs/patterns
- Init:
- `const effect = VANTA.WAVES({ el: "#hero", ...options })`
- Update after init:
- `effect.setOptions({ color: 0xff88cc })`
- Resize:
- `effect.resize()` (if container size changes)
- Cleanup:
- `effect.destroy()` (important in SPAs)
## Common pitfalls
- Container has no size → nothing visible
- Ensure the target element has explicit width/height (or is laid out).
- Multiple WebGL canvases on one page → GPU load
- Keep to 1–2 effects/page.
- Mobile/older GPU issues
- Provide a fallback background color/image; consider disabling on small screens.
- Bundling in frameworks
- Some builds require `window.THREE` or passing `THREE` in options.
## Quick recipes
### 1) Minimal waves background
```html
<div id="hero" style="height: 70vh;"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r134/three.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vanta/dist/vanta.waves.min.js"></script>
<script>
const effect = VANTA.WAVES({ el: "#hero", color: 0x0b1220, shininess: 40, waveHeight: 16, zoom: 0.9 });
</script>
```
### 2) React cleanup pattern (concept)
- Create effect in `useEffect`, store in ref, call `destroy()` on unmount.
## What to ask the user
- Which effect (waves, birds, fog, net, etc.) and brand colors?
- Must it run on mobile? If yes, what’s acceptable FPS/quality?
- Is it behind text (needs contrast/readability)?
© MengTo · MIT · MengTo/Skills