[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CEHGPWXM3W0D6K4VFME615":3,"skill-same:01M7CEHGPWXM3W0D6K4VFME615":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":31,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M7CEHGPWXM3W0D6K4VFME615","threejs-shaders",null,"Three.js shaders - GLSL, ShaderMaterial, uniforms, custom effects. Use when creating custom visual effects, modifying vertices, writing fragment shaders, or extending built-in materials.","YYC-Cube\u002FYYC3-Knowledge-Base","YYC-Cube","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F235006543?v=4","01M79J2PH4SWD2X0825X6PN748","yyc3","01M79J2PHVK3F6ZBYT8K2SCZCW",1,"MIT","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-antigravity-awesome-skills\u002Fplugins\u002Fantigravity-awesome-skills\u002Fskills\u002Fthreejs-shaders\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: threejs-shaders\ndescription: Three.js shaders - GLSL, ShaderMaterial, uniforms, custom effects. Use when creating custom visual effects, modifying vertices, writing fragment shaders, or extending built-in materials.\nrisk: unknown\nsource: community\n---\n\n# Three.js Shaders\n\n## When to Use\n- You need custom shader logic in Three.js.\n- The task involves `ShaderMaterial`, uniforms, GLSL, vertex deformation, or fragment-based effects.\n- You are extending material behavior beyond what built-in materials provide.\n\n## Quick Start\n\n```javascript\nimport * as THREE from \"three\";\n\nconst material = new THREE.ShaderMaterial({\n  uniforms: {\n    time: { value: 0 },\n    color: { value: new THREE.Color(0xff0000) },\n  },\n  vertexShader: `\n    void main() {\n      gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n    }\n  `,\n  fragmentShader: `\n    uniform vec3 color;\n\n    void main() {\n      gl_FragColor = vec4(color, 1.0);\n    }\n  `,\n});\n\n\u002F\u002F Update in animation loop\nmaterial.uniforms.time.value = clock.getElapsedTime();\n```\n\n## ShaderMaterial vs RawShaderMaterial\n\n### ShaderMaterial\n\nThree.js provides built-in uniforms and attributes.\n\n```javascript\nconst material = new THREE.ShaderMaterial({\n  vertexShader: `\n    \u002F\u002F Built-in uniforms available:\n    \u002F\u002F uniform mat4 modelMatrix;\n    \u002F\u002F uniform mat4 modelViewMatrix;\n    \u002F\u002F uniform mat4 projectionMatrix;\n    \u002F\u002F uniform mat4 viewMatrix;\n    \u002F\u002F uniform mat3 normalMatrix;\n    \u002F\u002F uniform vec3 cameraPosition;\n\n    \u002F\u002F Built-in attributes available:\n    \u002F\u002F attribute vec3 position;\n    \u002F\u002F attribute vec3 normal;\n    \u002F\u002F attribute vec2 uv;\n\n    void main() {\n      gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n    }\n  `,\n  fragmentShader: `\n    void main() {\n      gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\n    }\n  `,\n});\n```\n\n### RawShaderMaterial\n\nFull control - you define everything.\n\n```javascript\nconst material = new THREE.RawShaderMaterial({\n  uniforms: {\n    projectionMatrix: { value: camera.projectionMatrix },\n    modelViewMatrix: { value: new THREE.Matrix4() },\n  },\n  vertexShader: `\n    precision highp float;\n\n    attribute vec3 position;\n    uniform mat4 projectionMatrix;\n    uniform mat4 modelViewMatrix;\n\n    void main() {\n      gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n    }\n  `,\n  fragmentShader: `\n    precision highp float;\n\n    void main() {\n      gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\n    }\n  `,\n});\n```\n\n## Uniforms\n\n### Uniform Types\n\n```javascript\nconst material = new THREE.ShaderMaterial({\n  uniforms: {\n    \u002F\u002F Numbers\n    floatValue: { value: 1.5 },\n    intValue: { value: 1 },\n\n    \u002F\u002F Vectors\n    vec2Value: { value: new THREE.Vector2(1, 2) },\n    vec3Value: { value: new THREE.Vector3(1, 2, 3) },\n    vec4Value: { value: new THREE.Vector4(1, 2, 3, 4) },\n\n    \u002F\u002F Colors (converted to vec3)\n    colorValue: { value: new THREE.Color(0xff0000) },\n\n    \u002F\u002F Matrices\n    mat3Value: { value: new THREE.Matrix3() },\n    mat4Value: { value: new THREE.Matrix4() },\n\n    \u002F\u002F Textures\n    textureValue: { value: texture },\n    cubeTextureValue: { value: cubeTexture },\n\n    \u002F\u002F Arrays\n    floatArray: { value: [1.0, 2.0, 3.0] },\n    vec3Array: {\n      value: [new THREE.Vector3(1, 0, 0), new THREE.Vector3(0, 1, 0)],\n    },\n  },\n});\n```\n\n### GLSL Declarations\n\n```glsl\n\u002F\u002F In shader\nuniform float floatValue;\nuniform int intValue;\nuniform vec2 vec2Value;\nuniform vec3 vec3Value;\nuniform vec3 colorValue;    \u002F\u002F Color becomes vec3\nuniform vec4 vec4Value;\nuniform mat3 mat3Value;\nuniform mat4 mat4Value;\nuniform sampler2D textureValue;\nuniform samplerCube cubeTextureValue;\nuniform float floatArray[3];\nuniform vec3 vec3Array[2];\n```\n\n### Updating Uniforms\n\n```javascript\n\u002F\u002F Direct assignment\nmaterial.uniforms.time.value = clock.getElapsedTime();\n\n\u002F\u002F Vector\u002FColor updates\nmaterial.uniforms.position.value.set(x, y, z);\nmaterial.uniforms.color.value.setHSL(hue, 1, 0.5);\n\n\u002F\u002F Matrix updates\nmaterial.uniforms.matrix.value.copy(mesh.matrixWorld);\n```\n\n## Varyings\n\nPass data from vertex to fragment shader.\n\n```javascript\nconst material = new THREE.ShaderMaterial({\n  vertexShader: `\n    varying vec2 vUv;\n    varying vec3 vNormal;\n    varying vec3 vPosition;\n\n    void main() {\n      vUv = uv;\n      vNormal = normalize(normalMatrix * normal);\n      vPosition = (modelViewMatrix * vec4(position, 1.0)).xyz;\n\n      gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n    }\n  `,\n  fragmentShader: `\n    varying vec2 vUv;\n    varying vec3 vNormal;\n    varying vec3 vPosition;\n\n    void main() {\n      \u002F\u002F Use interpolated values\n      gl_FragColor = vec4(vNormal * 0.5 + 0.5, 1.0);\n    }\n  `,\n});\n```\n\n## Common Shader Patterns\n\n### Texture Sampling\n\n```javascript\nconst material = new THREE.ShaderMaterial({\n  uniforms: {\n    map: { value: texture },\n  },\n  vertexShader: `\n    varying vec2 vUv;\n\n    void main() {\n      vUv = uv;\n      gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n    }\n  `,\n  fragmentShader: `\n    uniform sampler2D map;\n    varying vec2 vUv;\n\n    void main() {\n      vec4 texColor = texture2D(map, vUv);\n      gl_FragColor = texColor;\n    }\n  `,\n});\n```\n\n### Vertex Displacement\n\n```javascript\nconst material = new THREE.ShaderMaterial({\n  uniforms: {\n    time: { value: 0 },\n    amplitude: { value: 0.5 },\n  },\n  vertexShader: `\n    uniform float time;\n    uniform float amplitude;\n\n    void main() {\n      vec3 pos = position;\n\n      \u002F\u002F Wave displacement\n      pos.z += sin(pos.x * 5.0 + time) * amplitude;\n      pos.z += sin(pos.y * 5.0 + time) * amplitude;\n\n      gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);\n    }\n  `,\n  fragmentShader: `\n    void main() {\n      gl_FragColor = vec4(0.5, 0.8, 1.0, 1.0);\n    }\n  `,\n});\n```\n\n### Fresnel Effect\n\n```javascript\nconst material = new THREE.ShaderMaterial({\n  vertexShader: `\n    varying vec3 vNormal;\n    varying vec3 vWorldPosition;\n\n    void main() {\n      vNormal = normalize(normalMatrix * normal);\n      vWorldPosition = (modelMatrix * vec4(position, 1.0)).xyz;\n      gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n    }\n  `,\n  fragmentShader: `\n    varying vec3 vNormal;\n    varying vec3 vWorldPosition;\n\n    void main() {\n      \u002F\u002F cameraPosition is auto-provided by ShaderMaterial\n      vec3 viewDirection = normalize(cameraPosition - vWorldPosition);\n      float fresnel = pow(1.0 - dot(viewDirection, vNormal), 3.0);\n\n      vec3 baseColor = vec3(0.0, 0.0, 0.5);\n      vec3 fresnelColor = vec3(0.5, 0.8, 1.0);\n\n      gl_FragColor = vec4(mix(baseColor, fresnelColor, fresnel), 1.0);\n    }\n  `,\n});\n```\n\n### Noise-Based Effects\n\n```glsl\n\u002F\u002F Simple noise function\nfloat random(vec2 st) {\n  return fract(sin(dot(st.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\n\u002F\u002F Value noise\nfloat noise(vec2 st) {\n  vec2 i = floor(st);\n  vec2 f = fract(st);\n\n  float a = random(i);\n  float b = random(i + vec2(1.0, 0.0));\n  float c = random(i + vec2(0.0, 1.0));\n  float d = random(i + vec2(1.0, 1.0));\n\n  vec2 u = f * f * (3.0 - 2.0 * f);\n\n  return mix(a, b, u.x) + (c - a) * u.y * (1.0 - u.x) + (d - b) * u.x * u.y;\n}\n\n\u002F\u002F Usage\nfloat n = noise(vUv * 10.0 + time);\n```\n\n### Gradient\n\n```glsl\n\u002F\u002F Linear gradient\nvec3 color = mix(colorA, colorB, vUv.y);\n\n\u002F\u002F Radial gradient\nfloat dist = distance(vUv, vec2(0.5));\nvec3 color = mix(centerColor, edgeColor, dist * 2.0);\n\n\u002F\u002F Smooth gradient with custom curve\nfloat t = smoothstep(0.0, 1.0, vUv.y);\nvec3 color = mix(colorA, colorB, t);\n```\n\n### Rim Lighting\n\n```javascript\nconst material = new THREE.ShaderMaterial({\n  vertexShader: `\n    varying vec3 vNormal;\n    varying vec3 vViewPosition;\n\n    void main() {\n      vNormal = normalize(normalMatrix * normal);\n      vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n      vViewPosition = mvPosition.xyz;\n      gl_Position = projectionMatrix * mvPosition;\n    }\n  `,\n  fragmentShader: `\n    varying vec3 vNormal;\n    varying vec3 vViewPosition;\n\n    void main() {\n      vec3 viewDir = normalize(-vViewPosition);\n      float rim = 1.0 - max(0.0, dot(viewDir, vNormal));\n      rim = pow(rim, 4.0);\n\n      vec3 baseColor = vec3(0.2, 0.2, 0.8);\n      vec3 rimColor = vec3(1.0, 0.5, 0.0);\n\n      gl_FragColor = vec4(baseColor + rimColor * rim, 1.0);\n    }\n  `,\n});\n```\n\n### Dissolve Effect\n\n```glsl\nuniform float progress;\nuniform sampler2D noiseMap;\n\nvoid main() {\n  float noise = texture2D(noiseMap, vUv).r;\n\n  if (noise \u003C progress) {\n    discard;\n  }\n\n  \u002F\u002F Edge glow\n  float edge = smoothstep(progress, progress + 0.1, noise);\n  vec3 edgeColor = vec3(1.0, 0.5, 0.0);\n  vec3 baseColor = vec3(0.5);\n\n  gl_FragColor = vec4(mix(edgeColor, baseColor, edge), 1.0);\n}\n```\n\n## Extending Built-in Materials\n\n### onBeforeCompile\n\nModify existing material shaders.\n\n```javascript\nconst material = new THREE.MeshStandardMaterial({ color: 0x00ff00 });\n\nmaterial.onBeforeCompile = (shader) => {\n  \u002F\u002F Add custom uniform\n  shader.uniforms.time = { value: 0 };\n\n  \u002F\u002F Store reference for updates\n  material.userData.shader = shader;\n\n  \u002F\u002F Modify vertex shader\n  shader.vertexShader = shader.vertexShader.replace(\n    \"#include \u003Cbegin_vertex>\",\n    `\n    #include \u003Cbegin_vertex>\n    transformed.y += sin(position.x * 10.0 + time) * 0.1;\n    `,\n  );\n\n  \u002F\u002F Add uniform declaration\n  shader.vertexShader = \"uniform float time;\\n\" + shader.vertexShader;\n};\n\n\u002F\u002F Update in animation loop\nif (material.userData.shader) {\n  material.userData.shader.uniforms.time.value = clock.getElapsedTime();\n}\n```\n\n### Common Injection Points\n\n```javascript\n\u002F\u002F Vertex shader chunks\n\"#include \u003Cbegin_vertex>\"; \u002F\u002F After position is calculated\n\"#include \u003Cproject_vertex>\"; \u002F\u002F After gl_Position\n\"#include \u003Cbeginnormal_vertex>\"; \u002F\u002F Normal calculation start\n\n\u002F\u002F Fragment shader chunks\n\"#include \u003Ccolor_fragment>\"; \u002F\u002F After diffuse color\n\"#include \u003Coutput_fragment>\"; \u002F\u002F Final output\n\"#include \u003Cfog_fragment>\"; \u002F\u002F After fog applied\n```\n\n## GLSL Built-in Functions\n\n### Math Functions\n\n```glsl\n\u002F\u002F Basic\nabs(x), sign(x), floor(x), ceil(x), fract(x)\nmod(x, y), min(x, y), max(x, y), clamp(x, min, max)\nmix(a, b, t), step(edge, x), smoothstep(edge0, edge1, x)\n\n\u002F\u002F Trigonometry\nsin(x), cos(x), tan(x)\nasin(x), acos(x), atan(y, x), atan(x)\nradians(degrees), degrees(radians)\n\n\u002F\u002F Exponential\npow(x, y), exp(x), log(x), exp2(x), log2(x)\nsqrt(x), inversesqrt(x)\n```\n\n### Vector Functions\n\n```glsl\n\u002F\u002F Length and distance\nlength(v), distance(p0, p1), dot(x, y), cross(x, y)\n\n\u002F\u002F Normalization\nnormalize(v)\n\n\u002F\u002F Reflection and refraction\nreflect(I, N), refract(I, N, eta)\n\n\u002F\u002F Component-wise\nlessThan(x, y), lessThanEqual(x, y)\ngreaterThan(x, y), greaterThanEqual(x, y)\nequal(x, y), notEqual(x, y)\nany(bvec), all(bvec)\n```\n\n### Texture Functions\n\n```glsl\n\u002F\u002F GLSL 1.0 (default) - use texture2D\u002FtextureCube\ntexture2D(sampler, coord)\ntexture2D(sampler, coord, bias)\ntextureCube(sampler, coord)\n\n\u002F\u002F GLSL 3.0 (glslVersion: THREE.GLSL3) - use texture()\n\u002F\u002F texture(sampler, coord) replaces texture2D\u002FtextureCube\n\u002F\u002F Also use: out vec4 fragColor instead of gl_FragColor\n\n\u002F\u002F Texture size (GLSL 1.30+)\ntextureSize(sampler, lod)\n```\n\n## Common Material Properties\n\n```javascript\nconst material = new THREE.ShaderMaterial({\n  uniforms: {\n    \u002F* ... *\u002F\n  },\n  vertexShader: \"\u002F* ... *\u002F\",\n  fragmentShader: \"\u002F* ... *\u002F\",\n\n  \u002F\u002F Rendering\n  transparent: true,\n  opacity: 1.0,\n  side: THREE.DoubleSide,\n  depthTest: true,\n  depthWrite: true,\n\n  \u002F\u002F Blending\n  blending: THREE.NormalBlending,\n  \u002F\u002F AdditiveBlending, SubtractiveBlending, MultiplyBlending\n\n  \u002F\u002F Wireframe\n  wireframe: false,\n  wireframeLinewidth: 1, \u002F\u002F Note: >1 has no effect on most platforms (WebGL limitation)\n\n  \u002F\u002F Extensions\n  extensions: {\n    derivatives: true, \u002F\u002F For fwidth, dFdx, dFdy\n    fragDepth: true, \u002F\u002F gl_FragDepth\n    drawBuffers: true, \u002F\u002F Multiple render targets\n    shaderTextureLOD: true, \u002F\u002F texture2DLod\n  },\n\n  \u002F\u002F GLSL version\n  glslVersion: THREE.GLSL3, \u002F\u002F For WebGL2 features\n});\n```\n\n## Shader Includes\n\n### Using Three.js Shader Chunks\n\n```javascript\nimport { ShaderChunk } from \"three\";\n\nconst fragmentShader = `\n  ${ShaderChunk.common}\n  ${ShaderChunk.packing}\n\n  uniform sampler2D depthTexture;\n  varying vec2 vUv;\n\n  void main() {\n    float depth = texture2D(depthTexture, vUv).r;\n    float linearDepth = perspectiveDepthToViewZ(depth, 0.1, 1000.0);\n    gl_FragColor = vec4(vec3(-linearDepth \u002F 100.0), 1.0);\n  }\n`;\n```\n\n### External Shader Files\n\n```javascript\n\u002F\u002F With vite\u002Fwebpack\nimport vertexShader from \".\u002Fshaders\u002Fvertex.glsl\";\nimport fragmentShader from \".\u002Fshaders\u002Ffragment.glsl\";\n\nconst material = new THREE.ShaderMaterial({\n  vertexShader,\n  fragmentShader,\n});\n```\n\n## Instanced Shaders\n\n```javascript\n\u002F\u002F Instanced attribute\nconst offsets = new Float32Array(instanceCount * 3);\n\u002F\u002F Fill offsets...\ngeometry.setAttribute(\"offset\", new THREE.InstancedBufferAttribute(offsets, 3));\n\nconst material = new THREE.ShaderMaterial({\n  vertexShader: `\n    attribute vec3 offset;\n\n    void main() {\n      vec3 pos = position + offset;\n      gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);\n    }\n  `,\n  fragmentShader: `\n    void main() {\n      gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\n    }\n  `,\n});\n```\n\n## Debugging Shaders\n\n```javascript\n\u002F\u002F Check for compile errors\nmaterial.onBeforeCompile = (shader) => {\n  console.log(\"Vertex Shader:\", shader.vertexShader);\n  console.log(\"Fragment Shader:\", shader.fragmentShader);\n};\n\n\u002F\u002F Visual debugging\nfragmentShader: `\n  void main() {\n    \u002F\u002F Debug UV\n    gl_FragColor = vec4(vUv, 0.0, 1.0);\n\n    \u002F\u002F Debug normals\n    gl_FragColor = vec4(vNormal * 0.5 + 0.5, 1.0);\n\n    \u002F\u002F Debug position\n    gl_FragColor = vec4(vPosition * 0.1 + 0.5, 1.0);\n  }\n`;\n\n\u002F\u002F Check WebGL errors\nrenderer.debug.checkShaderErrors = true;\n```\n\n## Performance Tips\n\n1. **Minimize uniforms**: Group related values into vectors\n2. **Avoid conditionals**: Use mix\u002Fstep instead of if\u002Felse\n3. **Precalculate**: Move calculations to JS when possible\n4. **Use textures**: For complex functions, use lookup tables\n5. **Limit overdraw**: Avoid transparent objects when possible\n\n```glsl\n\u002F\u002F Instead of:\nif (value > 0.5) {\n  color = colorA;\n} else {\n  color = colorB;\n}\n\n\u002F\u002F Use:\ncolor = mix(colorB, colorA, step(0.5, value));\n```\n\n## TSL (Three.js Shading Language) - Future Direction\n\nTSL is the new shader authoring system for Three.js, designed to work with both WebGL and WebGPU renderers. GLSL patterns above are **WebGL-only** and will not work with the WebGPU renderer.\n\n### TSL Quick Start\n\n```javascript\nimport { MeshStandardNodeMaterial } from \"three\u002Faddons\u002Fnodes\u002FNodes.js\";\nimport {\n  uv, sin, timerLocal, vec4, color, positionLocal, normalLocal,\n  float, mul, add\n} from \"three\u002Faddons\u002Fnodes\u002FNodes.js\";\n\nconst material = new MeshStandardNodeMaterial();\n\n\u002F\u002F Animated color based on UV and time\nconst time = timerLocal();\nmaterial.colorNode = color(sin(add(uv().x, time)), uv().y, 0.5);\n\n\u002F\u002F Vertex displacement\nmaterial.positionNode = add(\n  positionLocal,\n  mul(normalLocal, sin(add(positionLocal.x, time)).mul(0.1))\n);\n```\n\n### Key Differences from GLSL\n\n| GLSL (WebGL only)       | TSL (WebGL + WebGPU)         |\n| ----------------------- | ---------------------------- |\n| `ShaderMaterial`        | `MeshStandardNodeMaterial`   |\n| String-based shaders    | JavaScript node graph        |\n| `onBeforeCompile`       | Node composition             |\n| Manual uniforms         | `uniform()` node             |\n| `texture2D()`           | `texture()` node             |\n| `gl_Position`           | `positionNode`               |\n| `gl_FragColor`          | `colorNode` \u002F `outputNode`   |\n\n### When to Use What\n\n- **GLSL ShaderMaterial**: Existing WebGL projects, maximum shader control, porting existing shaders\n- **TSL NodeMaterial**: New projects, WebGPU support needed, cross-renderer compatibility\n\n## See Also\n\n- `threejs-materials` - Built-in material types\n- `threejs-postprocessing` - Full-screen shader effects\n- `threejs-textures` - Texture sampling in shaders\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","# Three.js Shaders\n\n## When to Use\n- You need custom shader logic in Three.js.\n- The task involves `ShaderMaterial`, uniforms, GLSL, vertex deformation, or fragment-based effects.\n- You are extending material behavior beyond what built-in materials provide.\n\n## Quick Start\n\n```javascript\nimport * as THREE from \"three\";\n\nconst material = new THREE.ShaderMaterial({\n  uniforms: {\n    time: { value: 0 },\n    color: { value: new THREE.Color(0xff0000) },\n  },\n  vertexShader: `\n    void main() {\n      gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n    }\n  `,\n  fragmentShader: `\n    uniform vec3 color;\n\n    void main() {\n      gl_FragColor = vec4(color, 1.0);\n    }\n  `,\n});\n\n\u002F\u002F Update in animation loop\nmaterial.uniforms.time.value = clock.getElapsedTime();\n```\n\n## ShaderMaterial vs RawShaderMaterial\n\n### ShaderMaterial\n\nThree.js provides built-in uniforms and attributes.\n\n```javascript\nconst material = new THREE.ShaderMaterial({\n  vertexShader: `\n    \u002F\u002F Built-in uniforms available:\n    \u002F\u002F uniform mat4 modelMatrix;\n    \u002F\u002F uniform mat4 modelViewMatrix;\n    \u002F\u002F uniform mat4 projectionMatrix;\n    \u002F\u002F uniform mat4 viewMatrix;\n    \u002F\u002F uniform mat3 normalMatrix;\n    \u002F\u002F uniform vec3 cameraPosition;\n\n    \u002F\u002F Built-in attributes available:\n    \u002F\u002F attribute vec3 position;\n    \u002F\u002F attribute vec3 normal;\n    \u002F\u002F attribute vec2 uv;\n\n    void main() {\n      gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n    }\n  `,\n  fragmentShader: `\n    void main() {\n      gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\n    }\n  `,\n});\n```\n\n### RawShaderMaterial\n\nFull control - you define everything.\n\n```javascript\nconst material = new THREE.RawShaderMaterial({\n  uniforms: {\n    projectionMatrix: { value: camera.projectionMatrix },\n    modelViewMatrix: { value: new THREE.Matrix4() },\n  },\n  vertexShader: `\n    precision highp float;\n\n    attribute vec3 position;\n    uniform mat4 projectionMatrix;\n    uniform mat4 modelViewMatrix;\n\n    void main() {\n      gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n    }\n  `,\n  fragmentShader: `\n    precision highp float;\n\n    void main() {\n      gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\n    }\n  `,\n});\n```\n\n## Uniforms\n\n### Uniform Types\n\n```javascript\nconst material = new THREE.ShaderMaterial({\n  uniforms: {\n    \u002F\u002F Numbers\n    floatValue: { value: 1.5 },\n    intValue: { value: 1 },\n\n    \u002F\u002F Vectors\n    vec2Value: { value: new THREE.Vector2(1, 2) },\n    vec3Value: { value: new THREE.Vector3(1, 2, 3) },\n    vec4Value: { value: new THREE.Vector4(1, 2, 3, 4) },\n\n    \u002F\u002F Colors (converted to vec3)\n    colorValue: { value: new THREE.Color(0xff0000) },\n\n    \u002F\u002F Matrices\n    mat3Value: { value: new THREE.Matrix3() },\n    mat4Value: { value: new THREE.Matrix4() },\n\n    \u002F\u002F Textures\n    textureValue: { value: texture },\n    cubeTextureValue: { value: cubeTexture },\n\n    \u002F\u002F Arrays\n    floatArray: { value: [1.0, 2.0, 3.0] },\n    vec3Array: {\n      value: [new THREE.Vector3(1, 0, 0), new THREE.Vector3(0, 1, 0)],\n    },\n  },\n});\n```\n\n### GLSL Declarations\n\n```glsl\n\u002F\u002F In shader\nuniform float floatValue;\nuniform int intValue;\nuniform vec2 vec2Value;\nuniform vec3 vec3Value;\nuniform vec3 colorValue;    \u002F\u002F Color becomes vec3\nuniform vec4 vec4Value;\nuniform mat3 mat3Value;\nuniform mat4 mat4Value;\nuniform sampler2D textureValue;\nuniform samplerCube cubeTextureValue;\nuniform float floatArray[3];\nuniform vec3 vec3Array[2];\n```\n\n### Updating Uniforms\n\n```javascript\n\u002F\u002F Direct assignment\nmaterial.uniforms.time.value = clock.getElapsedTime();\n\n\u002F\u002F Vector\u002FColor updates\nmaterial.uniforms.position.value.set(x, y, z);\nmaterial.uniforms.color.value.setHSL(hue, 1, 0.5);\n\n\u002F\u002F Matrix updates\nmaterial.uniforms.matrix.value.copy(mesh.matrixWorld);\n```\n\n## Varyings\n\nPass data from vertex to fragment shader.\n\n```javascript\nconst material = new THREE.ShaderMaterial({\n  vertexShader: `\n    varying vec2 vUv;\n    varying vec3 vNormal;\n    varying vec3 vPosition;\n\n    void main() {\n      vUv = uv;\n      vNormal = normalize(normalMatrix * normal);\n      vPosition = (modelViewMatrix * vec4(position, 1.0)).xyz;\n\n      gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n    }\n  `,\n  fragmentShader: `\n    varying vec2 vUv;\n    varying vec3 vNormal;\n    varying vec3 vPosition;\n\n    void main() {\n      \u002F\u002F Use interpolated values\n      gl_FragColor = vec4(vNormal * 0.5 + 0.5, 1.0);\n    }\n  `,\n});\n```\n\n## Common Shader Patterns\n\n### Texture Sampling\n\n```javascript\nconst material = new THREE.ShaderMaterial({\n  uniforms: {\n    map: { value: texture },\n  },\n  vertexShader: `\n    varying vec2 vUv;\n\n    void main() {\n      vUv = uv;\n      gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n    }\n  `,\n  fragmentShader: `\n    uniform sampler2D map;\n    varying vec2 vUv;\n\n    void main() {\n      vec4 texColor = texture2D(map, vUv);\n      gl_FragColor = texColor;\n    }\n  `,\n});\n```\n\n### Vertex Displacement\n\n```javascript\nconst material = new THREE.ShaderMaterial({\n  uniforms: {\n    time: { value: 0 },\n    amplitude: { value: 0.5 },\n  },\n  vertexShader: `\n    uniform float time;\n    uniform float amplitude;\n\n    void main() {\n      vec3 pos = position;\n\n      \u002F\u002F Wave displacement\n      pos.z += sin(pos.x * 5.0 + time) * amplitude;\n      pos.z += sin(pos.y * 5.0 + time) * amplitude;\n\n      gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);\n    }\n  `,\n  fragmentShader: `\n    void main() {\n      gl_FragColor = vec4(0.5, 0.8, 1.0, 1.0);\n    }\n  `,\n});\n```\n\n### Fresnel Effect\n\n```javascript\nconst material = new THREE.ShaderMaterial({\n  vertexShader: `\n    varying vec3 vNormal;\n    varying vec3 vWorldPosition;\n\n    void main() {\n      vNormal = normalize(normalMatrix * normal);\n      vWorldPosition = (modelMatrix * vec4(position, 1.0)).xyz;\n      gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n    }\n  `,\n  fragmentShader: `\n    varying vec3 vNormal;\n    varying vec3 vWorldPosition;\n\n    void main() {\n      \u002F\u002F cameraPosition is auto-provided by ShaderMaterial\n      vec3 viewDirection = normalize(cameraPosition - vWorldPosition);\n      float fresnel = pow(1.0 - dot(viewDirection, vNormal), 3.0);\n\n      vec3 baseColor = vec3(0.0, 0.0, 0.5);\n      vec3 fresnelColor = vec3(0.5, 0.8, 1.0);\n\n      gl_FragColor = vec4(mix(baseColor, fresnelColor, fresnel), 1.0);\n    }\n  `,\n});\n```\n\n### Noise-Based Effects\n\n```glsl\n\u002F\u002F Simple noise function\nfloat random(vec2 st) {\n  return fract(sin(dot(st.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\n\u002F\u002F Value noise\nfloat noise(vec2 st) {\n  vec2 i = floor(st);\n  vec2 f = fract(st);\n\n  float a = random(i);\n  float b = random(i + vec2(1.0, 0.0));\n  float c = random(i + vec2(0.0, 1.0));\n  float d = random(i + vec2(1.0, 1.0));\n\n  vec2 u = f * f * (3.0 - 2.0 * f);\n\n  return mix(a, b, u.x) + (c - a) * u.y * (1.0 - u.x) + (d - b) * u.x * u.y;\n}\n\n\u002F\u002F Usage\nfloat n = noise(vUv * 10.0 + time);\n```\n\n### Gradient\n\n```glsl\n\u002F\u002F Linear gradient\nvec3 color = mix(colorA, colorB, vUv.y);\n\n\u002F\u002F Radial gradient\nfloat dist = distance(vUv, vec2(0.5));\nvec3 color = mix(centerColor, edgeColor, dist * 2.0);\n\n\u002F\u002F Smooth gradient with custom curve\nfloat t = smoothstep(0.0, 1.0, vUv.y);\nvec3 color = mix(colorA, colorB, t);\n```\n\n### Rim Lighting\n\n```javascript\nconst material = new THREE.ShaderMaterial({\n  vertexShader: `\n    varying vec3 vNormal;\n    varying vec3 vViewPosition;\n\n    void main() {\n      vNormal = normalize(normalMatrix * normal);\n      vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n      vViewPosition = mvPosition.xyz;\n      gl_Position = projectionMatrix * mvPosition;\n    }\n  `,\n  fragmentShader: `\n    varying vec3 vNormal;\n    varying vec3 vViewPosition;\n\n    void main() {\n      vec3 viewDir = normalize(-vViewPosition);\n      float rim = 1.0 - max(0.0, dot(viewDir, vNormal));\n      rim = pow(rim, 4.0);\n\n      vec3 baseColor = vec3(0.2, 0.2, 0.8);\n      vec3 rimColor = vec3(1.0, 0.5, 0.0);\n\n      gl_FragColor = vec4(baseColor + rimColor * rim, 1.0);\n    }\n  `,\n});\n```\n\n### Dissolve Effect\n\n```glsl\nuniform float progress;\nuniform sampler2D noiseMap;\n\nvoid main() {\n  float noise = texture2D(noiseMap, vUv).r;\n\n  if (noise \u003C progress) {\n    discard;\n  }\n\n  \u002F\u002F Edge glow\n  float edge = smoothstep(progress, progress + 0.1, noise);\n  vec3 edgeColor = vec3(1.0, 0.5, 0.0);\n  vec3 baseColor = vec3(0.5);\n\n  gl_FragColor = vec4(mix(edgeColor, baseColor, edge), 1.0);\n}\n```\n\n## Extending Built-in Materials\n\n### onBeforeCompile\n\nModify existing material shaders.\n\n```javascript\nconst material = new THREE.MeshStandardMaterial({ color: 0x00ff00 });\n\nmaterial.onBeforeCompile = (shader) => {\n  \u002F\u002F Add custom uniform\n  shader.uniforms.time = { value: 0 };\n\n  \u002F\u002F Store reference for updates\n  material.userData.shader = shader;\n\n  \u002F\u002F Modify vertex shader\n  shader.vertexShader = shader.vertexShader.replace(\n    \"#include \u003Cbegin_vertex>\",\n    `\n    #include \u003Cbegin_vertex>\n    transformed.y += sin(position.x * 10.0 + time) * 0.1;\n    `,\n  );\n\n  \u002F\u002F Add uniform declaration\n  shader.vertexShader = \"uniform float time;\\n\" + shader.vertexShader;\n};\n\n\u002F\u002F Update in animation loop\nif (material.userData.shader) {\n  material.userData.shader.uniforms.time.value = clock.getElapsedTime();\n}\n```\n\n### Common Injection Points\n\n```javascript\n\u002F\u002F Vertex shader chunks\n\"#include \u003Cbegin_vertex>\"; \u002F\u002F After position is calculated\n\"#include \u003Cproject_vertex>\"; \u002F\u002F After gl_Position\n\"#include \u003Cbeginnormal_vertex>\"; \u002F\u002F Normal calculation start\n\n\u002F\u002F Fragment shader chunks\n\"#include \u003Ccolor_fragment>\"; \u002F\u002F After diffuse color\n\"#include \u003Coutput_fragment>\"; \u002F\u002F Final output\n\"#include \u003Cfog_fragment>\"; \u002F\u002F After fog applied\n```\n\n## GLSL Built-in Functions\n\n### Math Functions\n\n```glsl\n\u002F\u002F Basic\nabs(x), sign(x), floor(x), ceil(x), fract(x)\nmod(x, y), min(x, y), max(x, y), clamp(x, min, max)\nmix(a, b, t), step(edge, x), smoothstep(edge0, edge1, x)\n\n\u002F\u002F Trigonometry\nsin(x), cos(x), tan(x)\nasin(x), acos(x), atan(y, x), atan(x)\nradians(degrees), degrees(radians)\n\n\u002F\u002F Exponential\npow(x, y), exp(x), log(x), exp2(x), log2(x)\nsqrt(x), inversesqrt(x)\n```\n\n### Vector Functions\n\n```glsl\n\u002F\u002F Length and distance\nlength(v), distance(p0, p1), dot(x, y), cross(x, y)\n\n\u002F\u002F Normalization\nnormalize(v)\n\n\u002F\u002F Reflection and refraction\nreflect(I, N), refract(I, N, eta)\n\n\u002F\u002F Component-wise\nlessThan(x, y), lessThanEqual(x, y)\ngreaterThan(x, y), greaterThanEqual(x, y)\nequal(x, y), notEqual(x, y)\nany(bvec), all(bvec)\n```\n\n### Texture Functions\n\n```glsl\n\u002F\u002F GLSL 1.0 (default) - use texture2D\u002FtextureCube\ntexture2D(sampler, coord)\ntexture2D(sampler, coord, bias)\ntextureCube(sampler, coord)\n\n\u002F\u002F GLSL 3.0 (glslVersion: THREE.GLSL3) - use texture()\n\u002F\u002F texture(sampler, coord) replaces texture2D\u002FtextureCube\n\u002F\u002F Also use: out vec4 fragColor instead of gl_FragColor\n\n\u002F\u002F Texture size (GLSL 1.30+)\ntextureSize(sampler, lod)\n```\n\n## Common Material Properties\n\n```javascript\nconst material = new THREE.ShaderMaterial({\n  uniforms: {\n    \u002F* ... *\u002F\n  },\n  vertexShader: \"\u002F* ... *\u002F\",\n  fragmentShader: \"\u002F* ... *\u002F\",\n\n  \u002F\u002F Rendering\n  transparent: true,\n  opacity: 1.0,\n  side: THREE.DoubleSide,\n  depthTest: true,\n  depthWrite: true,\n\n  \u002F\u002F Blending\n  blending: THREE.NormalBlending,\n  \u002F\u002F AdditiveBlending, SubtractiveBlending, MultiplyBlending\n\n  \u002F\u002F Wireframe\n  wireframe: false,\n  wireframeLinewidth: 1, \u002F\u002F Note: >1 has no effect on most platforms (WebGL limitation)\n\n  \u002F\u002F Extensions\n  extensions: {\n    derivatives: true, \u002F\u002F For fwidth, dFdx, dFdy\n    fragDepth: true, \u002F\u002F gl_FragDepth\n    drawBuffers: true, \u002F\u002F Multiple render targets\n    shaderTextureLOD: true, \u002F\u002F texture2DLod\n  },\n\n  \u002F\u002F GLSL version\n  glslVersion: THREE.GLSL3, \u002F\u002F For WebGL2 features\n});\n```\n\n## Shader Includes\n\n### Using Three.js Shader Chunks\n\n```javascript\nimport { ShaderChunk } from \"three\";\n\nconst fragmentShader = `\n  ${ShaderChunk.common}\n  ${ShaderChunk.packing}\n\n  uniform sampler2D depthTexture;\n  varying vec2 vUv;\n\n  void main() {\n    float depth = texture2D(depthTexture, vUv).r;\n    float linearDepth = perspectiveDepthToViewZ(depth, 0.1, 1000.0);\n    gl_FragColor = vec4(vec3(-linearDepth \u002F 100.0), 1.0);\n  }\n`;\n```\n\n### External Shader Files\n\n```javascript\n\u002F\u002F With vite\u002Fwebpack\nimport vertexShader from \".\u002Fshaders\u002Fvertex.glsl\";\nimport fragmentShader from \".\u002Fshaders\u002Ffragment.glsl\";\n\nconst material = new THREE.ShaderMaterial({\n  vertexShader,\n  fragmentShader,\n});\n```\n\n## Instanced Shaders\n\n```javascript\n\u002F\u002F Instanced attribute\nconst offsets = new Float32Array(instanceCount * 3);\n\u002F\u002F Fill offsets...\ngeometry.setAttribute(\"offset\", new THREE.InstancedBufferAttribute(offsets, 3));\n\nconst material = new THREE.ShaderMaterial({\n  vertexShader: `\n    attribute vec3 offset;\n\n    void main() {\n      vec3 pos = position + offset;\n      gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);\n    }\n  `,\n  fragmentShader: `\n    void main() {\n      gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\n    }\n  `,\n});\n```\n\n## Debugging Shaders\n\n```javascript\n\u002F\u002F Check for compile errors\nmaterial.onBeforeCompile = (shader) => {\n  console.log(\"Vertex Shader:\", shader.vertexShader);\n  console.log(\"Fragment Shader:\", shader.fragmentShader);\n};\n\n\u002F\u002F Visual debugging\nfragmentShader: `\n  void main() {\n    \u002F\u002F Debug UV\n    gl_FragColor = vec4(vUv, 0.0, 1.0);\n\n    \u002F\u002F Debug normals\n    gl_FragColor = vec4(vNormal * 0.5 + 0.5, 1.0);\n\n    \u002F\u002F Debug position\n    gl_FragColor = vec4(vPosition * 0.1 + 0.5, 1.0);\n  }\n`;\n\n\u002F\u002F Check WebGL errors\nrenderer.debug.checkShaderErrors = true;\n```\n\n## Performance Tips\n\n1. **Minimize uniforms**: Group related values into vectors\n2. **Avoid conditionals**: Use mix\u002Fstep instead of if\u002Felse\n3. **Precalculate**: Move calculations to JS when possible\n4. **Use textures**: For complex functions, use lookup tables\n5. **Limit overdraw**: Avoid transparent objects when possible\n\n```glsl\n\u002F\u002F Instead of:\nif (value > 0.5) {\n  color = colorA;\n} else {\n  color = colorB;\n}\n\n\u002F\u002F Use:\ncolor = mix(colorB, colorA, step(0.5, value));\n```\n\n## TSL (Three.js Shading Language) - Future Direction\n\nTSL is the new shader authoring system for Three.js, designed to work with both WebGL and WebGPU renderers. GLSL patterns above are **WebGL-only** and will not work with the WebGPU renderer.\n\n### TSL Quick Start\n\n```javascript\nimport { MeshStandardNodeMaterial } from \"three\u002Faddons\u002Fnodes\u002FNodes.js\";\nimport {\n  uv, sin, timerLocal, vec4, color, positionLocal, normalLocal,\n  float, mul, add\n} from \"three\u002Faddons\u002Fnodes\u002FNodes.js\";\n\nconst material = new MeshStandardNodeMaterial();\n\n\u002F\u002F Animated color based on UV and time\nconst time = timerLocal();\nmaterial.colorNode = color(sin(add(uv().x, time)), uv().y, 0.5);\n\n\u002F\u002F Vertex displacement\nmaterial.positionNode = add(\n  positionLocal,\n  mul(normalLocal, sin(add(positionLocal.x, time)).mul(0.1))\n);\n```\n\n### Key Differences from GLSL\n\n| GLSL (WebGL only)       | TSL (WebGL + WebGPU)         |\n| ----------------------- | ---------------------------- |\n| `ShaderMaterial`        | `MeshStandardNodeMaterial`   |\n| String-based shaders    | JavaScript node graph        |\n| `onBeforeCompile`       | Node composition             |\n| Manual uniforms         | `uniform()` node             |\n| `texture2D()`           | `texture()` node             |\n| `gl_Position`           | `positionNode`               |\n| `gl_FragColor`          | `colorNode` \u002F `outputNode`   |\n\n### When to Use What\n\n- **GLSL ShaderMaterial**: Existing WebGL projects, maximum shader control, porting existing shaders\n- **TSL NodeMaterial**: New projects, WebGPU support needed, cross-renderer compatibility\n\n## See Also\n\n- `threejs-materials` - Built-in material types\n- `threejs-postprocessing` - Full-screen shader effects\n- `threejs-textures` - Texture sampling in shaders\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n",{"name":5,"risk":24,"source":25,"description":7},"unknown","community","main","87afe6ce96220accf50a345dea46784c8c9f210e","YYC3-Skills-技能包\u002FYYC3-Skills-技能包-antigravity-awesome-skills\u002Fplugins\u002Fantigravity-awesome-skills\u002Fskills\u002Fthreejs-shaders",0,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base","https:\u002F\u002Fkb.yyc3.top\u002F","https:\u002F\u002Fgithub.com\u002FYYC-Cube","万象归元于云枢 | 深栈智启新纪元","2026-11-10 10:37:32",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill threejs-shaders",{"tool":41,"command":42},"bunx","bunx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill threejs-shaders",{"tool":44,"command":45},"pnpm","pnpm dlx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill threejs-shaders","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-antigravity-awesome-skills\u002Fplugins\u002Fantigravity-awesome-skills\u002Fskills\u002Fthreejs-shaders\u002FSKILL.md",true,[],[50,57,64,71,78,85],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M7CTDWHERCXPQCP0K03A86AS","vercel-sandbox","Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include \"Vercel Sandbox browser\", \"microVM Chrome\", \"agent-browser in sandbox\", \"browser automation on Vercel\", or any task requiring Chrome in a Vercel Sandbox.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fvercel-sandbox\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M7CTD8D2BNJY54S65M47HEJA","slack","Interact with Slack workspaces using browser automation. Use when the user needs to check unread channels, navigate Slack, send messages, extract data, find information, search conversations, or automate any Slack task. Triggers include \"check my Slack\", \"what channels have unreads\", \"send a message to\", \"search Slack for\", \"extract from Slack\", \"find who said\", or any task requiring programmatic Slack interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fslack\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7CTCSSB8ZP3Q58C3YZDZK1W","electron","Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include \"automate Slack app\", \"control VS Code\", \"interact with Discord app\", \"test this Electron app\", \"connect to desktop app\", or any task requiring automation of a native Electron application.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Felectron\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7CTCBJY76688V4DCZGWFHGQ","dogfood","Systematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to \"dogfood\", \"QA\", \"exploratory test\", \"find issues\", \"bug hunt\", \"test this app\u002Fsite\u002Fplatform\", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be handed directly to the responsible teams.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fdogfood\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7CTC4H0FFGVEAQR9PA4GA1A","agent-browser","Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to \"open a website\", \"fill out a form\", \"click a button\", \"take a screenshot\", \"scrape data from a page\", \"test this web app\", \"login to a site\", \"automate browser actions\", or any task requiring programmatic web interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fagent-browser\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7CTBKVFYBG78FDSABSDJTTQ","shadcn","Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn\u002Fui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for \"shadcn init\", \"create an app with --preset\", \"switch to --preset\", and for building a design system or applying a DESIGN.md or brand spec to shadcn\u002Fui.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-UI-界面组件\u002FYYC3-UI-界面组件-ui\u002Fskills\u002Fshadcn\u002FSKILL.md",[],[]]