Dev.to AI πŸ€– Ai πŸ‘ 2 πŸ“– 4 min read

Your game is stuck inside a Claude artifact. Here's how to get it out.

You asked Claude for a game and it built one, right there in the side panel. It's good, and you've played it eleven times. The trouble is that it lives inside a chat. I work at Sekai, one of the places you can move it

You asked Claude for a game and it built one, right there in the side panel. It's good, and you've played it eleven times.

The trouble is that it lives inside a chat.

I work at Sekai, one of the places you can move it to. There are others and I'll mention them.

The share link is fine. For friends.

Claude can publish an artifact as a public link, and anyone who has it can open it and play without an account. If your goal is "my group chat should see this", you're done and you can close this tab.

It stops being enough the moment you want people you don't know. An artifact link isn't listed anywhere and nobody browses artifacts looking for something to play. It's also tied to that chat in your account, which is a strange place for a game to live long term.

Step one: get it out as a file

I just ask for it.

Give me this game as a single, self-contained index.html file I can download.

That one file is the whole game. It runs if you double-click it and it runs on almost any host.

If the game uses separate images or sounds, ask for a zip with index.html at the top level. That's the shape itch.io wants.

Same request works in ChatGPT. Whatever it was showing you in the chat, ask for it as one HTML file.

Step two: put it somewhere

You've got two routes from here.

The manual one is to take the file to itch.io, make a project, mark it as HTML and upload. That's about ten minutes, and you get a page you can decorate.

The lazy one, which is the one I use, is to not download anything at all. You connect a platform to Claude or ChatGPT and ask it to publish from the same chat. For Sekai that's Settings, Connectors, Add custom connector, paste https://mcp.sekai.ai/mcp, sign in. Then:

Publish this game to Sekai.

It uploads a draft, hands you a link to try, and publishes when you say so. PlayDrop and a few others work the same way with their own connectors.

Three things that break on the way out

A game that works in the artifact panel doesn't always survive the move, and in my experience it's nearly always one of these three.

The first one is the keyboard. The artifact was built and tested on your laptop and most places with players are phones, so I ask for touch controls before I move anything.

There's also a keyboard bug I'd never have guessed. On one of my games WASD did nothing for me while the arrow keys worked fine. It turned out my keyboard was switched to a Chinese input method, and the code was reading which character the key produced instead of which physical key it was. With an input method on, W isn't "w" any more.

The fix is one word. Read e.code instead of e.key:

// breaks under some keyboard layouts and input methods
if (e.key === 'w') moveUp();

// reads the physical key, wherever it is
if (e.code === 'KeyW') moveUp();

If any of your players type in Chinese, Japanese or Korean, or use a French keyboard, this is the difference between a game that works and one that looks dead. Assistants usually write the first version. Ask for the second.

The second is saving. High scores in localStorage are how most AI-written games remember things. Inside an app like Sekai that storage isn't there, and the platform uses its own save feature. Tell your assistant where the game is going and ask it to switch.

The third is loading things from elsewhere. A font from one site, a sound from another. In the artifact that was fine. On a platform that doesn't let games call outside servers, those requests fail and you get silence or a blank square. Ask for everything to be included, or use the platform's own asset library.

You don't have to fix these by hand. "Read Sekai's guide and fix whatever it asks for" does most of it.

The one that can't be moved as is

Some artifacts call Claude while you play. The game asks Claude to write the next bit of story, or to judge your answer.

Those only work inside Claude, and whoever is playing spends their own Claude allowance, so if you take the file anywhere else those calls simply stop.

You have two choices. Keep it as an artifact and share the link. Or ask Claude for a version where the content is written in advance, a fixed set of story branches for example, and move that one. It's a slightly different game, and sometimes a better one because it's fast.

What about Lovable, Replit, Cursor, Gemini?

Same idea, one catch. Lovable and Replit tend to build a full web app with a lot of files. Platforms like Sekai take a single HTML file. Ask for a one-file version of the game first, then publish that.

So

If it's only for friends, the share link is enough. If you want a page of your own or you want to charge for it, go to itch.io. If you want strangers to find it and you'd rather not leave the chat, connect a platform and ask.

Whichever you pick, try it on your phone before you tell anyone, and press W.

Has a game of yours broken on the way out of a chat? Tell me how. I'm keeping a list.

I used an AI assistant to help draft this post. The opinions, and any mistakes, are mine.

πŸ“° Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.