Skip to main content
skill CX Codex

postfx-effects — Claude Code skill: what it does, how to install

postfx-effects is a Claude Code skill with post-processing recipes for React Three Fiber scenes, including depth of field, chromatic aberration, vignette, and film grain.

MIT 106 installs ★ 9 updated 2026-10-25

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Bbeierle12/Skill-MCP-Claude --skill postfx-effects -a claude-code
Open on GitHub

What postfx-effects does

This skill guides the AI assistant on configuring post-processing pipelines with @react-three/postprocessing and the core postprocessing package. It provides structured examples for chromatic fringing, camera focus with bokeh blur, CRT scanlines, tone mapping modes, and volumetric God Rays.

Beside single effects, it details full stacks such as a retro VHS look, cinematic grade, or dream sequence. The examples demonstrate tracking focus dynamically via camera distance and loading cube files with LookupTexture. Running these snippets requires @react-three/postprocessing and postprocessing installed in your project.

What it helps with

  • add camera lens fringing and glitch distortions to a 3D canvas
  • configure depth-of-field focus tracking on an arbitrary target mesh
  • apply LUT color grading files using tetrahedral interpolation
  • assemble a multi-pass retro VHS look with scanlines and noise

Example prompts for the agent

  • Set up an EffectComposer with subtle vignette and film grain for my canvas
  • Create a retro VHS stack with scanlines and chromatic aberration
  • Configure DepthOfField that dynamically tracks the targetRef object

How to install postfx-effects

1Skills CLI (Vercel)

npx skills add Bbeierle12/Skill-MCP-Claude --skill postfx-effects -a claude-code

2Manually: put the files in place

~/.claude/skills/postfx-effects/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/postfx-effects/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about postfx-effects

How to install postfx-effects in Claude Code?

Run npx skills add Bbeierle12/Skill-MCP-Claude --skill postfx-effects -a claude-code in your terminal.

What does postfx-effects do?

It gives your agent pattern references and component setups for post-processing shaders inside React Three Fiber scenes.

Which project dependencies are required?

Your application must have @react-three/postprocessing and postprocessing installed via npm.

Source text

SKILL.md · MIT
---
name: postfx-effects
description: Post-processing visual effects including chromatic aberration, vignette, depth of field, film grain, color grading, and LUT support. Use when adding cinematic polish, retro aesthetics, camera simulation, or atmospheric effects to 3D scenes. Essential for mood, style, and visual storytelling.
---

# Post-Processing Effects

Cinematic and stylistic effects using @react-three/postprocessing.

## Quick Start

```bash
npm install @react-three/postprocessing postprocessing
```

```tsx
import { Canvas } from '@react-three/fiber';
import { EffectComposer, ChromaticAberration, Vignette, Noise } from '@react-three/postprocessing';

function CinematicScene() {
  return (
    <Canvas>
      <Scene />
      <EffectComposer>
        <ChromaticAberration offset={[0.002, 0.002]} />
        <Vignette darkness={0.5} offset={0.3} />
        <Noise opacity={0.05} />
      </EffectComposer>
    </Canvas>
  );
}
```

## Core Effects

### Chromatic Aberration

RGB channel separation for lens distortion or glitch effects.

```tsx
import { ChromaticAberration } from '@react-three/postprocessing';
import { BlendFunction } from 'postprocessing';
import { Vector2 } from 'three';

// Subtle cinematic fringing
function SubtleChromaticAberration() {
  return (
    <ChromaticAberration
      offset={new Vector2(0.001, 0.001)}
      radialModulation
      modulationOffset={0.2}
    />
  );
}

// Intense glitch effect
function GlitchChromaticAberration() {
  const offsetRef = useRef();

  useFrame(({ clock }) => {
    if (offsetRef.current) {
      const glitch = Math.random() > 0.95 ? 0.01 : 0.002;
      offsetRef.current.offset.set(glitch, glitch * 0.5);
    }
  });

  return (
    <ChromaticAberration
      ref={offsetRef}
      offset={new Vector2(0.002, 0.002)}
      blendFunction={BlendFunction.NORMAL}
    />
  );
}
```

### Vignette

Darkened edges for focus and cinematic framing.

```tsx
import { Vignette } from '@react-three/postprocessing';

// Soft cinematic vignette
function CinematicVignette() {
  return (
    <Vignette
      offset={0.3}      // Distance from center before darkening
      darkness={0.5}    // How dark edges become
      eskil={false}     // Use natural vignette formula
    />
  );
}

// Harsh spotlight effect
function SpotlightVignette() {
  return <Vignette offset={0.1} darkness={0.9} eskil={true} />;
}
```

### Depth of Field

Simulated camera focus with bokeh blur.

