Agent skill

Webgl Card Effects

by notque in notque/vexjoy-agent

Standalone WebGL fragment shaders for card visual effects: holographic foil, shimmer, rarity glow.

MITAuto-check: notesGame Development

Install Webgl Card Effects

skills CLI
$ npx skills add notque/vexjoy-agent --skill webgl-card-effects -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install notque/vexjoy-agent webgl-card-effects --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/notque/vexjoy-agent.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/frontend/webgl-card-effects .claude/skills/webgl-card-effects && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
webgl-card-effects
GitHub stars
438
Token cost
~2.9k tokens
SKILL.md length
1,273 words
Files
4 (incl. references)
Skills in repo
61
Repo updated
First seen
Licence
MIT

At a glance

Standalone WebGL fragment shaders for card visual effects: holographic foil, shimmer, rarity glow.

  • Works in 4 steps: ASSESS → BUILD → INTEGRATE → …
  • Tasks that involve 3D graphics and WebGL
  • SKILL.md covers Overview, Instructions, Error Handling and Deep References
  • Calls npx

What it does

Webgl Card Effects is an agent skill from notque/vexjoy-agent. Standalone WebGL fragment shaders for card visual effects: holographic foil, shimmer, rarity glow.

Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/balatro-shader-breakdown.md`, `references/card-shader-patterns.md` and `references/shader-integration-react.md`).

It sits in Game Development, covering 3D graphics and WebGL and Shaders. It works with React and Three.js. The repository describes itself as: VexJoy AI Agent with Jev Intelligent Routing - /do routes plain-English requests to the right specialist agent and gates the work with reviews, tests, and a learning loop. The licence is MIT.

When your agent uses it

  • Tasks that involve 3D graphics and WebGL
  • Tasks that involve Shaders

Example prompts

  • “/webgl-card-effects”

Requirements

  • Node.js
  • Pre-approved tools (allowed-tools): Read, Write, Bash, Grep, Glob, Edit

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. ASSESS
  2. BUILD
  3. INTEGRATE
  4. POLISH

What it can do on your machine

Read from SKILL.md and the folder at commit 5218674. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Bash
    • Grep
    • Glob
    • Edit

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Webgl Card Effects loads about 2.9k tokens when it runs, and up to ~14k if it reads all its reference files. Until then it costs about 29 tokens; SKILL.md has 1,273 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~29
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~14k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Write, Bash, Grep, Glob, Edit

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from notque/vexjoy-agent at commit 5218674, republished under its MIT licence (© notque). 1,273 words, ~2,930 tokens.

Download SKILL.mdSave it as .claude/skills/webgl-card-effects/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
webgl-card-effects
description
Standalone WebGL fragment shaders for card visual effects: holographic foil, shimmer, rarity glow.
allowed-tools
Read, Write, Bash, Grep, Glob, Edit
promoted_to
frontend
agent
typescript-frontend-engineer
user-invocable
false
command
/card-effects
routing.triggers
card effects, holographic, foil effect, card shimmer, card glow, shader card, WebGL card, rarity effects, Balatro effect, card visual effects
routing.pairs_with
typescript-frontend-engineer, ui-design-engineer
routing.complexity
Medium
routing.category
frontend

WebGL Card Effects Skill

Overview

This skill adds GPU-accelerated visual effects to React card components using standalone WebGL2 fragment shaders — no Three.js, no R3F, no external library required. It targets deckbuilder games and card UIs where rarity tiers should feel visually distinct, not just differentiated by a CSS box-shadow value.

Scope: Holographic foil overlays, metallic shimmer bands, rarity-driven energy pulses, and interactive tilt-shine effects mounted directly on React card components. The canonical target is FramedCard.tsx in a React 19 / Vite / Tailwind project with a rarity system (starter → common → uncommon → rare → legendary).

Not in scope: 3D transformations, texture loading, post-processing pipelines, or any Three.js scene management. For those, use threejs-builder.

Key constraint: Browsers cap WebGL contexts at roughly 8–16 total per page. This skill uses a single shared WebGL2 context with blit-to-2D-canvas output per card, avoiding the per-card context problem entirely. See references/shader-integration-react.md for the full singleton pattern.


Instructions

Phase 1: ASSESS

Goal: Understand which effects are needed and confirm the card component structure before writing any code.

Step 1: Read the card component

Read these files before writing anything:

  • src/components/cards/FramedCard.tsx — component structure, hover state, rarity prop flow
  • src/components/cards/cardStyles.ts — CARD_SIZE_CONFIG for pixel dimensions, rarity string values

Confirm:

  • How rarity reaches the component (prop name, TypeScript type, exact string values)
  • Whether isHovered state already exists in the component
  • Which sizes are rendered in contexts that justify shader cost (xl/lg only — xs/sm are too small)
  • Whether showShine / card-shine CSS exists and needs coordination

Step 2: Select effect tier per rarity

RarityWebGL?Effect
starter / commonNoCSS shimmer only — no WebGL overhead
uncommonYes (subtle)Metallic band shimmer, very low opacity
rareYes (medium)Moving shimmer + blue hue shift + edge pulse
legendaryYes (full)Rainbow holographic foil, mouse-reactive tilt

Step 3: Confirm React version

Check package.json for the React version. This skill assumes React 19 (ref as prop, no forwardRef). If the project uses React 18, canvas refs require useRef + standard ref passing.

Gate: Rarity values confirmed, CARD_SIZE_CONFIG read, effect tiers decided. Proceed only when this gate passes.


Phase 2: BUILD

Goal: Write working GLSL shaders and the WebGL initialization harness.

Load references/card-shader-patterns.md now.

Step 1: Create the shader strings module

Create src/components/cards/effects/cardShaders.ts. This file holds:

  • The shared vertex shader (passthrough UV coordinates)
  • Three fragment shader strings: SHIMMER_FRAG, RARE_FRAG, LEGENDARY_FRAG
  • A rarityToUniform(rarity: string): number mapping function

Every shader must expose this exact uniform interface:

glsl
uniform float u_time;        // seconds elapsed, JS wraps at 1000.0
uniform float u_rarity;      // 0.0=starter/common, 0.25=uncommon, 0.5=rare, 1.0=legendary
uniform float u_hover;       // 0.0 to 1.0, lerped by JavaScript each frame
uniform vec2  u_mouse;       // normalized card-space [0,1] mouse position
uniform vec2  u_resolution;  // canvas pixel dimensions (width, height)
uniform float u_upgraded;    // 0.0 or 1.0 — upgraded cards get slightly more intense effect

Step 2: Create the WebGL harness hook

Create src/components/cards/effects/useCardShader.ts.

Load references/shader-integration-react.md for the full hook source. The hook must:

  • Use the shared WebGL2 context singleton (not create a new context per card)
  • Accept { rarity, isHovered, isUpgraded, enabled } as input
  • Return a RefObject<HTMLCanvasElement> that the component attaches to the canvas element
  • Pause the animation loop when the card is off-screen (IntersectionObserver)
  • Run at 30fps maximum via delta-time throttle
  • Clean up the RAF loop and observer on unmount

Step 3: Shader construction for each tier

Load references/balatro-shader-breakdown.md for the legendary holographic shader GLSL source.

For rare: use the shimmer band + hue shift layer from the breakdown, omit the rainbow foil layer.

For uncommon: use only the metallic band pass (single moving highlight), opacity 0.3 maximum.

Gate: Run npx tsc --noEmit. Zero TypeScript errors. Open browser console and verify gl.getShaderInfoLog() returns empty string for all shaders.


Phase 3: INTEGRATE

Goal: Mount the canvas overlay on FramedCard.tsx and wire rarity/hover state into the shader uniforms.

Step 1: Derive render decision

Inside FramedCard, after the existing const shouldShine line:

tsx
const shouldRenderShader =
  ['uncommon', 'rare', 'legendary'].includes(rarity) &&
  size !== 'xs' &&
  size !== 'sm';

Step 2: Call the hook

tsx
const shaderCanvasRef = useCardShader({
  rarity,
  isHovered,
  isUpgraded,
  enabled: shouldRenderShader,
});

Step 3: Add the canvas overlay to JSX

Inside the motion.div return, immediately after the frame <img> element (after z-10):

tsx
{shouldRenderShader && (
  <canvas
    ref={shaderCanvasRef}
    className="absolute inset-0 w-full h-full pointer-events-none rounded-lg"
    style={{ zIndex: 15, mixBlendMode: 'screen' }}
  />
)}

mix-blend-mode: screen makes the shader's black background transparent while letting bright holographic colors add onto the card surface.

Step 4: Coordinate with existing CSS shine

The existing card-shine CSS class creates a gradient sweep on hover. It will double-shimmer with the WebGL effect. Suppress it for rarities that have the WebGL shader:

tsx
const shineClass =
  showShine && shouldShine && !shouldRenderShader
    ? `card-shine ${...}`
    : '';

Step 5: Verify z-layer stack

From bottom to top inside the card:

  • z-0 — artwork container
  • z-10 — frame PNG image
  • z-15 — shader canvas (new)
  • z-20 — text elements (energy orb, name, description, type strip)
  • Tooltip renders outside via AnimatePresence portal

Tailwind does not generate z-15 by default. Either add it to tailwind.config or use style={{ zIndex: 15 }} inline (already shown above).

Gate: Cards render correctly at all sizes. Shader canvas is visible on uncommon/rare/legendary. No z-fighting between shader layer and frame image. TypeScript clean.


Show full SKILL.md (549 more words)Show less
Phase 4: POLISH

Goal: Performance verification, visual tuning, mobile fallback confirmation.

Step 1: Performance audit

Open Chrome DevTools → Performance tab. Record 5 seconds while hovering over a legendary card.

Targets:

  • GPU usage: < 5% for a single legendary card
  • Frame time: shader must not push game loop below 60fps
  • No memory growth across multiple mount/unmount cycles (check Heap in Memory tab)

Step 2: Mobile fallback verification

typescript
// In useCardShader.ts — call this once at module load
function supportsWebGL2(): boolean {
  try {
    const canvas = document.createElement('canvas');
    return !!canvas.getContext('webgl2');
  } catch {
    return false;
  }
}

On devices where supportsWebGL2() returns false, the hook returns a null ref and shouldRenderShader must evaluate to false. The existing card-shine CSS handles the fallback. Verify this works by temporarily forcing the function to return false.

Step 3: Visual calibration

Effects are seasoning (skills/shared-patterns/ui-design-judgment.md section 7): card name, cost, and rules text keep 4.5:1 contrast under the effect at peak intensity. Screenshot each tier at lg and xl with whatever renderer the harness has and look before tuning.

  • Legendary: Rainbow visible but not garish. Effective opacity 0.65–0.75 over the card. Animation speed: u_time advances at 0.5× real-time (not 1:1 — too fast feels cheap).
  • Rare: Blue hue shift + shimmer. Feels premium, not like a cursor glow effect.
  • Uncommon: Barely perceptible silver shimmer. If you notice it immediately on a static card, the opacity is too high.
  • Mouse tilt: The holographic angle shift should feel like physically tilting a card under light, not like a flashlight following the cursor. Limit the angular response to ±15 degrees of apparent rotation.

Step 4: Test across all rendered sizes

SizeWidthShader?Note
xs80pxNoToo small — no overhead
sm110pxNoToo small — no overhead
md140pxOptionalTest legibility first
lg170pxYesMinimum size for full effect
xl200pxYesPrimary target — should look best

Gate: All DevTools performance targets met. Mobile fallback verified. Visual quality approved at lg and xl sizes across all three shader tiers.


Error Handling

"WebGL: INVALID_OPERATION: useProgram: program not valid"

Shader compilation failed silently. Call gl.getShaderInfoLog(shader) immediately after gl.compileShader(shader). Common causes: GLSL syntax error, wrong #version 300 es directive missing, or a uniform declared but never referenced (GLSL compilers strip unused uniforms — reference them or remove the declaration).

Canvas present but effect invisible

Check mixBlendMode. On very dark card backgrounds, screen blend mode makes dark shader output invisible. For debugging, switch to normal blend mode to see the raw shader output. Also verify the canvas zIndex is above the frame PNG (15 > 10).

Browser console: "Too many active WebGL contexts"

The shared context singleton in useCardShader is not being used — individual hook calls are each creating a new context. Verify the module-level singleton is initialized once and reused. See the singleton pattern in references/shader-integration-react.md.

Canvas appears stretched or distorted on high-DPI displays

Canvas width / height attributes must match physical pixel dimensions, not CSS dimensions. CSS w-full h-full sets display size only. Use a ResizeObserver on the canvas element: canvas.width = entry.contentRect.width * devicePixelRatio.

TypeScript error: "Property 'ref' does not exist on 'HTMLCanvasElement'"

React 19 passes ref as a prop. The canvas element should be <canvas ref={shaderCanvasRef} ... /> — no forwardRef needed. Ensure the ref type matches: useRef<HTMLCanvasElement>(null).


Deep References

Load the reference needed for the current phase. All three total ~1,400 lines -- load all only if implementing everything in one pass.

SignalReference
GLSL fragment shader source for each tierreferences/card-shader-patterns.md
React 19 WebGL hook, context singletonreferences/shader-integration-react.md
Balatro holographic foil GLSL breakdownreferences/balatro-shader-breakdown.md

© notque, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in skills/frontend/webgl-card-effects of notque/vexjoy-agent.

  • SKILL.md
  • references/balatro-shader-breakdown.md
  • references/card-shader-patterns.md
  • references/shader-integration-react.md

Open the folder on GitHubat commit 5218674

Compare with similar skills

Webgl Card Effects next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Webgl Card Effects compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Webgl Card Effects this skillnotque/vexjoy-agent438—~2.9kAutomated safety check: NotesMIT
Typegpusoftware-mansion-labs/skills2912 repos~5.6kAutomated safety check: PassNone
Shader for Interfacesv2space-labs/shader-for-interfaces115—~3.1kAutomated safety check: PassMIT
Web CloneJane-xiaoer/claude-skill-web-clone1k2 repos~2.7kAutomated safety check: PassMIT
New ExperimentTresjs/tres3.8k—~782Automated safety check: PassMIT
Improve Threejsmillionco/react-doctor15k—~2.3kAutomated safety check: PassCustom licence

Similar skills

  • Typegpu

    software-mansion-labs/skills

    TypeGPU is type-safe WebGPU in TypeScript. An agent skill from software-mansion-labs/skills.

    291 GitHub starsUsed in 2 repos~5.6k tokens
    Game DevelopmentAuto-check passed
  • Shader for Interfaces

    v2space-labs/shader-for-interfaces

    Decides whether an interface effect belongs in CSS, SVG, Canvas 2D, WebGL or WebGPU, then builds, debugs and visually verifies focused GPU effects inside product UIs.

    115 GitHub stars~3.1k tokensUpdated 1 mo ago
    Frontend & DesignAuto-check passed
  • Web Clone

    Jane-xiaoer/claude-skill-web-clone

    网站复刻 / 克隆方法论。USE WHEN 用户说 复刻网站、克隆网站、clone website、抄个站、仿站、 照着这个站做一个、reproduce site、还原某个网页效果、把这个站搬下来改成我的、 复刻某个交互/WebGL/Canvas/Three.js 效果。提供「先拿真源码 → 判路径 → 逆向拆解 → 搭工程 → 替换内容」的可移植决策树,覆盖静态站 /…

    1k GitHub starsUsed in 2 repos~2.7k tokens
    Game DevelopmentAuto-check passed
  • New Experiment

    Tresjs/tres

    Create a new experiment in TresJS Lab with all necessary files

    3.8k GitHub stars~782 tokensUpdated yesterday
    Game DevelopmentAuto-check passed
  • Improve Threejs

    millionco/react-doctor

    Audit and fix Three.js and React Three Fiber apps for frame-loop performance, GPU memory leaks, scene-graph correctness, and visual defects like z-fighting, shadow acne, wrong color space, and…

    15k GitHub stars~2.3k tokensUpdated yesterday
    Game DevelopmentAuto-check passed
  • Polycss

    layoutit/polycss

    Build PolyCSS scenes that render 3D meshes, primitive shapes, or custom polygons as DOM/CSS polygon elements.

    759 GitHub stars~2.4k tokensUpdated 1 mo ago
    Game DevelopmentAuto-check passed

More from notque/vexjoy-agent

All 61 skills in this repo
  • Game Asset Generator

    notque/vexjoy-agent

    Deterministic palette/matrix pixel art (not AI). An agent skill from notque/vexjoy-agent.

    438 GitHub stars~2.3k tokensUpdated 5 days ago
    Auto-check: notes
  • PR Workflow

    notque/vexjoy-agent

    Pull request lifecycle: commit, codex review, sync, review, fix, status, cleanup, and PR mining.

    438 GitHub stars~2.8k tokensUpdated 5 days ago
    Auto-check: notes
  • Architecture Deepening

    notque/vexjoy-agent

    Improve architecture across modules by deepening interfaces.

    438 GitHub stars~3.3k tokensUpdated 5 days ago
    Auto-check: notes
  • Code Quality

    notque/vexjoy-agent

    Code quality: cleanup, linting, formatting, quality gates. An agent skill from notque/vexjoy-agent.

    438 GitHub stars~1.5k tokensUpdated 5 days ago
    Auto-check: notes
  • Codebase Analyzer

    notque/vexjoy-agent

    Statistical rule discovery from Go codebase patterns. An agent skill from notque/vexjoy-agent.

    438 GitHub stars~2k tokensUpdated 5 days ago
    Auto-check: notes
  • Comment Quality

    notque/vexjoy-agent

    Review and fix temporal references in code comments. An agent skill from notque/vexjoy-agent.

    438 GitHub stars~2k tokensUpdated 5 days ago
    Auto-check: notes

Works with

Questions about Webgl Card Effects

What does Webgl Card Effects do?

Standalone WebGL fragment shaders for card visual effects: holographic foil, shimmer, rarity glow. Webgl Card Effects is an agent skill from notque/vexjoy-agent. Standalone WebGL fragment shaders for card visual effects: holographic foil, shimmer, rarity glow.

When should I use Webgl Card Effects?

Webgl Card Effects fits situations like: tasks that involve 3D graphics and WebGL; tasks that involve Shaders.

How do I install Webgl Card Effects in Claude Code?

Run `npx skills add notque/vexjoy-agent --skill webgl-card-effects -a claude-code`. Or copy the skill folder (skills/frontend/webgl-card-effects in notque/vexjoy-agent) into .claude/skills/webgl-card-effects in your project. Claude Code loads it when a task matches its description.

How do I install Webgl Card Effects in Codex?

Run `npx skills add notque/vexjoy-agent --skill webgl-card-effects -a codex`. Or copy the skill folder (skills/frontend/webgl-card-effects in notque/vexjoy-agent) into .agents/skills/webgl-card-effects in your project. Codex loads it when a task matches its description.

Can I use Webgl Card Effects in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add notque/vexjoy-agent --skill webgl-card-effects -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/webgl-card-effects, .gemini/skills/webgl-card-effects, .github/skills/webgl-card-effects and .opencode/skills/webgl-card-effects in your project.

What does Webgl Card Effects need to run?

Going by SKILL.md and its folder, Webgl Card Effects needs the command-line tools its instructions call (npx). Our summary lists: Node.js. Its frontmatter pre-approves these tools: Read, Write, Bash, Grep, Glob, Edit.

Does Webgl Card Effects access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Webgl Card Effects safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Webgl Card Effects use?

Webgl Card Effects is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Webgl Card Effects use?

About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 11k tokens, read only when the agent opens those files.

What are the alternatives to Webgl Card Effects?

Skills that share tags, products or a category with Webgl Card Effects: Typegpu (software-mansion-labs/skills, 291 stars), Shader for Interfaces (v2space-labs/shader-for-interfaces, 115 stars), Web Clone (Jane-xiaoer/claude-skill-web-clone, 1k stars) and New Experiment (Tresjs/tres, 3.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Webgl Card Effects?

notque (a GitHub user) maintains it in notque/vexjoy-agent, which has 438 GitHub stars. The repository holds 61 skills in this directory. The repository was last updated on October 3, 2026.

Source: notque/vexjoy-agent on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.