FREE one prompt · nothing to install to start

Teach any AI to write apps that run

One prompt. Paste it into ChatGPT, Claude, Cursor, or whatever you already use, and it writes correct Krate app code. Nothing to install to get started.

The prompt

Copy it, paste it, then ask for an app.

The prompt carries the real Krate API -- every function that exists, every capability an app may ask for, the rules that keep an app inside its sandbox, and two complete working apps as examples. It is generated from Krate's own source code, so it describes the toolchain that will actually build your app, not a summary someone wrote once and forgot.

About 56 KB of text. Long, deliberately -- it is the whole API. Or download it as a file.

Paste it as your first message, then ask for what you want in the next one. For example: a unit converter for cooking measurements, or a tool that explains a cron expression.

It works in a long-context chat. If your model has a small context window, the prompt may not fit -- use the local krate create route instead, which does not need one.

How it works

Three steps, and one honest catch.

Paste the prompt.

Start a fresh chat and paste the prompt as your first message. The model reads the API and the rules. It will usually just say it is ready.

Ask for an app.

Describe what you want in plain words. The model writes three complete files -- Cargo.toml, src/lib.rs, and manifest.toml -- and hands them to you. Save them into an empty folder.

Build it on your machine.

This is the step the chat cannot do for you. Run this in the folder you saved the files into. It builds the app, checks it only uses Krate APIs, and runs it once.

krate check-app .

If it prints OK, the app is real -- it compiled, it stayed inside the sandbox, and it ran. If it fails, it names the stage and the exact fix. Paste that failure back into the chat and the model corrects the code. That loop is the whole workflow.

The catch

The chat cannot compile anything.

A chat model has no compiler. It cannot build your app, cannot run it, and cannot check whether it stayed inside the sandbox. It can only write code that should work. The prompt tells the model this outright and instructs it not to claim otherwise, but it is worth knowing yourself.

So the build always happens on your machine, and krate check-app is what turns "the model wrote something" into "this actually works". It is not a formality -- it is the only thing in the loop that knows the truth.

You need Krate and the Rust build tools installed for that step. The make-an-app-with-AI guide covers that setup, and krate create will offer to install what is missing the first time you run it.

Which one to use

Krate Mode, or something else.

Coming

A Krate MCP server is being built. It will let a model start a build, watch it, and hand back the finished .krate without you copying anything -- the same loop as krate create, driven from inside your chat. Krate Mode is what works in the meantime, and it will keep working for tools that never get MCP support.

What to expect

Focused apps work. Sprawling ones do not.

Krate Mode is at its best with a single, clear app: a converter, a calculator, a timer, a small game, a formatter, a viewer. Both apps used to test this prompt -- a cooking measurement converter and a cron expression explainer -- built and ran correctly on the first try, with no corrections needed.

It will not one-shot a large, sprawling program from one sentence. Narrow the request, or build it a piece at a time.

Some things Krate apps genuinely cannot do, and a good answer says so rather than writing code that pretends: reach another person's device, run in the background when closed, or read your email and accounts. The prompt tells the model to refuse those plainly instead of producing a convincing-looking app over invented data.

Troubleshooting

If something goes wrong.

check-app says it failed at imports

The app reached the operating system somewhere it should not have, usually through a path that can crash. Paste the whole failure into the chat -- the prompt teaches the model what causes this and how to fix it. The usual culprits are format!, .unwrap(), square-bracket indexing, or a deleted krate dependency in Cargo.toml.

It says "no global memory allocator found"

The model removed the krate dependency from Cargo.toml, usually reasoning that the app does not call it. It is still required -- it supplies pieces the app cannot build without. Put it back, or tell the chat to restore it.

The paths in Cargo.toml are wrong

The prompt leaves them marked PREFIX because the correct path depends on your machine. The easy fix is to let Krate set the folder up first: run krate create "your app idea", which writes a working Cargo.toml with the right paths, then have the chat replace only src/lib.rs and manifest.toml.

The model invented a function that does not exist

Paste the compiler error back. The prompt lists every function that exists and tells the model not to invent calls, so pointing it at the failure usually fixes it in one turn. If it keeps guessing the same missing call, say plainly that the function does not exist and ask it to solve the problem another way.

The prompt does not fit in my chat

It is about 56 KB, which needs a reasonably long context window. If your model rejects it, use the local route instead: krate create "your app idea" hands the same reference to an AI running on your machine, with no context limit to work around.