← Back to Jones

A field kit for your AI

Create for Jones.

Give your AI the details that help an artifact feel at home in Jones: HTML that works offline, saved data that can sync, and light and dark themes that follow the app.

Start with a prompt

Copy this into your AI chat and replace the last line with what you want to build. To modify an artifact, attach its existing HTML and describe your changes.

Read the prompt
Create or modify the artifact described below for Jones. If I provide an existing artifact, preserve its purpose, behavior, and saved data while making the requested changes. Follow these compatibility requirements and recommendations.

## Jones compatibility

Deliver a complete, standalone HTML document with a title, UTF-8 charset, a mobile viewport, and a <meta name="description"> holding one short sentence (under about 110 characters) that says what the artifact does; Jones shows it on the artifact's card. Jones imports HTML and runs it with JavaScript in an iOS or Android WebView, usually from file://. Prefer inline CSS and JavaScript, embedded assets, and system fonts so the result works offline. If using a framework, include its built runtime; JSX, package imports, and a development server alone are not deliverables. Avoid required network calls, remote modules, service workers, and host-specific artifact APIs. Explain any essential online feature and provide an offline state.

Call standard web APIs; where the WebView lacks one, Jones supplies it under the same name, so the file works in a browser too:

- window.print() opens the system print sheet, which can also save a PDF, with beforeprint and afterprint around it.
- navigator.share() shares a title, text, a link, or one file.
- navigator.vibrate() plays as haptic taps on iOS.
- element.requestFullscreen() fills the screen and hides Jones's controls; listen for fullscreenchange, because the person can leave at any time.
- <a download> and blob: or data: links open the share sheet to save the file.
- navigator.geolocation asks with the artifact's name.

Notifications and speech recognition are unavailable; screen wake lock and orientation lock vary by device, so give them a fallback.

## Saved data and sharing

Use window.localStorage.getItem, setItem, and removeItem for all durable user data, including drafts. Serialize structured values with JSON. Restore and validate existing data before rendering or writing defaults; persist edits promptly instead of waiting for unload. Handle unavailable storage and invalid or unknown data without silently deleting or overwriting it. Do not replace localStorage or call Jones's native bridge.

Jones isolates localStorage per artifact, includes it in backups, and can sync it when the user enables Share & sync. In-memory state, sessionStorage, IndexedDB, cookies, and host APIs such as window.storage are outside Jones saved-data sync. Do not claim that saving locally enables cloud sync automatically or that a successful setItem confirms a cloud save.

Use stable keys for independently editable records or settings, within the key budget. Jones merges changes to different keys; competing edits to the same key require user resolution. A JSON object or array in one key is opaque and is not merged internally. Balance this against the 250-key limit; do not create an unbounded key per item. Use stable record IDs and avoid rewriting unchanged keys on startup. Remove only keys owned by the artifact, not localStorage.clear().

Stay comfortably below 250 keys, 512 characters per key, 128 Ki characters per value, and 512 KiB for the entire UTF-8 JSON snapshot (including keys and JSON overhead). Large images, files, and base64 data do not belong in saved state. The local bridge has its own character-based budget and may keep oversized writes only in memory; sync enforces the byte budget. A write succeeding does not prove it will survive reopening.

Received shared data is applied through a page reload once Jones considers it safe, not a live storage event or a custom API for the artifact. Rehydrate correctly on every load and save drafts as they change. Sharing is not a real-time collaborative database.

When modifying an artifact, inspect and preserve its existing keys and schemas. Use explicit, repeatable migrations only when needed; retain unreadable or newer-version data for recovery. Do not reset user data or change keys just to rename the UI. Existing paired devices can retain older HTML: keep data changes backward-compatible where practical and explain any required document update. HTML backup and saved-data history are independent.

## Appearance and interaction

