**Show HN: Claude Built a Techno Track in JavaScript (No Libraries, Just Vibes)**

We actually built a full game, but people I showed it to were most surprised when I told them that the music was realtime, pure JS, and vibe coded; thus the title. Before reading, I'd recommend playing the game so that you can put the story in context. At work we've been evaluating LLMs to see if they can help us as engineers (I'm convinced they can, but we're still collectively playing around more). So the natural thought I had one evening after work was, hey, let me vibe code something for lulz. Vibe coding is when you forget everything about the program, forget your hard earned wisdom, forget best practices, and just come up with a prompt and ask an LLM to make the program for you instead of writing by hand. This was not really possible an year ago (for multiple reasons), but this is now very much possible. The term originated with Andrej Karpathy's tweet. After a phase of silliness, people realized this way of software engineering actually works for many tasks, and now are trying to see how to vibe code responsibly, e.g. see this talk by Anthropic. Vibe coding is not just for software. For example, people are vibing Mathematics True to the vibe spirit, I didn't even bother coming up with an idea, but instead picked one almost at random from the #idea channel we have in our Discord, a shower thought by our CEO Vishnu: Game to dismiss as many cookie banners as you can in 60s

I placed only one constraint on myself - I'll not edit anything by hand. The entire game should be LLM generated. Since I wanted the end result to be easily playable, I decided on a web based game, and started hacking around in a Claude artifact (a souped up version of a regular Claude chat that can also render an interactive web page).

Things didn't go well. Even before the euphoria of call to adventure had subsided, I'd hit the downward curve of the hero's arc. Claude immediately gave me a playable game, but it was meh, and I spent a few hours prompting it this way or that to elevate the game (both gameplay and visuals) before realising that I, rather we, Claude and I, were going around in circles.

Next evening I changed tack. Instead of asking it to give me a playable game, I asked it to give me a few conceptual variations first, with the thought of spending more energy on promising avenues.

It did give me variations, but still nothing sparked. The third day I thought of a mental picture of how I wanted the game to be like, without saying it aloud to Claude. The fourth evening too I tettered and tottered around for a few hours. I picked a visual direction which was okay, but struggled with getting the gameplay right. I asked it for variations on difficulty ramps, but again, nothing sparked. I was losing hope. I knew Claude could do it, what was frustrating me was that I was unable to formulate how to get it to do it. And there were the edges of those nagging doubts that maybe, indeed, Claude couldn't do it. It was the weekend. Emerging from the Zen of my Twitter feed, calm like a pond with fishes eating each other inside, I started a fresh chat (artifact), and gave Claude the following prompt, with a black and white Bauhaus-y image as a visual reference: I want to make a game where the player has to close as many gdpr cookie banners as they can in 30 seconds. The pacing of the game should be like WarioWare. The visual style should be like The prompt might look nonchalant, but every word, and the overall phrasing, was a culmination of all the previous takes. As a small example, along the way I'd realized 60 seconds was too long for a cookie clicker game, and had changed it to 30. I wasn't expecting it to work - if you see the full transcript of my interaction with Claude, you'll see how I absentmindedly said "A" first, had a typo in "lik" - which are things I normally wouldn't do, since they can slightly harm the context, but even before giving it the prompt I did remember feeling that I had a better understanding of the problem I was posing for Claude, and how to communicate it, as compared to the first take. One play through of the generated game, and I knew that we were 80% there. Which brings me to the first learning I'd like to share: When trying to vibe code, you need to be willing to iterate and refine your ideas over time, even when they seem silly or impractical at first.

At this point, I had a functional game that played music in the background, but no soundtrack. So I moved on to building a soundtrack for my game. But this time, I was going to use an LLM to generate it entirely from scratch. This time, I needed JavaScript code.

So, I asked Claude to generate some techno tracks and then gave me some prompts to modify the generated audio and give it back into a working form. I started asking Claude for variations like "Can you make the layer indicators as buttons so that I can experiment with different orders of introducing these elements 2. Can you change the pad to a continuous drone, something in which other parts of the composition can sit in"

I asked for more and more details in my prompt until it was almost a joke at this point.

I started launching Claude code instances in the folder that contained my game so I could tweak the generated song. Even here, it took me less than 5 minutes to tweak everything into place. And then... I had an HTML file which played the song when I clicked a button. To ELI5 - I didn't create an MP3 for the song. The entire song is generated on the fly using JavaScript code. I gave this HTML file containing the generated song to the original Claude artifact that was generating the game, asking it to integrate it into the gameplay, and it did almost in the first shot. I exported the resultant HTML file (now containing both the game and the soundtrack) into the file system, asked Vishnu to buy the consent.gg domain (I'd decided on the domain during the first day of brainstorming), and plonked that HTML file there.

At no step in the process did I write even a single character of code by hand. After deploying it, I wanted to make a few tweaks, e.g. add a meta description tag, but even for these I didn't open a text editor but instead launched a Claude code in the folder, asked it to read the entire HTML file into context, and make the changes I wanted.

If you're one of those folks who is angry about any of this, you're not realizing (a) what you're missing out because of your preconceptions, and (b) the fun I had in the entire process.