Email or username:

Password:

Forgot your password?
Top-level
Simon Willison

I have a similar set of custom instructions I use with Claude Artifacts to get it to produce mobile-friendly single page HTML apps that run without a build step

Never use React in artifactsβ€”always plain HTML and vanilla JavaScript and CSS with minimal dependencies.

CSS should be indented with two spaces and should start like this:

<style>
* {
  box-sizing: border-box;
}
Inputs and textareas should be font size 16px. Font should always prefer Helvetica.

JavaScript should be two space indents and start like this:

<script type="module">
// code in here should not be indented at the first level
11 comments
Simon Willison

@evan love Web Components - I often prompt it to create those directly, but I still want them all in a single file so I can easily copy and paste the whole lot out of the LLM at once

Evan Prodromou

@simon So, you don’t use an IDE with integrated AI, like VSCode with CoPilot or Cursor or Zed or whatever?

Simon Willison

@evan I use GitHub copilot but I get a ton of work done directly in Claude (with Artifacts) and ChatGPT (with Code Interpeter) pasting code back and forth

Evan Prodromou

@simon last question! Do you ever use a local Open Suorce model for code generation, and if so, which one?

Simon Willison

@evan both of them use so much memory that I have to shut down a bunch of Firefox tabs and VS code windows first - plus they're noticeably slower than the best hosted models

Kyle Howells

@simon @evan I also only use local models on flights really. However, I will say I've found the smaller Qwen2.5-coder models on Ollama to be good enough, and importantly fast enough for most simple boiler plate work without taking up all my ram to run them.

Simon Willison

@prem_k with Claude Artifacts you have to or it defaults to writing you a React component every time!

Prem Kumar Aparanji πŸ‘ΆπŸ€–πŸ˜

@simon true that ... I say some version of "native JavaScript without libraries as much as possible"

Go Up