Free live workshop, coming soon: Zero to Two Working AI AgentsJoin the waiting list →

← Back to all free guides

Turn Your Tool into One File Anyone Can Open

If your students have to install something before they can start, some of them never start. Give them one file they double-click.

LevelIntermediate
Time2 to 4 hours with an AI assistant
ToolClaude Code
CostFree
SeriesShip AI Tools to Beginners, lesson 1
BEFORE: AN APPLIANCEInstall PythonOpen TerminalRun a commandSome never startAFTER: A RECIPE CARDOne .html fileDouble-clickOpens in any browserNothing to install
Before, a student had three things to set up. After, they double-click one file and it opens.
On this page
  1. 1. Why this matters
  2. 2. The options
  3. Let your AI assistant do it (copy-paste prompts)
  4. 3. The steps
  5. 4. What it doesn't do
  6. 5. Gotchas we actually hit
  7. 6. Checklist

Think of a recipe card and a kitchen appliance. An appliance has to be unboxed, plugged in and set up, and it only fits certain kitchens. A recipe card works in every kitchen the moment you pick it up. Most small tools built with AI are shipped as appliances: "install Python, open Terminal, run this command". This guide turns the appliance into a recipe card: one web page file that opens in any browser, on any computer, with nothing to install.

The worked example is a real one. A student dashboard for a workshop (a checklist, an interview that builds a one-page business profile, and ready-to-paste instructions) started as a small Python program that only ran on a Mac. It ended as one 62 KB file that opens on Windows, Mac, Chromebook and Linux.


Not a programmer? You don't have to write any of this yourself. Jump to "Let your AI assistant do it" and use the prompts. Your AI does the rewrite, you make the decisions and do the testing.

1. Why this matters

Every step between "I downloaded it" and "it works" loses people. For a tool that needs Python, a beginner on Windows has to:

  1. Find out what Python is.
  2. Install it from the right place. Typing python on Windows opens the Microsoft Store instead.
  3. Get past a security warning for the launcher file.
  4. Keep a black Terminal window open without knowing why.

A single web page has none of these steps. It also has a security benefit you can explain in one sentence: a web page opened from a file cannot install anything, cannot run programs and cannot read the computer's files. The student does not have to trust you as much.

It only works if your tool fits. Ask what the program actually does on the computer:

If your tool needs to... One file works?
Show pages, forms, checklists Yes
Remember what the person typed Yes, in the browser's own storage
Give the person a file Yes, as a download
Read a file the person picks Yes
Copy text for pasting somewhere else Yes
Change files on the computer by itself No. Hand that job to something else (see Step 5)
Run on a schedule, or while the page is closed No
Use a secret key to call a paid service No. A key inside a page is visible to anyone

2. The options

Approach Pros Cons
Keep the program, add a launcher for each system Keeps every feature. Small change. Windows students must install Python first. Each launcher gets a security warning. You need each system to test on.
Package the program inside an app (one for Mac, one for Windows) Keeps every feature. Nothing else to install. Unsigned apps get a harsher warning than a script. Signing costs about $99 a year for Apple plus a few hundred for a Windows certificate. Company security tools often block it.
Host it as a website Nothing to download. Works on phones. Students' answers sit on your server. You need hosting, accounts and a privacy policy. If it goes down, the class stops.
One web page file (this guide) Double-click and it works, on every system. Nothing installed. Works offline. The browser can be told to block all internet contact. Answers live in the browser until downloaded. The page cannot change files on the computer.

Quick decision: if your tool is forms, text and checklists, choose the single file. If it must change files by itself or run in the background, keep the program and add launchers. Choose a hosted website only if you are ready to look after other people's data.


Let your AI assistant do it (copy-paste prompts)

An AI that can edit files on your computer (Claude Code, for example) can do the whole rewrite. A chat-only AI can still write the page if you paste your existing code into it, but you will save the files yourself.

First, the safety rules

  • Work on a copy. The AI builds the new version in a new folder and never edits the old one.
  • No downloading and running. The finished page must not load anything from the internet: no fonts, no libraries, no tracking.
  • No secrets in the page. No passwords, no keys. Anyone can read a web page's contents.
  • You approve each command before it runs, and the AI explains it in plain words first.
  • Test with made-up data, never your real customers.
  • Finish with a test, and ask what was not tested. An honest "not tested" list is worth more than "it works".

