shaders
БесплатноБез исполняемых скриптовНе проверенWrite WebGPU effects in code with the open-source Shaders engine (npm `shaders`) in React, Vue, Svelte, Solid or vanilla JS. Use when building or editing…
от shader-effects-inc★ 6 101 звезда на GitHubОб этом скилле
Shaders
Shaders is a WebGPU component library. One package, shaders, with components that compose like layers in Figma. Everything below is free and MIT licensed.
This skill is for writing Shaders code. It's the reference when there's no canvas to design on, or when you're editing a shader that's already in the codebase.
Designing with the Shaders MCP
If the Shaders MCP is connected (its tools start with editor-), design shaders there, not in code. It builds on a live canvas in the Shaders desktop app where the user watches, you can screenshot and review your work, and its own guides (editor-guide, install-guide) are always current. Follow them over this file wherever they differ. Come back here once a shader is installed and you're editing its code.
If it isn't connected and the user wants to design a shader, suggest it once: npx shaders mcp adds the MCP to their agents, and the app is at https://shaders.com/download. If they'd rather stay in code, carry on with this skill. Writing code, you can't see what you render, so keep compositions simple and ask the user to check the result.
Setting up a project
Install the package with the project's package manager:
npm install shaders
Shaders installed from the app are component files listed in shaders.lock.json, next to shaders.config.ts. Treat them as ordinary source: edit props, bind them to state, compose them with other effects. A <Component>.animations.ts file beside one holds its keyframe animations; build them with the project's animation library. npx shaders update pulls in changes made in the app and skips files with local edits unless --force is passed.
Composing an effect
<Shader> renders one <canvas>. Components inside it are layers, drawn in order: first child at the bottom, last on top.
import { Shader, LinearGradient, CursorTrail } from 'shaders/react'
<Shader className="w-full h-64">
<LinearGradient colorA="#0f172a" colorB="#7c3aed" angle={45} colorSpace="oklch" />
<CursorTrail />
</Shader>
Rules that hold for every component:
- Size the canvas with CSS on
<Shader>(class,classNameorstyle). The canvas has no size of its own and resizes with its container. Never style the inner<canvas>. - Effects apply to what's drawn before them. A component that transforms imagery (blurs, distortions, adjustments, stylize, shape effects, transitions) is an effect. Placed as a sibling, it applies to every layer above it in the tree, so a flat stack is the default: image, then Blur, then Vignette. Nest layers inside an effect only when it must touch those layers and nothing else (a ripple on one grid while the swirl behind it stays still). Effects are marked "needs input" in
components.md; they need something drawn before them or nested inside them. Generators (textures, shapes) draw on their own. - Universal props on every component:
blendMode(normal,multiply,screen,overlay,softLight,hardLight,linearDodge,linearBurn,colorDodge,colorBurn,darken,lighten,difference,exclusion,hue,saturation,color,luminosity),opacity(0–1),visible,maskSource+maskType,boundingBox,absolute. - Masking: give the mask layer an
id, setvisible={false}on it, and setmaskSource="thatId"on the layer to mask. Hidden layers still exist in the tree, so they work as masks. - Placement:
boundingBox={{ x: { unit: 'px', value: 24 }, y: { unit: 'uv', value: 0.1 }, width: ..., height: ..., origin: 'top-left', rotation: 15 }}.uvis a 0–1 fraction of the canvas,pxis CSS pixels and survives resizes. - Group is a container. Its
flowprop ({ mode: 'column' | 'row', gap, align }) stacks its children like flexbox. - Color props take CSS hex strings. Components with a
colorSpaceprop blend inlinear,oklch,oklab,hsl,hsvorlch.oklabandoklchkeep gradient midpoints bright.
Dynamic props
Pass an object with a type in place of a number or {x, y} value. No animation code needed:
<Circle radius={{ type: 'auto-animate', mode: 'ping-pong', outputMin: 0.2, outputMax: 0.6, speed: 1 }} />
<Circle center={{ type: 'mouse-position', smoothing: 0.12, momentum: 0.2 }} />
<Blur intensity={{ type: 'mouse', axis: 'x', outputMin: 0, outputMax: 40, smoothing: 0.1 }} />
<LinearGradient id="grad" colorA="#000000" colorB="#ffffff" />
<Circle radius={{ type: 'map', source: 'grad', channel: 'luminance', inputMin: 0, inputMax: 1, outputMin: 0.02, outputMax: 0.12 }} />
mouse-position drives any {x, y} prop (center, position, offset). mouse maps one cursor axis to a number. map reads another layer by id. Framework state works on any prop too and updates on the next frame without recompiling.
Framework idioms
| Framework | Import | Notes |
|---|---|---|
| React | shaders/react |
className; add 'use client' in Next.js files that render ` |
Установить shaders в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл shaders?
Write WebGPU effects in code with the open-source Shaders engine (npm `shaders`) in React, Vue, Svelte, Solid or vanilla JS. Use when building or editing Shaders components in a codebase (composing layers, props, masking, dynamic props, shape effects, or a custom component), or when editing a shader installed from the Shaders app. When the Shaders MCP is connected, design on its canvas instead and follow its guides.
Как установить скилл shaders?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл shaders запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic