endueendue

Web App

Use when the user wants a small tool they can click, type into or change, such as a calculator, planner or tracker. For something people only read, save a page instead.

v2.0.0

What this skill does

The full instructions your agent follows. Nothing here is hidden behind sign-in.

Web App

How to build a small web app saved with save_app. Write the interface text in the user's language.

Where the app runs

  • It runs in a sandbox that loads only its own files and data:/blob: URLs. CDN scripts, web fonts, remote images and outside APIs are blocked.
  • So write plain HTML, CSS and JavaScript. Draw icons and charts with inline SVG or canvas, and keep the app's data in a JS file or inline JSON.
  • Browser storage (localStorage, IndexedDB) may be unavailable. Keep state in memory and wrap any storage access in try/catch.
  • Forms can't submit anywhere, so handle them in JavaScript. Don't use alert, confirm or prompt; ask on the page.

Layout

First decide who uses it, their one main task and the live result they came for. Then keep this order:

  1. Name and one line on what it does. No marketing cover.
  2. Live result, on the first screen of a phone and updated on every change. From 900px wide, it stays in view on the right (sticky) while the rest scrolls on the left.
  3. Main input.
  4. Items the user can add, edit and delete.
  5. Copy or use the result. If copying fails, show text to select.
  6. Restore the example, and clear all. Confirm both on the page.

Draw the live result in inline SVG or CSS so its shape shows the answer before anyone reads it: arrows between the people who pay and get paid, as thick as the amount; a ring or filling bar for progress; bars, a line or a schedule. A number with a plain list isn't enough. Print each value as text too.

Look

Set these as CSS variables, switch them with prefers-color-scheme, and use no other colors unless the user has a brand.

LightDark
page / card#fefdfb / #ffffff#141311 / #1d1c19
text / muted#18171a / #6a6668#f3f1ec / #b3afa5
line / input border#e8e6e5 / #878385#32302b / #858177
main button / its text#18171a / #ffffff#f3f1ec / #1c1a17
error#b80012#ff8484
result panel / its text / its drawing#18171a / #f3f1ec / #b6a3f5#221e2d / #f3f1ec / #b6a3f5
  • The result is the one dark panel, with 22px corners, its main number at 48px or more, and #cfc9d8 for small text. Everything else stays quiet, in 14-20px system font with tabular figures.
  • Other buttons use the card color and the input border. Set accent-color to the main button color.
  • 8px spacing steps, 14px corners on cards and 10px on controls, one main button per area. No gradients, shadows, emoji icons or colored edge stripes.
  • One transition of up to 200ms when the result changes, and none with prefers-reduced-motion.

Make it work

  • Open with the user's data, or with example data labeled as an example.
  • Every control works. Leave out anything that doesn't.
  • Keep calculations in functions apart from the page code. Count money in whole units and show who covers a remainder. Before saving, work through the user's expected values and one edge case by hand.
  • Show user text with textContent, never innerHTML.
  • Put each error next to its field with how to fix it, and move focus to the first one. Empty states say what to do next. Color is never the only sign.
  • At 360, 768 and 1280px: no sideways scrolling, 44px touch targets, a label on every control, visible focus, full keyboard use and 4.5:1 text contrast.

Saving

  • /index.html is the entry point. Link files with relative paths such as "./style.css" and "./app.js".
  • Use index.html, style.css and app.js, plus a data file only if it helps. Send them all in one save_app call with a short slug and a name; never save them one by one with save_output.
  • To change the app, call save_app again with the same slug; send only the files that changed (the others carry over).

Your reply

Two or three lines: what it does, how to use it and which values you checked. Never say it was tested in a browser unless it was.

Start for free

After signing up, add Web App to your agent in one click.

More skills