Start prompt

I have a small tool in this folder that my students download. It needs
[Python / Node / an installer] and only runs on [Mac]. My students are
complete beginners on Windows, Mac and Chromebook.

Before changing anything, read the code and tell me in plain words:
1. Every job the program does on the computer.
2. Which of those jobs a single web page file could do instead.
3. Which jobs a web page cannot do, and what we could replace them with.
Do not write any code yet.

One prompt per step

Step 1, the plan:

Make a table: each job the program does now, and what would do that job
in a single web page with no server. Tell me what gets better and what
gets worse for a beginner. Recommend one approach.

Step 2, the build:

Build the single-page version in a NEW folder next to the old one. Do
not edit the old version. Rules:
- One HTML file. All styles and scripts inside it. Nothing loaded from
  the internet.
- Keep what the person types in the browser's storage, saved as they type.
- Add a line to the page that makes the browser block all network requests.
- Treat anything read from storage or from a file as untrusted: check it
  field by field and never put it on the page as raw HTML.

Step 3, the student's own copy:

Add a "Download my file" button that saves the person's work as one
plain text file they can read, and a "Load my file" button that brings
it back. Show a reminder at the top of the page until they have
downloaded the latest version.

Step 4, plain words:

My students have no idea what any of this is. Go through every sentence
on the page. Use full plain sentences. Explain each technical word the
first time. Add a "Your next step" box that always shows the one thing
to do now. Where they must paste, give the keys for Windows and for Mac.

Step 5, the jobs a page cannot do:

For each job the old program did that a web page cannot, give the
student a ready-made message to paste into their AI assistant that asks
it to do that job, keep a backup, and explain what it changed.

Final pass/fail check prompt

Test the finished page and give me a pass or fail for each line:
1. It opens with no errors.
2. Text typed into it is still there after closing and reopening the page.
3. A file saved with Download loads back with Load, word for word.
4. Three kinds of wrong file are refused with a plain message.
5. Pasted text containing a <script> tag shows as plain text.
6. A test network request from the page is blocked.
7. Nothing scrolls sideways at phone width.
Then list everything you could NOT test, and what I should try by hand.

If something goes wrong

The page is not working. Here is what I did, what I expected and what I
saw: [describe it]. Do not rewrite the page. Find the cause first, tell
me in plain words, then show me the smallest change that fixes it.

3. The steps

Step 1: List every job the program does

Read the program and write each job on its own line. In the example the list was short:

  1. Show the dashboard.
  2. Run an interview and build the profile from the answers.
  3. Save the profile and the checklist in a folder.
  4. Add the profile to one settings file, with a preview and a backup.

Jobs 1 to 3 moved into the page. Job 4 could not, and was handed to the student's AI assistant instead (Step 5).

Step 2: Put everything in one file

One .html file holds the layout, the styles and the script. Nothing is loaded from anywhere else, so there are no fonts or libraries to break.

Add this line near the top of the page. It tells the browser to refuse every network request the page tries to make:

<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'unsafe-inline'; style-src 'unsafe-inline'; img-src data:; base-uri 'none'; form-action 'none'">

In plain words: nothing may be loaded or contacted (default-src 'none'), except the script and styles written inside this same file. Now "your answers are never sent anywhere" is a rule the browser enforces, and you can say so to students truthfully.

Step 3: Keep what they type in the browser

Browsers give every page a small private notebook called local storage. Save to it as the person types, so closing the tab by accident loses nothing:

function persist() {
  try { localStorage.setItem("my-tool", JSON.stringify(data)); storageOk = true; }
  catch (e) { storageOk = false; }   // private window, or storage blocked
}

The try and catch matter. In a private window the notebook may be missing. When that happens, show a plain warning at the top of the page instead of failing silently.

When you read the notebook back, do not trust it. Rebuild the data field by field, keeping only what you expect: names of a sensible length, known section names, known checklist items.

Step 4: Give them a file that is theirs

The browser's notebook can be wiped: clearing history, switching browser or changing computer all lose it. So the student needs a copy they hold.

function download(name, text) {
  const url = URL.createObjectURL(new Blob([text], {type: "text/plain;charset=utf-8"}));
  const a = document.createElement("a"); a.href = url; a.download = name;
  document.body.appendChild(a); a.click(); a.remove();
  setTimeout(() => URL.revokeObjectURL(url), 4000);
}

