Paste this into ChatGPT, Claude, Gemini or any coding assistant, then describe the tool you want. Choose a self-contained HTML file, plain JavaScript (.js) script or standalone TypeScript (.ts) script for Kapsula 0.5.0. HTML can also be opened in a browser; .js scripts use the UI container supplied by Kapsula.
TypeScript prompt · JavaScript prompt · HTML prompt · JavaScript guide · Русская инструкция
Own projects require Kapsula Pro. Update Kapsula to 0.5.0 for standalone .ts import. Plain .js, saved-source editing and copyable code errors remain available.
One standalone .ts script, converted offline on your device. No full type checking, imports, npm or JSX/React. Guide and workout.ts → · Русская инструкция →
One script, no HTML wrapper or dependencies. Choose JavaScript (.js) when pasting. The script creates its own UI in #app.
Open project settings → Update code to edit saved HTML/JavaScript/TypeScript. Updating that project preserves its storage; keep your data format compatible. If code fails, use Copy the error for your AI, then send the error and source to your own chat yourself. There is no automatic AI upload or version rollback.
If an assistant wrote a plain browser page — the Notification API, a bare setInterval timer, localStorage — it opens in Kapsula but stays silent once the phone is locked, or says something like "notifications are not supported in this environment". That is the code, not a Kapsula limit. Paste the prompt above into the same chat and add: "Rewrite my previous HTML for Kapsula following these rules. Replace the Notification API and background timers with K.notify.schedule(), and localStorage with K.storage."
Assistants don't know Kapsula's bridge yet. The prompt teaches them the five things that make a page behave like an app: the sandbox rules, where state must live, how alarms are scheduled, the 16-alarm limit, and graceful fallback in a normal browser. Full details: bridge API reference.
Kapsula runs only code you add yourself. Nothing is sent to Kapsula's servers — there are none.
Try the complete focus-timer walkthrough: prompt, HTML download and phone test