# P5js

Create generative visual art and interactive sketches using p5.js, rendered as...

- Repository: https://github.com/taracodlabs/aiden (868 stars)
- Category: Engineering
- License: Apache-2.0
- Last updated: 2026-10-19
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add taracodlabs/aiden --skill p5js -g -a claude-code -y`
Codex: `npx skills add taracodlabs/aiden --skill p5js -g -a codex -y`
Cursor: `npx skills add taracodlabs/aiden --skill p5js -g -a cursor -y`
Gemini CLI: `npx skills add taracodlabs/aiden --skill p5js -g -a gemini-cli -y`

## Description

Create generative visual art and interactive sketches using p5.js, rendered as self-contained HTML files

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

# p5.js Generative Art and Creative Coding

Create generative visual art, animations, and interactive sketches using p5.js. Output is a self-contained HTML file that opens in any browser, no build step required.

## When to Use

- User wants generative or procedural visual art
- User wants an interactive animation or visualization
- User wants to visualize data in a creative, non-standard way
- User wants a screensaver-style animation
- User wants to experiment with creative coding

## How to Use

### 1. Basic p5.js HTML template

```html
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>p5.js Sketch</title>
  <style>body { margin: 0; background: #0d1117; overflow: hidden; }</style>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.9.0/p5.min.js"></script>
</head>
<body>
<script>
// Your p5.js sketch code goes here

function setup() {
  createCanvas(windowWidth, windowHeight);
  background(13, 17, 23);
}

function draw() {
  // Called every frame (~60fps)
}
</script>
</body>
</html>
```

### 2. Flowing particles sketch

```javascript
let particles = [];

function setup() {
  createCanvas(windowWidth, windowHeight);
  colorMode(HSB, 360, 100, 100, 100);
  background(220, 30, 10);
  for (let i = 0; i < 300; i++) {
    particles.push({ x: random(width), y: random(height), hue: random(180, 280) });
  }
}

function draw() {
  fill(220, 30, 10, 8);
  noStroke();
  rect(0, 0, width, height);

  for (let p of particles) {
    let angle = noise(p.x * 0.003, p.y * 0.003) * TWO_PI * 4;
    p.x += cos(angle) * 2;
    p.y += sin(angle) * 2;
    if (p.x < 0 || p.x > width || p.y < 0 || p.y > height) {
      p.x = random(width); p.y = random(height);
    }
    stroke(p.hue, 70, 90, 60);
    strokeWeight(1.5);
    point(p.x, p.y);
  }
}
```

### 3. Recursive fractal tree

```javascript
function setup() {
  createCanvas(800, 600);
  background(13, 17, 23);
  stroke(100, 200, 120, 180);
  translate(width / 2, height);
  branch(120);
}

The rest: https://github.com/taracodlabs/aiden/blob/HEAD/workspace-templates/skills/p5js/SKILL.md
