lighting

lighting is a skill for Claude Code, Codex from Shellishack/3d-web-game-dev-skills. It costs 0 tokens per session (1,042 once invoked), scanned A, original, MIT.

A reusable lighting setup for outdoor 3D web games, including ambient and directional light, fog, shadows, sky elements, weather effects, and image-processing effects.

In plain words
What is it for?
Use it to build or update outdoor Babylon.js game environments with changing daylight, weather, fog, and cast shadows.
Why use it?
It keeps scene lighting setup in one place and separates initial configuration from frame-by-frame changes such as time of day.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/shellishack/3d-web-game-dev-skills/lighting
Any agent
npx skills add Shellishack/3d-web-game-dev-skills --skill lighting
Clone the repo
git clone --depth 1 https://github.com/Shellishack/3d-web-game-dev-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for lighting

README.md
[![agentmods](https://agentmods.dev/badge/skills/shellishack/3d-web-game-dev-skills/lighting.svg)](https://agentmods.dev/skills/shellishack/3d-web-game-dev-skills/lighting)
Your own site
<a href="https://agentmods.dev/skills/shellishack/3d-web-game-dev-skills/lighting"><img src="https://agentmods.dev/badge/skills/shellishack/3d-web-game-dev-skills/lighting.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,042 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01042
Opus 5 $0.00000 $0.00521
Sonnet 5 $0.00000 $0.00208
Haiku 4.5 $0.00000 $0.00104

Measured 4d ago against content hash 875cbf236fcd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

lighting scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

lighting/SKILL.md · 103 lines

How it starts

The opening of the file, as written. The whole thing — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Dynamic World Lighting

Use this skill when adding reusable outdoor lighting, fog, shadows, and post-processing to a 3D web game.

Pattern

Create lighting through a single world-environment module that returns a small lighting handle. The handle should contain ambient light, key directional light, shadow generator, optional sky material, optional celestial meshes, and post-processing pipeline references.

Keep setup and updates separate:

  • setup creates lights, shadow settings, fog defaults, sky material, and render pipeline
  • update computes time-of-day values and applies them every frame
import { Color3, DirectionalLight, HemisphericLight, Scene, ShadowGenerator, Vector3 } from '@babylonjs/core'

export interface LightingRig {
  ambient: HemisphericLight
  key: DirectionalLight
  shadows: ShadowGenerator
  weather: WeatherProfile
}

export interface WeatherProfile {
  fogBoost: number
  lightScale: number
  starScale: number
}

export function createLightingRig(scene: Scene, weather: WeatherProfile, shadowHalfSize: number): LightingRig {
  scene.fogMode = Scene.FOGMODE_EXP2
  scene.fogDensity = 0.006 + weather.fogBoost

  const ambient = new HemisphericLight('ambient-light', new Vector3(0.25, 1, 0.35), scene)
  ambient.intensity = 0.8
  ambient.specular = Color3.Black()

  const key = new DirectionalLight('main-directional-light', new Vector3(-0.3, -0.8, -0.25), scene)
  key.intensity = 1
  key.orthoLeft = -shadowHalfSize
  key.orthoRight = shadowHalfSize
  key.orthoTop = shadowHalfSize
  key.orthoBottom = -shadowHalfSize

  const shadows = new ShadowGenerator(2048, key)
  shadows.useBlurExponentialShadowMap = true
  shadows.blurKernel = 24

  return { ambient, key, shadows, weather }
}

Lighting Model

Use a hemispheric or ambient light for base readability and a directional light for sun/moon shadows. Drive both from a normalized cycle value in the range 0..1.

Typical update flow:

  1. Convert elapsed time to a cycle fraction.
  2. Map the fraction to an orbit angle.
  3. Calculate sun altitude and direction.
  4. Derive daylight and moonlight weights.
  5. Lerp light colors, fog color, ambient color, and shadow darkness.
  6. Move the directional light to match the active celestial source.

Read the full file on GitHub · 103 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 103 lines · 0 tokens per session scan A 875cbf236fcd

Subscribe to this mod's changes

lighting is a skill published in the GitHub repository Shellishack/3d-web-game-dev-skills (5 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,042 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

THREE.Terrain

Use this guide when an agent must build, modify, inspect, or document a terrain scene with THREE.Terrain. The library creates heightmapped Three.js terrain and provides procedural generators, filters, material blending, decoration tools, grass, image conversion, analysis, and seeded randomness.

IceCreamYou/THREE.Terrain · 0 tokens

cesiumjs-materials-shaders

CesiumJS materials and post-processing — Material, Fabric JSON, MaterialAppearance, ImageBasedLighting, PostProcessStage, PostProcessStageLibrary, bloom, depth of field, ambient occlusion, FXAA, tonemapping, BlendingState. Use when defining Fabric materials for entities or primitives, configuring PBR image-based…

CesiumGS/cesiumjs-skills · 83 tokens

cesiumjs-models-particles

CesiumJS models, glTF, and particle effects - Model, KHRmeshoptcompression, CAD glTF extensions, EdgeDisplayMode, ModelAnimation, ModelNode, ParticleSystem, emitters, GPM extensions. Use when loading compressed or CAD-style glTF/GLB models, controlling edge rendering, playing model animations, positioning particles…

CesiumGS/cesiumjs-skills · 87 tokens

kelly-invest-webull

Busabase-backed, read-only App-in-Skill portfolio dashboard that aggregates Webull brokerage holdings (accounts, positions, cash/margin, market value, unrealized P/L, day change, buying power). Use when the user invokes $kelly-invest-webull or /kelly-invest-webull, wants to review their Webull portfolio, holdings…

mr-kelly/skills · 124 tokens

hayba-new-scene

Use when the user asks to generate a new scene from scratch — coordinates moodboard → references → spatial planning → asset placement → physics validation → CLIP scoring.

zajalist/hayba · 38 tokens

dcc-mcp-skill-developer

Infrastructure skill - guide agents through designing, implementing, testing, and reviewing DCC-MCP adapter skill packages for Maya, Blender, 3ds Max, Houdini, Photoshop, ZBrush, Unreal, Unity, and custom studio hosts. Use when adding or changing SKILL.md, tools.yaml, scripts, server wiring, or adapter skill taxonomy…

dcc-mcp/dcc-mcp-houdini · 106 tokens