```tsx
import { DepthOfField } from '@react-three/postprocessing';

// Focus on specific distance
function StaticDOF() {
  return (
    <DepthOfField
      focusDistance={0.02}
      focalLength={0.05}
      bokehScale={3}
      height={480}
    />
  );
}

// Focus follows target object
function TrackingDOF({ targetRef }) {
  const dofRef = useRef();
  const { camera } = useThree();

  useFrame(() => {
    if (targetRef.current && dofRef.current) {
      const distance = camera.position.distanceTo(targetRef.current.position);
      dofRef.current.target = distance;
    }
  });

  return <DepthOfField ref={dofRef} focusDistance={0} focalLength={0.02} bokehScale={2} />;
}
```

### Noise / Film Grain

```tsx
import { Noise } from '@react-three/postprocessing';
import { BlendFunction } from 'postprocessing';

// Subtle film grain
function FilmGrain() {
  return <Noise opacity={0.04} blendFunction={BlendFunction.OVERLAY} />;
}

// Heavy VHS noise
function VHSNoise() {
  return <Noise opacity={0.15} blendFunction={BlendFunction.SCREEN} />;
}
```

### Color Grading

```tsx
import { HueSaturation, BrightnessContrast } from '@react-three/postprocessing';

// Desaturated cinematic look
function CinematicGrade() {
  return (
    <>
      <HueSaturation hue={0} saturation={-0.2} />
      <BrightnessContrast brightness={-0.05} contrast={0.1} />
    </>
  );
}

// Warm sunset mood
function SunsetGrade() {
  return (
    <>
      <HueSaturation hue={0.05} saturation={0.15} />
      <BrightnessContrast brightness={0.02} contrast={0.05} />
    </>
  );
}

// Cold sci-fi atmosphere
function SciFiGrade() {
  return (
    <>
      <HueSaturation hue={-0.1} saturation={-0.1} />
      <BrightnessContrast brightness={-0.1} contrast={0.15} />
    </>
  );
}
```

### LUT (Lookup Table)

```tsx
import { LUT } from '@react-three/postprocessing';
import { LookupTexture } from 'postprocessing';

function LUTGrading() {
  const [lut, setLut] = useState(null);

  useEffect(() => {
    LookupTexture.createLookupTexture('/luts/cinematic.cube').then(setLut);
  }, []);

  if (!lut) return null;
  return <LUT lut={lut} tetrahedralInterpolation />;
}
```

### Tone Mapping

```tsx
import { ToneMapping } from '@react-three/postprocessing';
import { ToneMappingMode } from 'postprocessing';

function CinematicToneMapping() {
  return <ToneMapping mode={ToneMappingMode.ACES_FILMIC} />;
}
```

### Scanlines / CRT Effect

```tsx
import { Scanline } from '@react-three/postprocessing';

function CRTScanlines() {
  return <Scanline density={1.25} opacity={0.15} blendFunction={BlendFunction.OVERLAY} />;
}
```

### God Rays

```tsx
import { GodRays } from '@react-three/postprocessing';

function VolumetricLight() {
  const sunRef = useRef();

  return (
    <>
      <mesh ref={sunRef} position={[0, 5, -10]}>
        <sphereGeometry args={[1, 32, 32]} />
        <meshBasicMaterial color="#FFF8E0" />
      </mesh>

      <EffectComposer>
        {sunRef.current && <GodRays sun={sunRef.current} exposure={0.5} decay={0.9} blur />}
      </EffectComposer>
    </>
  );
}
```

## Combining Effects

### Cinematic Stack

```tsx
function CinematicStack() {
  return (
    <EffectComposer>
      <ToneMapping mode={ToneMappingMode.ACES_FILMIC} />
      <HueSaturation saturation={-0.15} />
      <BrightnessContrast brightness={-0.05} contrast={0.1} />
      <ChromaticAberration offset={[0.001, 0.001]} />
      <Vignette darkness={0.4} offset={0.3} />
      <Noise opacity={0.03} blendFunction={BlendFunction.OVERLAY} />
    </EffectComposer>
  );
}
```

### Retro VHS Stack

```tsx
function VHSStack() {
  return (
    <EffectComposer>
      <HueSaturation saturation={-0.3} />
      <BrightnessContrast contrast={0.2} />
      <ChromaticAberration offset={[0.005, 0.002]} />
      <Scanline density={1.5} opacity={0.1} />
      <Noise opacity={0.1} blendFunction={BlendFunction.SCREEN} />
      <Vignette darkness={0.6} offset={0.2} />
    </EffectComposer>
  );
}
```

### Dream Sequence Stack

```tsx
function DreamStack() {
  return (
    <EffectComposer>
      <DepthOfField focusDistance={0.01} focalLength={0.1} bokehScale={4} />
      <Bloom luminanceThreshold={0.3} intensity={0.8} />
      <HueSaturation saturation={0.2} hue={0.05} />
      <BrightnessContrast brightness={0.1} />
      <Vignette darkness={0.3} offset={0.4} />
    </EffectComposer>
  );
}
```

## Animated Effects

### Time-Driven Color Shift