Three choices made this work for beginners:

  • One file, plain text, ending in .txt. It opens with a double-click on every system. A .md or .json file makes Windows ask "how do you want to open this?".
  • The same file does every job. It is the backup, it is readable, and it is the file the student uploads to their AI.
  • A reminder stays at the top of the page until the latest version has been downloaded.

"Load my file" uses an ordinary file picker. The page can read only the one file the person chooses, nothing else on the computer.

Step 5: Hand off what a page cannot do

The old program edited a settings file by itself. A web page cannot. The replacement is a ready-made message the student pastes into their AI assistant, which can edit files and asks permission first. A good hand-off message says:

  1. Which file, in plain words.
  2. Save a copy of it first.
  3. Exactly what to add or replace, between two marker lines so it can be found and removed later.
  4. Leave everything else in the file alone.
  5. Tell me in one or two plain sentences what you changed.

Write a second message that undoes it.

Step 6: Write for someone who has no idea what is going on

  • Put a "Your next step" box at the top that always shows one thing.
  • Number the steps. One action per step.
  • Say which keys to press: Ctrl + V on Windows, Cmd + V on a Mac.
  • Add a button that opens the website they need, so they never type an address.
  • Add a short word list: each term in one plain sentence.
  • Ship a READ ME FIRST.txt beside the page: how to start, where the answers live, what to do if they go missing, how to remove it.

Step 7: Keep your editing simple

If the page includes long text you will want to reword later, keep that text in separate files and use a small build script to put it into the page. The students never see the script. In the example:

python3 build.py

This reads the text files, places them inside the page, and writes the finished single file. Only the author needs Python, and only to rebuild.

Step 8: Test it

A page opened straight from a file is awkward for automated testing. To test with an AI assistant, serve the folder on your own computer only:

python3 -m http.server 8931 --bind 127.0.0.1

This shows the folder at http://127.0.0.1:8931 to your computer and to nothing else. Stop it when you are done. Then run the pass/fail list from the prompt section above.

Afterwards, test by hand what automation could not: double-click the file on each system your students use, in each browser, and click Download once to see the file arrive.


4. What it doesn't do

  • It is not a backup service. If a student never downloads their file and clears their browser, the work is gone.
  • It does not follow them between devices. The file does that.
  • It cannot check its own hand-offs. The page cannot see whether the student's AI really made the change.
  • It does not update itself. A new version is a new file you send.

To undo it: the old version is untouched in its own folder. A student removes the tool by erasing its data from inside the page, then deleting the file.


5. Gotchas we actually hit

  • The test browser could not drive a page opened from a file. It could only show a still picture. Serving the folder locally (Step 8) fixed testing, but it means "opens by double-click" still has to be checked by hand.
  • The test browser did not save downloads. The Download button ran with no errors, yet no file appeared. Never report a download as working until you have seen the file.
  • A one-line style mistake made buttons two different sizes. font: 700 15px inherit is not valid, so the browser ignored it and buttons fell back to their small default. Writing the three parts separately (font-weight, font-size, font-family: inherit) fixed it.
  • Text placed inside a script can end the script early. If any included text contains </script>, the page breaks. The build script escapes </ to be safe.
  • A heading-finder can be fooled. When loading the student's file back, accept only the exact heading format the page writes itself. Be forgiving only with text pasted from an AI.
  • Leftover test data. After testing, clear the test entries from the browser's storage and delete any test files from Downloads.

6. Checklist

  • Every job the old program did is listed, with what replaces it
  • One .html file, nothing loaded from the internet
  • The page blocks its own network requests, and a test request was refused
  • Typing is saved as the person types
  • A plain warning appears if the browser cannot save
  • Download gives one readable .txt file
  • Load brings that file back, word for word
  • Wrong files are refused with a plain message
  • Pasted <script> text shows as plain text
  • A "Your next step" box, numbered steps, and a word list
  • A hand-off message, and an undo message, for each job the page cannot do
  • READ ME FIRST.txt beside the page
  • Opened by double-click on every system your students use
  • Download seen arriving in the Downloads folder
  • An honest "not tested yet" list kept with the project

Action Item

Start with step 1 and do it today.