A developer built one app in 12 JavaScript frameworks with Claude to compare the cost
Nolan Lawson had Claude Opus 5.5 build one app in 12 frameworks, five times each. Median cost ran from $2.67 to $4.97, and agents often skipped official tools.
Web developer Nolan Lawson has tested a question everyone argues about and few measure: which JavaScript framework costs least when an AI agent writes the code? In a blog post, Lawson had Claude Opus 5.5 build the same small Pokémon app in 12 frameworks, five times each. Median cost came to $2.67 for Hono+htmx and $4.97 for Angular, nearly double. The larger message is that framework choices can now rest on measurement instead of vibes.
What this is about
A JavaScript framework is the ready-made scaffolding used to build a website, a bit like choosing a prefabricated structure for a house. Developers have long picked one through habit and fashion. Now that agents write most of the code, a new measure appears. The agent reads and writes every line and pays in tokens, so a framework that needs more code or more research shows up directly on the bill. Recent rewrites justified as "better for agents" often offered no evidence.
How the experiment worked
Lawson defined a small content site using the PokéAPI, with search and filtering. The agent ran in a sandbox on Opus 5.5 at high effort. Each framework had its official MCP server or skill files where available. The result was checked against a conformance suite based on the accessibility tree, so the agent could not cheat the test. Tailwind and similar component libraries were banned, as was pre-generating static HTML. The agent was not told about the performance tests. Every framework ran five times and the median was taken, because model output is partly random.
Results
The cost ranking: Hono+htmx $2.67, Astro $2.76, Nuxt $2.82, plain Vite $2.98, Next.js $3.14, Qwik $3.27, TanStack Start $3.54, SolidStart $3.79, React Router $3.81, SvelteKit $4.28, Gracile+Lit $4.65 and Angular $4.97. These are API-price figures and differ from what Lawson actually paid. Variance is large: React Router's cheapest run beat the most expensive Hono+htmx run.
Time and tokens tell a similar story. Astro took 8.2 minutes and Angular 17.2. Token use ranged from 3.85 million for Nuxt to 9.76 million for Angular. SvelteKit ran high because agents read the v3 migration guide every time, likely since that version is too new for the model's training data. Agents did not know Gracile well, so they cloned its repository or read compiled source. Angular's cost seems tied to the amount of code. In two of five runs the Angular agent built an app that rejected non-localhost requests, despite being told it would sit behind a reverse proxy.
Quality scores sat close together. Lighthouse performance ranged from 97 to 100, and accessibility hit 100 everywhere. The gap appeared in JavaScript shipped: 0 KiB for Astro, 18 KiB for Hono+htmx, 142 KiB for Next.js. Largest Contentful Paint under throttled mobile simulation was 810 ms for Astro and 2,090 ms for Next.js. Lines of code ran from 1,370 for Hono+htmx to 2,009 for Angular, and Lawson notes that lines now also mean token cost for every future edit.
Surprises and limits
The framework-free option was not the cheapest and trailed three frameworks. Tool use was erratic. Nuxt's MCP was never used, Next.js agents read the skill file in one of five runs, and TanStack Start's agent found its skill files in two of five. Lawson suspects the current crop of MCPs and skills may be doing more harm than good.
The experiment covers one small content app, so highly interactive software such as a Figma or Gmail could look different. Lighthouse is harsh on single-page apps. One model and one effort level were used. Lawson says openly that multi-page designs were expected to win. The benchmark is on GitHub. The stated goal is to show that decisions in the AI era can still rest on evidence, without naming a final winner.