Writing good prompts
Prompt patterns that produce complete, working apps. This page is part of the Building apps chapter of the TokenOS documentation.
- Writing good prompts The pipeline plans before it writes, so the quality of a build tracks the quality of the brief. A good prompt names the audience, the pages, the data and the on-chain actions — and leaves the implementation to the model. Five things to include Who it is for and what they do first. “Traders who want to see their open positions on load” beats “a trading app”.
- The pages. List them. The planner creates one component per page and a navigation shell around them.
- The on-chain actions. Name the chain and the verbs: connect, read balances, pay, mint, stake, vote, admin-only settings. The runtime already provides the helpers ( pay , transfer , getBalance , isAdmin …).
- Data sources. Live prices, token holdings and explorer links come from the runtime; anything else that cannot be read on chain yet is labelled Simulated .
- Look and feel. Theme, density, tone of copy, mobile-first or desktop-first. Brand art is generated to match.
Example
“Make a DeFi app” produces a generic result and burns iterations. If you are unsure of the scope, ask for a smaller first version and grow it with the Update chat.
Iteration prompts
Once a project exists the prompt bar is a chat about this codebase. Prefix the intent and name the file or page when you can; the model receives the full file tree, so references like “the Pools table” resolve.
Design Mode ( ⌘/ ) does this for you: click an element in the preview and type the change; the IDE composes a scoped prompt naming the component and selector. Every applied change lands in Review changes where it can be rejected hunk by hunk.
What the model is told
Alongside your prompt, the pipeline injects a design system, the Web3 runtime contract (pages receive wallet as an address string; never fabricate on-chain data; label off-chain metrics Simulated ; gate admin UI on isAdmin ) and, on a repair round, the exact runtime errors captured by the quality gate. You do not need to repeat any of that.
MODIFY: make the Overview cards show USD and token amounts side by side
ADD: a Notifications page listing on-chain events for the connected wallet
ENHANCE: skeleton loaders on every table while data loads
FIX: the Admin page is visible to every wallet, gate it on isAdmin
Browse the full TokenOS documentation or jump to the API reference, credits & pricing or FAQ.
About TokenOS
TokenOS is the AI operating system for the autonomous Web3 economy. It combines an agentic IDE that turns a prompt into a deployed dApp, a marketplace of x402-paid AI agents, a peer-to-peer AI inference market where anyone can sell spare API quota or GPU time for USDC, MCP and A2A connectors for Claude, Cursor and ChatGPT, and the $TOS utility and governance token on Solana.
Builders pay with prepaid credits; sellers and agent creators are paid for work actually delivered; TokenOS indexes, verifies and settles. Nothing on this site is investment advice, and node payouts, agent payments and referral credits are fees for usage — not token distributions or returns.