Claude Code store tool builder - near-expiry stock logger
Build a near-expiry stock logger as a single HTML file, for use by store staff.
The usage context decides every trade-off here - read it before writing code:
- Staff open it on a phone or tablet at the shelf and finish logging an item in under 15 seconds
- Store connectivity is unreliable and often absent. The tool must work fully offline.
- Each day the manager wants to see what was logged, grouped by days remaining, and what
must be dealt with today
Hard constraints:
1. One .html file. Double-click to open. No server, no build step, no network.
2. No external CDN resources of any kind (offline they mean a blank page). Inline all styles
and scripts.
3. Persist to localStorage so data survives closing the tab.
4. Mobile first: tap targets large enough for a thumb, body text no smaller than 16px.
5. Interface language: whatever language the store staff speak - do not mix languages.
Features:
- Entry: product name, days remaining, quantity. Offer shortcut buttons for the most common
categories instead of a long dropdown.
- List: sorted by days remaining ascending. One day or less in red, two to three in amber.
- Summary: counts grouped by days remaining, plus a headline count of what must be handled today.
- Delete a single entry; clear today's data in one action.
Deliverable:
- Write the complete file first, then a "how to use" note of three sentences or fewer, written
for a staff member rather than a developer
- Then a self-check list, item by item, showing how you verified each hard constraint above -
especially constraint 2
- No frameworks, no build tooling, no multi-file output
Why a "tool builder" rather than "write me a page"
Generic coding-agent prompts (build a game, build a landing page) are plentiful. Industry store tools are almost non-existent, yet this is a real gap on the store floor: off-the-shelf software is too heavy for a quick log, and spreadsheets are painful on a phone.
The constraints section is the point - particularly constraint 2, "no external CDN resources". That one comes from a real failure: the page works on a developer machine, then shows a blank screen in a store with no connectivity, because the stylesheet was loaded from a CDN. Constraints that come from practice are what make the output usable.
Asking for a self-check mapped back to the hard constraints is what stops the agent from declaring "done" without evidence.