New to Claude Skills? Learn how to install them →

nexu-io on GitHub

Particle Galaxy

Free

Create stunning real-time particle galaxies with WebGL.

Get this skill

Free · Opens the source repo

What Particle Galaxy does

The Particle Galaxy skill allows developers to generate a visually captivating real-time particle system that fills the screen with dynamic GPU-rendered points. This skill leverages WebGL2 to compute particle positions directly on the GPU, eliminating the need for CPU-based loops over individual particles. As a result, it can handle tens of thousands of particles efficiently, rendering them in a single draw call. The output is a self-contained index.html file that can be easily integrated into web projects, providing an engaging visual element for applications or websites.

The skill is particularly useful for developers looking to create effects such as particle fields, starfields, or generative point systems. By utilizing the gl_VertexID to derive particle positions, users can achieve visually complex motion patterns like spiral galaxies, explosions, or attractor flows. The provided example demonstrates a working implementation with 50,000 points, showcasing the potential of this skill in creating immersive visual experiences without the overhead of traditional particle systems.

To get started, users should first read the example.html file to understand the structure and functionality of the skill. The workflow involves selecting a motion type for the particles, building the index.html, and customizing the visual overlay. The skill also includes built-in error logging for shader compilation, ensuring that any mistakes are caught early in the development process. Overall, the Particle Galaxy skill is ideal for developers and designers seeking to enhance their projects with sophisticated visual effects powered by modern web technologies.

When to use it

Use this skill when you need to implement a visually engaging particle system for web applications, particularly when performance is a concern due to a high number of particles.

When not to use it

This skill may not be suitable for projects that require extensive interactivity with individual particles or those that do not support WebGL2.

What you can build with it

Creating a Starfield Background

Use the Particle Galaxy skill to generate a starfield background for a space-themed web application, enhancing the visual appeal.

Visualizing Data with Particles

Integrate the particle system into a data visualization project where particles represent data points, adding a dynamic element to the display.

Developing a Game Scene

Implement the particle galaxy effect as part of a game scene, providing an immersive backdrop that reacts to gameplay events.

How to install Particle Galaxy

View source

1. Install with the skills CLI

npx skills add nexu-io/open-design/webgl-particle-galaxy --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by nexu-io

Particle Galaxy Skill

Produce a single self-contained index.html that renders a real-time particle system full-screen, with a clean typographic overlay on top. The signature move: compute each particle's position on the GPU so the CPU never loops over particles.

Why this is a powered artifact

Open Design detects getContext('webgl2') and renders this file in powered preview — a cross-origin-isolated iframe with allow-same-origin. The full GPU pipeline is available; you do not need to work around the opaque sandbox.

Resource map

webgl-particle-galaxy/
├── SKILL.md      ← you're reading this
└── example.html  ← a working 50,000-point WebGL2 galaxy (READ FIRST)

Workflow

Step 0 — Read the reference

Read example.html end to end. Note the shape: no vertex buffer — the vertex shader reads gl_VertexID, hashes it into a stable per-particle seed, and derives a log-spiral orbit with an inner-fast rotation curve. Points are drawn with gl.drawArrays(gl.POINTS, 0, N) in one call, additive-blended (blendFunc(ONE, ONE) with premultiplied color) so overlapping points glow.

Step 1 — Pick the motion

Choose a field the vertex shader can express cheaply from gl_VertexID + uTime:

  • Spiral galaxy (default): log-spiral arms, rotation curve speed ≈ k / (r + ε), thin disk.
  • Attractor / flow: curl or a strange-attractor step baked as a closed-form function of time.
  • Explosion / reform: interpolate between a seeded start and a target shape on a looping clock.

Step 2 — Build index.html

  • One file, zero external requests. Bind a VAO even with no attributes (some drivers require it).
  • Point size in the vertex shader (gl_PointSize), clamped and DPR-aware; soft round sprites via gl_PointCoord + a gaussian falloff in the fragment shader.
  • Additive blending on a dark clear color; premultiply the fragment color so blendFunc(ONE, ONE) reads as glow, not double-exposure.
  • Compile shaders with error logging (getShaderInfoLog / getProgramInfoLog) so a typo fails loudly.

Step 3 — Overlay + brand

  • Map the accent colors to the active DESIGN.md when one is present; otherwise a restrained dark palette with one vivid accent (the reference uses lime #63fe13 for the arms and a white-blue core).
  • Headline ≤ 15ch plus one supporting line. Never bury the particles behind the text.

Step 4 — Self-review (P0)

  • Renders continuously at ~60fps; the FPS badge updates.
  • Tens of thousands of points in a single draw call (no per-particle CPU loop).
  • No WebGL console errors; program links cleanly.
  • Resizes crisply on window resize (no stretching / blur).
  • Degrades to a message (not a blank page) if webgl2 is unavailable.

Frequently asked questions about Particle Galaxy

Similar skills