Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
adriandarian avatar

Shader Operations

  • 1 installs
  • Updated May 15, 2026
  • adriandarian/3lens

shader-operations is a Claude Code skill that introspects shaders and render pipelines in 3Lens, covering variant analysis, GPU cost attribution and controlled shader mutations.

About

shader-operations is a Claude Code skill that introspects shaders and render pipelines in 3Lens. It lists shader variants, attributes GPU cost (compile time, per-frame execution, memory, variant count), and performs controlled, isolated shader mutations for A/B testing with before/after traces and revert commands. It also supports TSL (Three.js Shading Language) shader node-graph inspection through the 3lens CLI.

  • Introspects shaders and render pipelines in 3Lens via 3lens CLI commands
  • Analyzes shader variants, attributes GPU cost, and runs controlled shader mutations for A/B testing
  • Supports TSL (Three.js Shading Language) shader node-graph inspection

Shader Operations by the numbers

  • 1 all-time installs (skills.sh)
  • Ranked #218 of 247 Game Development skills by installs in the Skillselion catalog
  • Data as of Jul 7, 2026 (Skillselion catalog sync)
At a glance

shader-operations capabilities & compatibility

Capabilities
debugging · performance analysis · profiling
Use cases
debugging
From the docs

What shader-operations says it does

Introspect shaders and render pipelines in 3Lens. Use when analyzing shader variants, attributing shader costs, or performing controlled shader mutations for A/B testing.
SKILL.md
For TSL (Three.js Shading Language) shaders, additional introspection is available:
SKILL.md
npx skills add https://github.com/adriandarian/3lens --skill shader-operations

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1
Last updatedMay 15, 2026
Repositoryadriandarian/3lens

What it does

Analyze shader variants, attribute GPU cost, and A/B test controlled shader mutations in a 3Lens render pipeline.

Who is it for?

Analyzing shader variant explosion, attributing GPU cost, and A/B testing shader changes

Skip if: Non-3Lens rendering stacks or general application debugging unrelated to shaders

When should I use this skill?

Analyzing shader variants, attributing GPU cost to specific shaders, or performing controlled shader mutations in 3Lens

What you get

Variant lists, per-shader cost breakdowns and measured before/after deltas from isolated shader mutations

By the numbers

  • 4 cost-breakdown metrics: compile time, execution time per frame, memory footprint, variant count

Files

SKILL.mdMarkdownGitHub ↗

Shader Operations

Shader operations provide deep introspection into shaders and render pipelines, including variant analysis, cost attribution, and controlled mutation.

When to Use

  • Analyzing shader variant explosion
  • Attributing GPU cost to specific shaders
  • A/B testing shader changes
  • Understanding pipeline composition

Commands

List Shader Variants

# Get variants for a specific shader
3lens shader:variants <shaderId>

# List all variants sorted by compile count
3lens shader:variants --all --sort compile_count

Attribute Shader Cost

# Get cost for a specific shader
3lens shader:cost <shaderId>

# Get detailed breakdown
3lens shader:cost <shaderId> --breakdown

Cost breakdown includes:

  • Compile time
  • Execution time per frame
  • Memory footprint
  • Variant count

Mutate Shader (Controlled)

Perform controlled shader mutations for A/B testing:

# Toggle a feature and compare against baseline
3lens shader:mutate <shaderId> --toggle FEATURE_X --baseline runA

# Disable a shader node and measure impact
3lens shader:mutate <shaderId> --disable-node nodeId --measure

Mutation output:

  • Before/after trace
  • Delta report
  • Revert command

Shader Graph Integration

For TSL (Three.js Shading Language) shaders, additional introspection is available:

# Inspect shader node graph
3lens shader:graph <shaderId>

# Find all nodes contributing to a specific output
3lens shader:graph <shaderId> --trace-output color

Agent Use Cases

1. Variant analysis: "List all shader variants and identify which has the most compilations" 2. Cost attribution: "Break down the GPU cost for this PBR shader" 3. A/B testing: "Toggle FEATURE_REFLECTION off and measure the performance delta" 4. Optimization: "Find which shader node is most expensive"

Safety Notes

  • Mutations are isolated and don't affect production code
  • Always capture a baseline trace before mutating
  • Use the provided revert command to undo changes
  • Mutations work on both live sessions and saved traces

Additional Resources

  • For detailed command syntax, see .cursor/commands/
  • For shader graph contract, see .cursor/contracts/shader-graph.md

Related skills

FAQ

Are shader mutations safe to run?

Yes. Mutations are isolated and do not affect production code; you capture a baseline trace first and use the provided revert command to undo changes.

Does it support Three.js shaders?

Yes. For TSL (Three.js Shading Language) shaders, additional node-graph introspection is available via 3lens shader:graph.

Game Developmentfrontenddevops

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.