# Shader Gen

AI shader generator for WebGL video effects, transitions, masks, and color grading (LUT...

- Repository: https://github.com/0xsline/OpenChatCut (2832 stars)
- Category: Media
- License: AGPL-3.0
- Last updated: 2026-10-21
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add 0xsline/OpenChatCut --skill shader-gen -g -a claude-code -y`
Codex: `npx skills add 0xsline/OpenChatCut --skill shader-gen -g -a codex -y`
Cursor: `npx skills add 0xsline/OpenChatCut --skill shader-gen -g -a cursor -y`
Gemini CLI: `npx skills add 0xsline/OpenChatCut --skill shader-gen -g -a gemini-cli -y`

## Description

AI shader generator for WebGL video effects, transitions, masks, and color grading (LUT / 调色 / 电影感 / film look). Use when the user wants a video effect (滤镜 / 特效), a transition (转场 / crossfade / wipe / cube / 3d), a mask (蒙版 / 遮罩 / reveal), a zoom / push-in (推近 / 推镜头), or a color grade, try the built-in effects (zoom, builtin LUTs) before generating a new shader.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Shader Generator

Submit-only: creates a backend generation job, returns `jobId`. Use the `track_progress` tool for job lifecycle after submission.

**Always use `generate.ts` for new shaders.** Manual authoring is only for editing existing asset code, never as a fallback when generation fails.

## Catalog-first rule, try existing assets before generation

Before generating a shader, call `browse_library` unless the user names an exact asset id that is already visible in `read_project`.

`browse_library` is the source of truth for built-in effects, built-in transitions, and project effect/transition assets. Built-ins are stable global asset ids, not per-project DB assets, so they may not appear in `read_project` asset lists.

Apply catalog entries with `edit_item`, do **not** call `submit_shader`.

Good catalog searches:

```text
browse_library(query: "zoom")
browse_library(category: "transitions", query: "dissolve")
browse_library(category: "audio-fx")
```

Generate only when no catalog entry matches the user's intent closely enough.

### `builtin:zoom` is track-bound only, DO NOT use item-bound

The default effect mode is `"item-bound"` (attach to a single item via `targetItemId`). **`builtin:zoom` does NOT render in item-bound mode**, the renderer reads zoom data exclusively from track-bound effect items. An item-bound zoom inserts into the DB silently but shows nothing in preview.

Use `mode: "track-bound"` with `trackId` + `trackBoundFrom` + `trackBoundDurationInFrames`. These three fields are required.

```text
# Zoom on the entire video clip
edit_item(json: '{"adds":[{"type":"effect","assetId":"builtin:zoom","mode":"track-bound","trackId":"<clip-trackId>","trackBoundFrom":<clip-fromFrame>,"trackBoundDurationInFrames":<clip-durationInFrames>,"propertyOverrides":{"magnification":1.5,"shape":"hold"}}]}')

The rest: https://github.com/0xsline/OpenChatCut/blob/HEAD/src/agent/skills/shader-gen/SKILL.md
