Hacker News new | ask | show | jobs
by momojo 39 days ago
When exploring a new idea or tool, my go to prompt is

``` In a single index.html, no dependencies, sparse styling, create an app that <idea> ```

Even before AI, it's how I built small tools, and there's something lovely about being able to email my friends the tool, and tell them "If you want to make a change, toss it to your LLM!"

8 comments

This is the way!

It is incredible how far you get with a single HTML-file, containing styles and JS, when building dashboards, small apps and other utilities that can interact with an API or otherwise fetch data from somwhere.

I just drop it on my personal ~ folder on the shared server at work and voilà, everyone can check it out and use it immediately!

And you get sandboxxing for free! My company got tailscale recently, and its just the final cherry on top: `tailscale serve` my `/tools`, and I don't even have to worry about auth!
I never really thought about this use case before, and I feel a bit dumb because of that. It’s so obvious that it would be useful. My focus with LLMs so far has been on The App, not all the ancillary stuff around The App. All that ancillary stuff doesn’t have to be fully complete or polished and doesn’t have to handle every possible case. It just needs to be functional enough to be useful. When you’re done with it, throw it away and generate a new one tomorrow.
Same. When I iterate on a design for a new client, I create a simple index.html with inline CSS and when I'm satisfied with the result I take the file and insert it next to my project template files and just ask the LLM to take the design from index.html and work it in the template files.
Same - and always had been, really, even before LLM codegen. Always try it out in the smallest quickest simplest case first! You can always make it bigger and more complicated later.
A while back I figured out this trick and used it to crank out a bunch of calculators for analog electronics: https://cofree.coffee/~solomon/calculators/

its super convenient to be able to throw tools like this together and load them on a static site.

My manager does this and with a straight face comes to me after with it and goes “put this in production” and wonders why it takes more than 5 minutes.

I absolutely hate the absolute rot these tools have caused to people’s brains.

Last week, we discovered our 'AI-native' marketing VP put his team's entire documentation hub on a public Github Pages site for an entire week. This included prospect lists, meetings, marketing metrics like CaC/lead times, funnel metrics, etc. He did not solicit feedback from engineering and violated multiple points in our AI policy. Of course there will be no repercussions.
We had a CSM vibe code a dashboard and put it on publically avaiable unauthenticated Firebase. Leaked a bunch of customer PII.

We fired him.

He’s suing for wrongful termination and…homophobia.

People are completely cooked. These tools are too powerful and normies are too stupid to use them responsibily.

I have to draw a very sharp line in generating these kinds of tools, I treat them as single use throwaway things and do my best to never have anyone besides myself even see the tools themselves (e.g. reviewing some calculation results).

Else I fully expect to get saddled with turning a temporary thing for a very narrow problem into something production ready.

This is also what Claude does on web when you ask for html (it creates it as an artifact), so the model is probably really well trained for it.
I recommend allowing AI to use TailwindCSS and Alpine in the context, as this would generate great lightweight dynamic web pages.
I agree! I get much better results when I give LLMs some light architectural constraints such as to use tailwind and alpine.
I don't know why my comment was down voted. Can someone tell me why?
because the original prompt specifically said no dependencies, and now you've introduced two dependencies.