<!-- TokenOS docs · Building apps · Markdown mirror of https://tokenos.ai/docs/prompting · HTML: https://tokenos.ai/docs/prompting · index: https://tokenos.ai/llms.txt -->

# 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

**A prompt that builds well**

```
A Solana protocol analytics dashboard for liquidity providers.
Pages: Overview (TVL per pool, 24h volume, my positions on load), Pools (sortable table,
pool detail drawer with fee tier and 30-day fee history), Portfolio (wallet holdings
with live prices, PnL since deposit), Admin (visible only to the admin wallet: pause a pool,
set the fee recipient).
Wallet: Phantom / Solflare / Ledger via the standard wallet adapter.
Actions: deposit and withdraw from a pool, claim fees — each with a transaction status toast
and an explorer link.
Design: dark, dense, monospace numerals, mobile-friendly tables.
```

> **Warning — Too vague**
> “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.

| Prefix | Use it for | Example |
| --- | --- | --- |
| MODIFY | Change existing behaviour or styling | MODIFY: make the Overview cards show USD and token amounts side by side |
| ADD | New page, component or action | ADD: a Notifications page listing on-chain events for the connected wallet |
| ENHANCE | Polish without changing behaviour | ENHANCE: skeleton loaders on every table while data loads |
| FIX | A bug you can describe | FIX: the Admin page is visible to every wallet, gate it on isAdmin |

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](https://tokenos.ai/docs/iterate) 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.

---

*Building apps · TokenOS documentation. Canonical page: https://tokenos.ai/docs/prompting. All docs as Markdown: https://tokenos.ai/llms.txt. Payments on TokenOS are for metered usage only; nothing on this page is investment advice or a promise of income.*