```tsx
function TimeDrivenEffects() {
  const hueRef = useRef();
  const vignetteRef = useRef();

  useFrame(({ clock }) => {
    const t = clock.elapsedTime;
    if (hueRef.current) hueRef.current.hue = Math.sin(t * 0.1) * 0.1;
    if (vignetteRef.current) vignetteRef.current.darkness = 0.4 + Math.sin(t * 2) * 0.1;
  });

  return (
    <EffectComposer>
      <HueSaturation ref={hueRef} saturation={0} hue={0} />
      <Vignette ref={vignetteRef} darkness={0.4} offset={0.3} />
    </EffectComposer>
  );
}
```

### Audio-Reactive Effects

```tsx
function AudioReactiveEffects({ audioData }) {
  const chromaRef = useRef();
  const vignetteRef = useRef();

  useFrame(() => {
    if (!audioData) return;
    const bass = audioData[0] / 255;
    const mid = audioData[4] / 255;

    if (chromaRef.current) {
      const offset = 0.001 + bass * 0.005;
      chromaRef.current.offset.set(offset, offset * 0.5);
    }
    if (vignetteRef.current) {
      vignetteRef.current.darkness = 0.3 + mid * 0.3;
    }
  });

  return (
    <EffectComposer>
      <ChromaticAberration ref={chromaRef} offset={[0.001, 0.001]} />
      <Vignette ref={vignetteRef} darkness={0.4} offset={0.3} />
    </EffectComposer>
  );
}
```

## Temporal Collapse Theme

Effects stack for cosmic countdown aesthetic:

```tsx
function TemporalCollapseEffects() {
  const chromaRef = useRef();

  useFrame(({ clock }) => {
    if (chromaRef.current) {
      const pulse = Math.sin(clock.elapsedTime * 1.5) * 0.001;
      chromaRef.current.offset.set(0.002 + pulse, 0.001 + pulse * 0.5);
    }
  });

  return (
    <EffectComposer>
      <ToneMapping mode={ToneMappingMode.ACES_FILMIC} />
      <HueSaturation hue={-0.05} saturation={-0.1} />
      <BrightnessContrast brightness={-0.05} contrast={0.1} />
      <ChromaticAberration ref={chromaRef} offset={[0.002, 0.001]} />
      <Vignette darkness={0.5} offset={0.25} />
      <Noise opacity={0.02} blendFunction={BlendFunction.OVERLAY} />
    </EffectComposer>
  );
}
```

## Performance Tips

| Technique | Impact | Solution |
|-----------|--------|----------|
| Multiple blur effects | High | Combine DOF with bloom carefully |
| High DOF resolution | High | Use `height={480}` or lower |
| LUT loading | Medium | Preload, cache texture |
| Many effects | Medium | Order effects efficiently |

```tsx
function OptimizedEffects() {
  return (
    <EffectComposer multisampling={0}>
      <ToneMapping mode={ToneMappingMode.ACES_FILMIC} />
      <Vignette darkness={0.4} />
      <Noise opacity={0.02} />
      <Bloom intensity={1} mipmapBlur levels={4} />
    </EffectComposer>
  );
}
```

## Reference

- See `postfx-composer` for EffectComposer setup and render targets
- See `postfx-bloom` for dedicated bloom techniques
- See `postfx-router` for effect selection guidance

© Bbeierle12 · MIT · Bbeierle12/Skill-MCP-Claude

Similar skills

All skills for Frontend and UI →

From the same set19

The whole set →
software-architecture software-architecture — a skill that walks the agent through SOLID and Clean Architecture, with a bad and a good version of the same TypeScript code for each principle. CX Codex +1 150installs particles-physics particles-physics is a Claude Code skill that adds forces and velocity fields to particle motion in scenes with gravity, wind, attractors or turbulence. CX Codex +1 134installs r3f-fundamentals r3f-fundamentals guides setup of React Three Fiber scenes, Canvas configuration, lighting, camera rigs, and render loop logic in declarative JSX. CX Codex +1 125installs shader-noise shader-noise is a Claude Code skill with GLSL noise algorithms for generating organic textures, terrain, clouds, fire, and cellular patterns in shaders. CX Codex +1 121installs form-ux-patterns The form-ux-patterns skill guides the design of complex forms with grouped fields, step-by-step flows, and conditional inputs. Use it for checkout or onboarding experiences. CX Codex +1 120installs audio-reactive audio-reactive maps audio analysis data to visual parameters, CSS transforms, and 3D scenes. CX Codex +1 108installs gsap-router The gsap-router Claude Code skill routes GSAP animation requests to focused skills. It matches the task to core animation, sequencing, scroll effects, or React integration. CX Codex +1 102installs r3f-performance The r3f-performance Claude Code skill covers ways to improve React Three Fiber rendering. It activates for large 3D scenes or when investigating frame-rate drops. CX Codex +1 100installs

Project sponsors

Companies that keep this analytics open