Recommend light and dark palettes that follow the app automatically. Use CSS variables for page, surface, text, border, and accent colors, and style form controls and backgrounds in both modes. Honor html[data-relic-color-scheme="light"] and html[data-relic-color-scheme="dark"] first, with prefers-color-scheme as the fallback outside Jones. Use color-scheme so native controls match. For example:

    :root { color-scheme: light dark; --bg: #fafafa; --fg: #171717; }
    @media (prefers-color-scheme: dark) {
      :root:not([data-relic-color-scheme="light"]) { --bg: #171717; --fg: #fafafa; }
    }
    :root[data-relic-color-scheme="dark"] { --bg: #171717; --fg: #fafafa; }
    body { background: var(--bg); color: var(--fg); }

CSS responds to the marker automatically. If canvas or JavaScript needs theme changes, read document.documentElement.dataset.relicColorScheme first, fall back to matchMedia('(prefers-color-scheme: dark)'), and listen to both the media query's change event and window's reliccolorschemechange event (event.detail.colorScheme). Read the initial value rather than relying on catching an event emitted before your scripts. Keep any optional manual theme override separate from the default follow-app behavior.

Use responsive layouts, readable text, labeled controls, keyboard focus, comfortable touch targets, and reduced-motion support. Avoid hover-only actions and fixed desktop widths. Support portrait, landscape, and the on-screen keyboard. The artifact need not copy Jones's decorative styling.

It should feel like an app, not a web page that zooms. Set touch-action: manipulation on the page so a quick double tap on a button does not zoom in. Give every input, select, and textarea a font size of at least 16px, since a phone zooms into smaller text fields when they are focused and does not zoom back out. Keep the viewport meta at width=device-width, initial-scale=1 without disabling pinch zoom (no user-scalable=no or maximum-scale), so people who need to zoom still can.

## Printing

When paper is part of the artifact (cards, menus, invoices, CVs, worksheets, books), give it a visible Print button that calls window.print() directly from the tap. Jones has no browser menu to print from, and on phones the print sheet is also where a PDF is saved. Hide the button when window.print is missing. Write print styles for paper, not the phone screen:

- In @media print, hide controls, editors, navigation, hints, and anything that exists only for editing; print only what belongs on paper, such as the sheet, the grid, or the pages of the book.
- Reset colors to a light, ink-friendly palette inside @media print, overriding the dark tokens and data-relic-color-scheme, or a dark-mode page prints pale text on white.
- Browsers drop backgrounds when printing. Set print-color-adjust: exact (and -webkit-print-color-adjust: exact) on elements whose color carries meaning, and offer a toggle to leave decorative backgrounds off, to save ink or print on colored paper.
- Set @page size and margin for the intended paper (A4 or Letter, portrait or landscape) and size printed content in mm, cm, or pt. Units tied to the screen (vw, vh, cqw, fixed pixel widths from the phone layout, transform: scale) cut off or shrink content on paper.
- Let printed content flow: no fixed heights, overflow: hidden, or position: fixed; let long titles wrap. Use break-inside: avoid on cards, rows, and figures, break-after: avoid on headings, and break-before: page for each new sheet or page.
- Before calling print, wait for document.fonts.ready and images. Redraw canvases at print resolution, or swap them for images, in a beforeprint handler, and restore the screen layout on afterprint.

## Sound

Phone speakers click, pop, or crackle when Web Audio switches the output on and off, jumps a gain instantly, or clips. Create one AudioContext for the page, without a custom sampleRate, inside the first tap or key press, and reuse it; never create or close a context per sound. Route every voice through one master GainNode (about 0.5 or lower) and a DynamicsCompressorNode before the destination so overlapping sounds cannot clip; keep square and sawtooth waves quieter than sine.

Give every sound an envelope and schedule it slightly ahead: let t = ctx.currentTime + 0.02; start from gain.setValueAtTime(0.0001, t), ramp up over at least 5 ms, ramp back to 0.0001 before stopping, and stop the source only after the ramp ends. Never assign gain.value or frequency.value on a node that is playing; use setTargetAtTime with a 10–30 ms time constant, or cancelScheduledValues then ramps. Exponential ramps cannot reach 0; use 0.0001. A looped AudioBuffer (noise beds, drones) must end where it starts: crossfade its last 50–100 ms into its beginning, or it clicks once per loop.

Keep the context running while the page is visible, even between sounds or around speechSynthesis, so the output does not power down and snap after each sound: a started oscillator into a gain of 0 is enough. When the page is hidden, ramp the master gain to 0 over about 30 ms, then suspend; on return, resume in the next tap if the state is suspended or interrupted. Prefer built-in nodes and prebuilt AudioBuffers to ScriptProcessorNode or per-frame JavaScript synthesis, which underrun and crackle when the page is busy; for long ambient or generative audio, pass latencyHint: 'playback'.

## Verification and handoff

Check offline loading, narrow-screen interaction, both themes and theme changes, and reopening after saved edits. For printing, check the print preview or a printed PDF in both orientations, starting from both light and dark mode, with long titles and a full set of content. For sound, listen on a phone speaker for clicks as sounds start and end, when they overlap, and a second after the last one. For modifications, also check an existing-state fixture and a fresh install; verify malformed data is not destroyed. If sharing is relevant, check independent-key edits and same-key conflict expectations. Distinguish browser checks from actual Jones/device sync checks and report any checks you could not run.

Return the complete HTML file and a short explanation of saved data, any migration, and essential online dependencies. Explain how to import it into Jones via Add artifact (paste HTML or choose the .html file). For an existing artifact, preserve its saved data when replacing the document; advise backing up before incompatible migrations. Sharing must be enabled separately in Share & sync.

My artifact or requested changes:
[Describe what to build or change, and attach the existing HTML when modifying an artifact.]

Install the reusable skill

For an AI coding tool such as Codex or Claude Code, run this in your project’s terminal. You’ll need Node.js and npm. Choose your agent when the installer asks.

Add --global to use the skill across projects, or --agent codex to target Codex. Then ask your agent to use jones-artifacts to build or update your artifact.

Prefer to install it yourself? Save the skill as jones-artifacts/SKILL.md in your agent’s skills folder. Skills CLI instructions ↗

Read the skill
---
name: jones-artifacts
description: Create or modify standalone HTML artifacts for the Jones app, with offline operation, syncable localStorage data, and adaptive light and dark appearance. Use when an artifact is intended for import into Jones.
---

# Jones artifacts

Build or update the user's artifact for Jones. Preserve the requested features and design; apply the compatibility contract below. For modifications, inspect the supplied HTML and persistence model before editing. If source is unavailable, request it before making changes that depend on its structure or saved-data schema.

## Jones compatibility

Deliver a complete, standalone HTML document with a title, UTF-8 charset, a mobile viewport, and a <meta name="description"> holding one short sentence (under about 110 characters) that says what the artifact does; Jones shows it on the artifact's card. Jones imports HTML and runs it with JavaScript in an iOS or Android WebView, usually from file://. Prefer inline CSS and JavaScript, embedded assets, and system fonts so the result works offline. If using a framework, include its built runtime; JSX, package imports, and a development server alone are not deliverables. Avoid required network calls, remote modules, service workers, and host-specific artifact APIs. Explain any essential online feature and provide an offline state.

Call standard web APIs; where the WebView lacks one, Jones supplies it under the same name, so the file works in a browser too:

- window.print() opens the system print sheet, which can also save a PDF, with beforeprint and afterprint around it.
- navigator.share() shares a title, text, a link, or one file.
- navigator.vibrate() plays as haptic taps on iOS.
- element.requestFullscreen() fills the screen and hides Jones's controls; listen for fullscreenchange, because the person can leave at any time.
- <a download> and blob: or data: links open the share sheet to save the file.
- navigator.geolocation asks with the artifact's name.

Notifications and speech recognition are unavailable; screen wake lock and orientation lock vary by device, so give them a fallback.

## Saved data and sharing

Use window.localStorage.getItem, setItem, and removeItem for all durable user data, including drafts. Serialize structured values with JSON. Restore and validate existing data before rendering or writing defaults; persist edits promptly instead of waiting for unload. Handle unavailable storage and invalid or unknown data without silently deleting or overwriting it. Do not replace localStorage or call Jones's native bridge.

Jones isolates localStorage per artifact, includes it in backups, and can sync it when the user enables Share & sync. In-memory state, sessionStorage, IndexedDB, cookies, and host APIs such as window.storage are outside Jones saved-data sync. Do not claim that saving locally enables cloud sync automatically or that a successful setItem confirms a cloud save.

Use stable keys for independently editable records or settings, within the key budget. Jones merges changes to different keys; competing edits to the same key require user resolution. A JSON object or array in one key is opaque and is not merged internally. Balance this against the 250-key limit; do not create an unbounded key per item. Use stable record IDs and avoid rewriting unchanged keys on startup. Remove only keys owned by the artifact, not localStorage.clear().

Stay comfortably below 250 keys, 512 characters per key, 128 Ki characters per value, and 512 KiB for the entire UTF-8 JSON snapshot (including keys and JSON overhead). Large images, files, and base64 data do not belong in saved state. The local bridge has its own character-based budget and may keep oversized writes only in memory; sync enforces the byte budget. A write succeeding does not prove it will survive reopening.

Received shared data is applied through a page reload once Jones considers it safe, not a live storage event or a custom API for the artifact. Rehydrate correctly on every load and save drafts as they change. Sharing is not a real-time collaborative database.

When modifying an artifact, inspect and preserve its existing keys and schemas. Use explicit, repeatable migrations only when needed; retain unreadable or newer-version data for recovery. Do not reset user data or change keys just to rename the UI. Existing paired devices can retain older HTML: keep data changes backward-compatible where practical and explain any required document update. HTML backup and saved-data history are independent.

## Appearance and interaction

Recommend light and dark palettes that follow the app automatically. Use CSS variables for page, surface, text, border, and accent colors, and style form controls and backgrounds in both modes. Honor html[data-relic-color-scheme="light"] and html[data-relic-color-scheme="dark"] first, with prefers-color-scheme as the fallback outside Jones. Use color-scheme so native controls match. For example:

    :root { color-scheme: light dark; --bg: #fafafa; --fg: #171717; }
    @media (prefers-color-scheme: dark) {
      :root:not([data-relic-color-scheme="light"]) { --bg: #171717; --fg: #fafafa; }
    }
    :root[data-relic-color-scheme="dark"] { --bg: #171717; --fg: #fafafa; }
    body { background: var(--bg); color: var(--fg); }

CSS responds to the marker automatically. If canvas or JavaScript needs theme changes, read document.documentElement.dataset.relicColorScheme first, fall back to matchMedia('(prefers-color-scheme: dark)'), and listen to both the media query's change event and window's reliccolorschemechange event (event.detail.colorScheme). Read the initial value rather than relying on catching an event emitted before your scripts. Keep any optional manual theme override separate from the default follow-app behavior.

Use responsive layouts, readable text, labeled controls, keyboard focus, comfortable touch targets, and reduced-motion support. Avoid hover-only actions and fixed desktop widths. Support portrait, landscape, and the on-screen keyboard. The artifact need not copy Jones's decorative styling.

It should feel like an app, not a web page that zooms. Set touch-action: manipulation on the page so a quick double tap on a button does not zoom in. Give every input, select, and textarea a font size of at least 16px, since a phone zooms into smaller text fields when they are focused and does not zoom back out. Keep the viewport meta at width=device-width, initial-scale=1 without disabling pinch zoom (no user-scalable=no or maximum-scale), so people who need to zoom still can.

## Printing

When paper is part of the artifact (cards, menus, invoices, CVs, worksheets, books), give it a visible Print button that calls window.print() directly from the tap. Jones has no browser menu to print from, and on phones the print sheet is also where a PDF is saved. Hide the button when window.print is missing. Write print styles for paper, not the phone screen:

- In @media print, hide controls, editors, navigation, hints, and anything that exists only for editing; print only what belongs on paper, such as the sheet, the grid, or the pages of the book.
- Reset colors to a light, ink-friendly palette inside @media print, overriding the dark tokens and data-relic-color-scheme, or a dark-mode page prints pale text on white.
- Browsers drop backgrounds when printing. Set print-color-adjust: exact (and -webkit-print-color-adjust: exact) on elements whose color carries meaning, and offer a toggle to leave decorative backgrounds off, to save ink or print on colored paper.
- Set @page size and margin for the intended paper (A4 or Letter, portrait or landscape) and size printed content in mm, cm, or pt. Units tied to the screen (vw, vh, cqw, fixed pixel widths from the phone layout, transform: scale) cut off or shrink content on paper.
- Let printed content flow: no fixed heights, overflow: hidden, or position: fixed; let long titles wrap. Use break-inside: avoid on cards, rows, and figures, break-after: avoid on headings, and break-before: page for each new sheet or page.
- Before calling print, wait for document.fonts.ready and images. Redraw canvases at print resolution, or swap them for images, in a beforeprint handler, and restore the screen layout on afterprint.

## Sound

Phone speakers click, pop, or crackle when Web Audio switches the output on and off, jumps a gain instantly, or clips. Create one AudioContext for the page, without a custom sampleRate, inside the first tap or key press, and reuse it; never create or close a context per sound. Route every voice through one master GainNode (about 0.5 or lower) and a DynamicsCompressorNode before the destination so overlapping sounds cannot clip; keep square and sawtooth waves quieter than sine.

Give every sound an envelope and schedule it slightly ahead: let t = ctx.currentTime + 0.02; start from gain.setValueAtTime(0.0001, t), ramp up over at least 5 ms, ramp back to 0.0001 before stopping, and stop the source only after the ramp ends. Never assign gain.value or frequency.value on a node that is playing; use setTargetAtTime with a 10–30 ms time constant, or cancelScheduledValues then ramps. Exponential ramps cannot reach 0; use 0.0001. A looped AudioBuffer (noise beds, drones) must end where it starts: crossfade its last 50–100 ms into its beginning, or it clicks once per loop.

Keep the context running while the page is visible, even between sounds or around speechSynthesis, so the output does not power down and snap after each sound: a started oscillator into a gain of 0 is enough. When the page is hidden, ramp the master gain to 0 over about 30 ms, then suspend; on return, resume in the next tap if the state is suspended or interrupted. Prefer built-in nodes and prebuilt AudioBuffers to ScriptProcessorNode or per-frame JavaScript synthesis, which underrun and crackle when the page is busy; for long ambient or generative audio, pass latencyHint: 'playback'.

## Verification and handoff

Check offline loading, narrow-screen interaction, both themes and theme changes, and reopening after saved edits. For printing, check the print preview or a printed PDF in both orientations, starting from both light and dark mode, with long titles and a full set of content. For sound, listen on a phone speaker for clicks as sounds start and end, when they overlap, and a second after the last one. For modifications, also check an existing-state fixture and a fresh install; verify malformed data is not destroyed. If sharing is relevant, check independent-key edits and same-key conflict expectations. Distinguish browser checks from actual Jones/device sync checks and report any checks you could not run.

Return the complete HTML file and a short explanation of saved data, any migration, and essential online dependencies. Explain how to import it into Jones via Add artifact (paste HTML or choose the .html file). For an existing artifact, preserve its saved data when replacing the document; advise backing up before incompatible migrations. Sharing must be enabled separately in Share & sync.

Need an idea?

The idea atlas charts over a hundred artifacts to ask for — planners, greeting cards, shaders, games, and everyday tools — each with blanks to make it your own.

Bring the result into Jones

Ask your AI for the complete HTML file. In Jones, choose Add artifact and paste the HTML or select the saved .html file. Try the import with our example →

The guidance uses localStorage for saved data and preserves existing data when making changes. Sync is optional: enable Share & sync for the artifact in Jones when you want to share it.