Hand a template to a coding agent
A template gives an agent a finished design to work from. These prompts tell it what to keep, what to replace and how to check the result. Copy one, fill in the brackets and change the slug.
The facts your agent needs
Agents do well with a template when they know five things. Every prompt on this page carries them. If you write your own, include them.
- Where the files are
- One folder,
templates/<slug>/, withindex.html,style.css,script.jsandassets/. Online, the same paths underhttps://screeneryui.com/. Each file opens with a comment that explains its structure. - What to keep
- The tokens in
:root, the type, the layout, the class names and every state. An agent's instinct is to tidy a distinctive page into generic sections and cards. Say plainly that the design stays. - What to replace
- All of the content. Brands, people, quotes, prices and figures in the templates are fictional. Tell the agent what is true about your product and tell it not to invent the rest.
- What to delete
- The badge line at the end of
<body>:<script src="../../shared/badge.js" defer></script>. The zip downloads already have it removed. - How to check
- At 1440, 768 and 390 pixels wide: no horizontal scroll, no console errors, every state reachable with the keyboard. Nine templates take URL parameters that open a state directly, which saves the agent from typing its way into an error.
Three more things help. Give the agent the template's page, such as t/meridian/, which lists what is interactive. Tell it which dependencies exist: Google Fonts everywhere, Three.js 0.170.0 in Perihelion, Solstice '27 and Halo One, nothing else. And ask it to report what it could not verify.
The viewer's "Copy agent prompt" button gives you a short version of all this for the template you have open. If your agent supports skills, install the Screenery skill and it will know these rules without being told.
Let the agent pick the template
If you do not know which template you want, the agent can read the catalogue and choose. This prompt works for an agent that can fetch URLs.
I need [the screen: for example "a pricing page for a freelance invoicing tool"].
Read https://screeneryui.com/llms-full.txt and pick the Screenery template that fits best. Tell me which one and why in two sentences, and name the runner-up. Then fetch its index.html, style.css and script.js from https://screeneryui.com/templates/<slug>/ and the assets listed for it in https://screeneryui.com/registry.json, and wait for my go-ahead before adapting it.Adapt a landing page to a real product
Written for Meridian. It works for any of the eight landing pages: change the folder and the brand name. The important instructions are the second and the fifth: replace all the content, and do not invent facts to fill the space.
Build the landing page for my product from the Screenery template in templates/meridian/.
My product: [name, one sentence on what it does, who it is for, the one action a visitor should take].
Read all three files first: templates/meridian/index.html, style.css and script.js. Each opens with a comment that explains its structure. Then:
1. Copy the folder to [destination]. Delete the last line of <body> in index.html, the <script src="../../shared/badge.js" defer></script> tag.
2. Replace the content, not the design. Keep the section order, the grid, the type scale and every class name. Rewrite each headline, paragraph, table row and form label for my product. Meridian is a fictional brand: no sentence of its copy should survive.
3. Keep the tokens in the :root block of style.css. Only change colour values if I gave you brand colours, and re-check contrast (4.5:1 body, 3:1 large text) if you do.
4. Keep every state working: the phone menu, the form's inline validation, loading and success. Point the form at [endpoint, or say "leave the simulated submit and mark it TODO"].
5. Remove a section only if my product has nothing true to put in it. Do not invent customers, quotes, logos, prices or metrics. Where you need a fact you do not have, leave a clearly marked placeholder and list it for me at the end.
6. Update <title>, the meta description, theme-color and the inline SVG favicon.
When you are done, open the page at 1440, 768 and 390 pixels wide. Confirm there is no horizontal scroll, no console error and nothing left of the Meridian brand, then tell me what you changed and what still needs my input.Wire a dashboard to real data
Written for Tessel, whose charts are SVG drawn from seeded data in templates/tessel/script.js. Nocturne, Ledger & Lane and Harbor are built the same way: data first, then renderers, then behaviour. The method is to learn the shape the renderers expect and adapt your data to it, so the drawing code stays untouched.
Wire the Screenery dashboard in templates/tessel/ to my real data.
My data: [where it comes from: an endpoint, a query, a JSON file. Paste a sample response or the schema].
Read templates/tessel/index.html, style.css and script.js first. The comment at the top of script.js lists its three parts: seeded synthetic data, renderers, and behaviour.
1. Copy the folder to [destination] and delete the badge <script> tag at the end of <body>.
2. Find the seeded data in part 1 of script.js. Write down the exact shape each renderer reads (the anchor chart, the KPI rows, the cohort table, the funnel, the pages table, the dated log). Show me that shape before changing anything.
3. Write one adapter that turns my data into that shape. Replace the seeded generator with a fetch through the adapter. Do not change the renderers.
4. Keep every state the template already has and connect it to real conditions: the skeleton state while loading, the empty state when a table filter matches nothing, and add an error state in the same visual language for a failed request.
5. Keep the range switch (7, 30, 90 days) and the segment filter working. They are read from ?range= and ?segment= in the URL, so make them refetch or re-slice.
6. Keep the tokens, the layout and the dark theme under :root[data-theme="dark"]. Rename labels and segments to match my product. Remove a panel only if I have no data for it, and tell me.
7. Numbers: keep tabular figures, format currency and percentages for [locale], and make sure totals shown on screen add up.
Check at 1440, 768 and 390 pixels wide in both themes, with the keyboard only, and with the network request failing. Report what is real, what is still demo data, and anything in my data that did not fit.Wire sign in and sign up to a real auth backend
Written for Vesper (sign in) and Wayfarer Club (registration). Sesame and Foundry follow the same pattern. The templates already have every state a real backend produces. The job is to connect each state to a real response and remove what your backend does not support.
Wire the Screenery sign in page in templates/vesper/ and the registration form in templates/passport/ to my auth backend.
My backend: [provider or API: endpoints or SDK calls for sign in, sign up, magic link, passkey, password reset. Which of these I actually support].
Read each template's index.html, style.css and script.js first. Both scripts simulate the server. In vesper/script.js the submit section treats the password "wrong" as a failed sign in. In passport/script.js the address member@ternair.example is treated as already enrolled.
1. Copy both folders to [destination] and delete the badge <script> tag at the end of each <body>.
2. Replace each simulated request with a real call. Keep the functions that show loading, error and success, and call them from the real responses.
3. Map my backend's errors to the messages the templates already have: wrong credentials, an address that is already registered, a network failure, too many attempts. Write any new message in the same voice and say what to do next. Never reveal whether an email address exists unless my backend already does.
4. Remove the modes I do not support (magic link, passkey, social buttons) from the markup and the script together, and check that the layout still holds.
5. Keep client validation as a courtesy and treat the server as the authority. Keep the password rules in passport/ in step with my backend's rules: [rules].
6. Set autocomplete attributes correctly (username, current-password, new-password), keep the show and hide control, the caps lock warning and focus management. Do not log or store passwords or tokens.
7. On success, redirect to [path]. Keep the success moment the template has, shortened if needed.
8. Remove the ?state= and ?step= preview hooks from production builds, or keep them behind a development flag.
Do not change the tokens, type or layout. Check every state at 1440 and 390 pixels wide with the keyboard only: empty submit, invalid email, wrong password, network failure, success. Tell me which states you could not exercise against the real backend.Port a template to React or Next.js
Written for Harbor, a good test because it has real state. For a landing page you can ask for less: keep script.js and run it once after mount, as the docs describe. For Vue, Svelte or Astro, change the first line and the JSX step.
Port the Screenery template in templates/harbor/ to [React with Vite | Next.js App Router], in [TypeScript | JavaScript].
Read templates/harbor/index.html, style.css and script.js first, and open the original in a browser. It is the reference for the whole job.
1. Styles: copy style.css as it is and import it once, globally. Keep the :root tokens and every class name. Do not convert it to Tailwind, CSS-in-JS or a component library.
2. Markup: turn the contents of <body> into components along the template's own seams (the comment at the top of index.html lists them). Convert attributes for JSX: className, htmlFor, camel-cased SVG attributes, closed void elements.
3. State: script.js keeps its state in one object and renders from it. Make that object the component state, turn each render function into a component and each listener into an event handler. Do not leave querySelector calls or manual DOM writes behind, except where a ref is the right tool (focus, measuring, pointer capture for drag and drop).
4. Keep every behaviour: drag and drop with the "Move to" menu as the keyboard path, the undo toast, quick add with validation, the owner filter, search, the board and table views, the deal drawer, and the state kept in the URL hash.
5. Keep the accessibility: roles, labels, focus return when overlays close, Escape, and prefers-reduced-motion.
6. Head: move the font links, title, description and theme-color into [index.html | the metadata export and next/font]. Leave out the badge script.
7. In Next.js, mark interactive components with 'use client' and keep data that can be static on the server.
Compare your version with the original side by side at 1440, 768 and 390 pixels wide. They should look the same. List every difference you could not remove and why.Restyle with tokens only
Written for Kiln & Co. The constraint is the point. An agent that may only change values in :root cannot damage the layout, and you get to see the whole palette as a table before anything is edited.
Restyle the Screenery template in templates/kiln/ for my brand by changing tokens only.
My brand: [colours as hex, typefaces, and two or three words for the feeling].
1. Read the :root block at the top of templates/kiln/style.css. List every token with its current value and what it is used for.
2. Propose a new value for each colour token from my palette. Keep the roles: a ground, an ink, one or two accents, their soft and deep variants, and the "on ink" colours for dark sections. Show me the proposal as a table, with the contrast ratio of every text and ground pair, before you edit.
3. After I agree, change the values in :root and nothing else in style.css. Keep the token names. Do not add rules, do not touch selectors and do not edit the layout.
4. Typefaces: replace the Google Fonts <link> in index.html and the --serif and --sans values. If my display face has no italic or optical sizes, tell me which headings lose an effect.
5. Leave --s-*, the type sizes and the radii alone unless I ask.
6. Update theme-color and the inline SVG favicon in index.html to the new palette.
Then open the page at 1440 and 390 pixels wide and look for anything that still shows the old palette: hard-coded colours in SVG, shadows, the ::selection colour, focus rings, photo treatments. List them and ask before changing anything outside :root.Review what comes back
Open the original and the agent's version side by side. Look for these, in this order.
- Leftover fiction. Search the files for the template's brand name and for
.exampleaddresses. - Invented facts. Customer names, quotes, logos and metrics you did not supply.
- Flattening. Sections rebuilt as rows of identical cards, the type scale reduced, tokens replaced with hard-coded values.
- Lost states. Submit the forms empty, with bad input and with the network off. Open every menu and dialog with the keyboard.
- The badge. No
badge.jsscript tag in the page. - Width. No horizontal scroll at 390 pixels, and a phone layout that still looks designed.
If you kept the project's scripts, scripts/inspect.mjs runs the mechanical checks for you. The docs list what it measures.