{"slug":"andy-p5js","title":"andy-p5js","summary":"AI-powered p5.js creative coding workflow - from inspiration to animation","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-11-12T21:41:46.547725Z","repo":{"url":"https://github.com/AIPMAndy/Andy-Video-Skill","stars":19,"forks":1,"license":"MIT","updatedAt":"2026-11-12T16:53:27Z"},"bodyHtml":"<h1>Andy-P5JS</h1>\n<div align=\"center\">\n<p><img src=\"./assets/logo.png\" alt=\"Andy-P5JS Logo\"></p>\n<p><strong>AI驱动的p5.js创意编码工作流 - 从灵感到动画一站式解决方案</strong></p>\n<p><a href=\"https://opensource.org/licenses/MIT\"><img src=\"https://img.shields.io/badge/License-MIT-yellow.svg\" alt=\"License: MIT\"></a>\n<a href=\"https://github.com/andyai/andy-p5js/releases\"><img src=\"https://img.shields.io/badge/version-1.0.0-blue.svg\" alt=\"Version\"></a>\n<a href=\"https://p5js.org/\"><img src=\"https://img.shields.io/badge/p5.js-1.7.0+-red.svg\" alt=\"p5.js\"></a></p>\n<p><a href=\"./README.md\">English</a> | <a href=\"./README_CN.md\">中文</a></p>\n</div>\n<h2>\uD83C\uDFAF What is Andy-P5JS?</h2>\n<p>Andy-P5JS is a complete AI-powered workflow for creative coding with p5.js, from inspiration discovery to final video output. It combines the best AI tools and platforms to streamline the entire creative process.</p>\n<h2>✨ Features</h2>\n<ul>\n<li>\uD83D\uDD0D <strong>Inspiration Discovery</strong> - Search quality templates from OpenProcessing</li>\n<li>\uD83E\uDD16 <strong>AI Code Generation</strong> - Generate high-quality code using Gemini 3.1 Pro Canvas</li>\n<li>\uD83D\uDC41️ <strong>Live Preview</strong> - Real-time preview and debugging in p5.js Web Editor</li>\n<li>⚡ <strong>Local Optimization</strong> - Deploy locally and enhance visual effects</li>\n<li>\uD83C\uDFA8 <strong>Visual Validation</strong> - Visual regression testing with testiv/snapstack</li>\n<li>\uD83C\uDFAC <strong>Video Output</strong> - Screen recording with Cap or video editing with ChatCut</li>\n</ul>\n<h2>\uD83D\uDD04 Standard Workflow</h2>\n<pre><code>Inspiration → AI Generation → Online Preview → Local Optimization → Visual Validation → Video Output\n     ↓              ↓               ↓                  ↓                    ↓                ↓\nOpenProcessing   Gemini      p5js.org         Local Server           MCP Tools       Cap/ChatCut\n</code></pre>\n<h2>\uD83D\uDE80 Quick Start</h2>\n<h3>Installation</h3>\n<ol>\n<li><strong>Install Claude Desktop</strong> (with Andy-P5JS skill)</li>\n</ol>\n<pre><code># Clone this repository\ngit clone https://github.com/andyai/andy-p5js.git\ncd andy-p5js\n\n# Copy skill to Claude skills directory\ncp -r skill.md ~/.claude/skills/andy-p5js/\n</code></pre>\n<ol start=\"2\">\n<li><strong>Configure MCP Servers</strong> (optional but recommended)</li>\n</ol>\n<p>Add to your <code>claude_desktop_config.json</code>:</p>\n<pre><code>{\n  \"mcpServers\": {\n    \"webbridge\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/webbridge/server.mjs\"],\n      \"env\": {\n        \"KIMI_WEBBRIDGE_URL\": \"http://127.0.0.1:10086\"\n      }\n    },\n    \"testiv\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@testiv/mcp\"]\n    },\n    \"snapstack\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"snapstack-server\"]\n    }\n  }\n}\n</code></pre>\n<h3>Usage</h3>\n<p><strong>In Claude Desktop:</strong></p>\n<pre><code>/andy-p5js\n</code></pre>\n<p>Or with specific requirements:</p>\n<pre><code>/andy-p5js Create a 3D particle explosion effect\n</code></pre>\n<h2>\uD83D\uDCD6 Complete Workflow Guide</h2>\n<h3>Step 1: Inspiration Search (OpenProcessing)</h3>\n<p>Visit <a href=\"https://openprocessing.org/\">OpenProcessing</a> to search for quality templates.</p>\n<p><strong>Search Tips:</strong></p>\n<ul>\n<li>Use English keywords (e.g., \"particle system\", \"3D animation\")</li>\n<li>Filter by likes/favorites</li>\n<li>Check the license before using</li>\n<li>Look for clear code structure</li>\n</ul>\n<h3>Step 2: AI Code Generation (Gemini Canvas)</h3>\n<p>Use the <strong>3-step prompt engineering method</strong>:</p>\n<p><strong>Step 1 - Generate Style Prompt:</strong></p>\n<pre><code>Generate a detailed visual style description for this p5.js animation:\n\nRequirements: [Your requirements]\n\nOutput:\n- Visual style (colors, lighting, atmosphere)\n- Animation effects (particle count, motion, interaction)\n- Technical details (3D/2D, physics, algorithms)\n</code></pre>\n<p><strong>Step 2 - Generate Code with Style:</strong></p>\n<pre><code>Generate complete p5.js animation code using this style:\n\n[Prompt from Step 1]\n\nRequirements:\n- Complete HTML file (with p5.js CDN)\n- Use WEBGL mode (if 3D)\n- Parameterized config (CONFIG object)\n- ES6 Class structure\n- Responsive design\n- Clear comments\n</code></pre>\n<p><strong>Step 3 - Verify and Optimize:</strong></p>\n<ul>\n<li>Preview directly in Gemini Canvas</li>\n<li>Adjust parameters until satisfied</li>\n<li>Copy complete code</li>\n</ul>\n<h3>Step 3: Online Preview (p5.js Web Editor)</h3>\n<p>Visit <a href=\"https://editor.p5js.org/\">p5.js Web Editor</a> for real-time preview and debugging.</p>\n<p><strong>Advantages:</strong></p>\n<ul>\n<li>No local setup required</li>\n<li>Real-time preview</li>\n<li>Built-in examples and docs</li>\n<li>Multi-file project support</li>\n<li>Easy sharing and embedding</li>\n</ul>\n<h3>Step 4: Local Deployment &amp; Optimization</h3>\n<p>Save code locally and start a dev server:</p>\n<pre><code># Save the HTML file\n# file: cosmic-dandelion.html\n\n# Start local server\npython3 -m http.server 8765\n\n# Open in browser\nopen http://localhost:8765/cosmic-dandelion.html\n</code></pre>\n<p><strong>Optimization Checklist:</strong></p>\n<ul>\n<li><input disabled=\"disabled\" type=\"checkbox\"> 3D effects smooth (use WEBGL)</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Colors harmonious (check color scheme)</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Animation natural (use easing and noise)</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Performance good (60fps target)</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Responsive works (windowResized)</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Parameters configurable (CONFIG object)</li>\n</ul>\n<h3>Step 5: Visual Validation (MCP Tools)</h3>\n<p>Use visual tools for quality assurance:</p>\n<pre><code>// testiv - Visual regression testing\ntestiv_capture(\"animation-baseline\")\ntestiv_compare(\"animation-baseline\", \"animation-optimized\")\n\n// snapstack - Screenshot management\nsnapstack_capture(\"keyframe-1\")\nsnapstack_timeline()\n\n// photopea - Image post-processing\nphotopea_open(\"animation-screenshot.png\")\n</code></pre>\n<h3>Step 6: Video Output</h3>\n<p><strong>Option A - Cap Screen Recording (Recommended):</strong></p>\n<ol>\n<li>Open Cap app</li>\n<li>Select browser window</li>\n<li>Start recording</li>\n<li>Stop and export</li>\n</ol>\n<p><strong>Option B - ffmpeg:</strong></p>\n<pre><code># Screen record on macOS\nffmpeg -f avfoundation -i \"1\" -t 30 -r 60 animation.mp4\n\n# Compress\nffmpeg -i animation.mp4 -c:v libx264 -crf 23 animation-compressed.mp4\n</code></pre>\n<p><strong>Option C - ChatCut Video Editing:</strong></p>\n<ul>\n<li>Visit <a href=\"https://app.chatcut.io/\">ChatCut</a></li>\n<li>Upload recorded video</li>\n<li>AI-assisted editing (subtitles, transitions, music)</li>\n<li>Export final version</li>\n</ul>\n<h2>\uD83C\uDFA8 Example Projects</h2>\n<h3>Cosmic Dandelion Animation</h3>\n<p>A beautiful 3D animation of birds flying away from a dandelion with particle effects.</p>\n<p><strong>Features:</strong></p>\n<ul>\n<li>500 birds with Fibonacci sphere distribution</li>\n<li>600 twinkling stars background</li>\n<li>100 atmospheric particles</li>\n<li>15-frame trail system</li>\n<li>Multi-layer glow effects</li>\n<li>Perlin noise flight paths</li>\n</ul>\n<p><strong>Files:</strong></p>\n<ul>\n<li><a href=\"./examples/cosmic-dandelion-3d.html\"><code>examples/cosmic-dandelion-3d.html</code></a> - Original version</li>\n<li><a href=\"./examples/cosmic-dandelion-enhanced.html\"><code>examples/cosmic-dandelion-enhanced.html</code></a> - Enhanced version</li>\n<li><a href=\"./examples/visual-test-suite.html\"><code>examples/visual-test-suite.html</code></a> - Side-by-side comparison</li>\n</ul>\n<p><strong>Preview:</strong></p>\n<p><img src=\"./assets/cosmic-dandelion.png\" alt=\"Cosmic Dandelion\"></p>\n<p><a href=\"./assets/cosmic-dandelion.mp4\">\uD83C\uDFAC Watch Video</a></p>\n<h2>\uD83D\uDEE0️ Technical Highlights</h2>\n<h3>Fibonacci Sphere Distribution</h3>\n<pre><code>// Evenly distribute points on a sphere\nconst phi = acos(1 - 2 * (index + 0.5) / total);\nconst theta = PI * (1 + sqrt(5)) * (index + 0.5);\n\nconst position = createVector(\n  sin(phi) * cos(theta),\n  sin(phi) * sin(theta),\n  cos(phi)\n);\n</code></pre>\n<h3>Multi-Layer Glow Effects</h3>\n<pre><code>// Render 3-5 layers of gradient glow\nfor (let r = 5; r &gt;= 1; r--) {\n  let alpha = map(r, 5, 1, 20, 150);\n  fill(glowColor + alpha.toString(16).padStart(2, '0'));\n  sphere(radius * (1 + r * 0.15));\n}\n</code></pre>\n<h3>Perlin Noise Natural Motion</h3>\n<pre><code>// Generate natural floating motion with noise\nlet noise = createVector(\n  map(noise(pos.x * 0.01, time * 0.1), 0, 1, -0.5, 0.5),\n  map(noise(pos.y * 0.01, time * 0.1), 0, 1, -0.5, 0.5),\n  map(noise(pos.z * 0.01, time * 0.1), 0, 1, -0.5, 0.5)\n);\nvelocity.add(noise);\n</code></pre>\n<h3>Trail System</h3>\n<pre><code>// Record position history\nthis.trail.push(this.pos.copy());\nif (this.trail.length &gt; CONFIG.trailLength) {\n  this.trail.shift();\n}\n\n// Render fading trail\nfor (let i = 0; i &lt; this.trail.length - 1; i++) {\n  let alpha = map(i, 0, this.trail.length, 0, 100);\n  stroke(color + alpha.toString(16).padStart(2, '0'));\n  line(trail[i].x, trail[i].y, trail[i].z,\n       trail[i+1].x, trail[i+1].y, trail[i+1].z);\n}\n</code></pre>\n<h2>\uD83D\uDCCA Quality Standards</h2>\n<h3>Visual Quality</h3>\n<ul>\n<li>✅ Cosmic-level beauty (depth, lighting, effects)</li>\n<li>✅ Harmonious colors (theme-appropriate palette)</li>\n<li>✅ Smooth animation (60fps, no stuttering)</li>\n<li>✅ Rich details (particles, trails, glows)</li>\n</ul>\n<h3>Code Quality</h3>\n<ul>\n<li>✅ Clear structure (Class-based architecture)</li>\n<li>✅ Parameterized config (easy to adjust)</li>\n<li>✅ Complete comments (key algorithms explained)</li>\n<li>✅ Responsive design (adapts to screen size)</li>\n</ul>\n<h3>Performance Standards</h3>\n<ul>\n<li>✅ Initial load &lt; 2s</li>\n<li>✅ Stable frame rate ≥ 60fps</li>\n<li>✅ Memory usage &lt; 200MB</li>\n<li>✅ CPU usage &lt; 50%</li>\n</ul>\n<h2>\uD83D\uDD17 Resources</h2>\n<ul>\n<li><strong>OpenProcessing</strong>: <a href=\"https://openprocessing.org/\">https://openprocessing.org/</a></li>\n<li><strong>p5.js Web Editor</strong>: <a href=\"https://editor.p5js.org/\">https://editor.p5js.org/</a></li>\n<li><strong>Gemini Canvas</strong>: <a href=\"https://gemini.google.com/app?hl=en_GB\">https://gemini.google.com/app?hl=en_GB</a></li>\n<li><strong>ChatCut</strong>: <a href=\"https://app.chatcut.io/\">https://app.chatcut.io/</a></li>\n<li><strong>p5.js Documentation</strong>: <a href=\"https://p5js.org/reference/\">https://p5js.org/reference/</a></li>\n<li><strong>p5.js Examples</strong>: <a href=\"https://p5js.org/examples/\">https://p5js.org/examples/</a></li>\n</ul>\n<h2>\uD83D\uDCA1 Best Practices</h2>\n<ol>\n<li><strong>Search First, Create Second</strong> - Learn from excellent works</li>\n<li><strong>AI-Assisted, Not Replaced</strong> - Use AI for initial version, manually refine</li>\n<li><strong>Online Debug, Local Deploy</strong> - Use online tools for rapid iteration</li>\n<li><strong>Parameterize Everything</strong> - Centralize all adjustable parameters in CONFIG</li>\n<li><strong>Performance First</strong> - 60fps is the baseline</li>\n<li><strong>Visual Validation Essential</strong> - Screenshot comparison for quantifiable improvements</li>\n</ol>\n<h2>\uD83D\uDC1B Troubleshooting</h2>\n<p><strong>Q: Gemini-generated code throws errors?</strong>\nA: Check p5.js version, ensure 1.7.0+, WEBGL mode requires full 3D API support.</p>\n<p><strong>Q: Animation stuttering?</strong>\nA: Reduce particle count, lower draw complexity, use object pooling for memory optimization.</p>\n<p><strong>Q: How to export high-quality video?</strong>\nA: Use Cap to record original video (60fps), then use ChatCut for lossless editing.</p>\n<p><strong>Q: Can I use OpenProcessing code directly?</strong>\nA: Most can be used, but check the license. Recommended as reference for learning.</p>\n<h2>\uD83D\uDCC8 Roadmap</h2>\n<ul>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Support Three.js advanced 3D rendering</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Integrate Tone.js audio visualization</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Support WebGL Shader customization</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Integrate ml5.js machine learning interaction</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Support VR/AR output formats</li>\n</ul>\n<h2>\uD83E\uDD1D Contributing</h2>\n<p>Contributions are welcome! Please feel free to submit a Pull Request.</p>\n<ol>\n<li>Fork the repository</li>\n<li>Create your feature branch (<code>git checkout -b feature/AmazingFeature</code>)</li>\n<li>Commit your changes (<code>git commit -m 'Add some AmazingFeature'</code>)</li>\n<li>Push to the branch (<code>git push origin feature/AmazingFeature</code>)</li>\n<li>Open a Pull Request</li>\n</ol>\n<h2>\uD83D\uDCC4 License</h2>\n<p>This project is licensed under the MIT License - see the <a href=\"LICENSE\">LICENSE</a> file for details.</p>\n<h2>\uD83D\uDC68‍\uD83D\uDCBB Author</h2>\n<p><strong>Andy AIPM</strong></p>\n<ul>\n<li>GitHub: <a href=\"https://github.com/andyai\">@andyai</a></li>\n</ul>\n<h2>\uD83D\uDE4F Acknowledgments</h2>\n<ul>\n<li><a href=\"https://p5js.org/\">p5.js</a> - The JavaScript library for creative coding</li>\n<li><a href=\"https://openprocessing.org/\">OpenProcessing</a> - Creative coding community</li>\n<li><a href=\"https://gemini.google.com/\">Gemini</a> - AI code generation</li>\n<li><a href=\"https://claude.ai/\">Claude</a> - AI assistant platform</li>\n<li><a href=\"https://www.kimi.com/\">Kimi WebBridge</a> - Browser automation</li>\n</ul>\n<hr>\n<div align=\"center\">\n<p><strong>⭐ Star this repo if you find it helpful!</strong></p>\n<p>Made with ❤️ by Andy AIPM</p>\n</div>\n","files":[{"path":"assets/cosmic-dandelion.png","sizeBytes":82708,"isText":false},{"path":"assets/visual-test-suite.png","sizeBytes":349571,"isText":false},{"path":"assets/workflow-demo.png","sizeBytes":445240,"isText":false},{"path":"examples/cosmic-dandelion-3d.html","sizeBytes":6649,"isText":false},{"path":"examples/cosmic-dandelion-enhanced.html","sizeBytes":7780,"isText":false},{"path":"examples/visual-test-suite.html","sizeBytes":6735,"isText":false},{"path":".gitignore","sizeBytes":469,"isText":false},{"path":"LICENSE","sizeBytes":1060,"isText":false},{"path":"package.json","sizeBytes":844,"isText":true},{"path":"PROJECT_SUMMARY.md","sizeBytes":8275,"isText":true},{"path":"README.md","sizeBytes":10746,"isText":true},{"path":"run-workflow.sh","sizeBytes":2735,"isText":true},{"path":"skill.md","sizeBytes":9820,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-11-12T21:41:58.659518Z","sha256":"2ABFA3720C6C82DAD0C9628A74EDE906CC12A612433FB1699A8E8DA145265DBA","sizeBytes":854749},"review":null,"source":{"repositoryUrl":"https://github.com/AIPMAndy/Andy-Video-Skill","path":"01-programmatic-animation/andy-p5js","license":"MIT","commit":"27683b8639c50ce8fb95cb82d135169b168d921a","subtreeSha":"CEB5A91CD9D594F10D92EF2EF129389A9397309F75D30E782DE435CA77D4F3B4","lastSyncedAt":"2026-11-12T21:41:45.99063Z"},"reviewedAt":"2026-11-12T21:43:54.451339Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/AIPMAndy/Andy-Video-Skill/tree/main/01-programmatic-animation/andy-p5js"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install aipmandy-andy-video-skill@llmmart"},{"target":"git","command":"git clone https://github.com/AIPMAndy/Andy-Video-Skill.git"}]}