Skip to main content
Custom instructions let you set persistent context that the AI reads before every interaction with your app. Instead of repeating the same guidance in every message, you write it once and the AI follows it automatically.

What are custom instructions?

Custom instructions are a block of text you attach to your app that the AI includes in its context for every message. They act as standing orders — the AI reads them before processing each of your prompts and follows them throughout the conversation. Use custom instructions for anything the AI should always know or always do when working on your app.

Setting custom instructions

1

Open app settings

From the editor sidebar, open your app’s settings.
2

Find the custom instructions field

The custom instructions text area is in the app settings panel.
3

Write your instructions

Enter your instructions as plain text. Be clear and specific about what you want the AI to do or avoid.
4

Save

Your instructions take effect immediately. The AI reads them before every subsequent message in any thread for this app.

What to include

Custom instructions are most effective for persistent rules and context that apply across your entire app. Here are common use cases:

Coding conventions

Tell the AI how you want code structured and formatted:
Always use TypeScript interfaces, never type aliases.
Use named exports, not default exports.
Keep components under 150 lines — split into smaller components if needed.

Design guidelines

Establish visual standards for your app:
Use dark mode by default.
All buttons should use the "outline" variant unless they are primary actions.
Use the blue-600 color for all primary accent elements.
Tables should always have pagination with 25 rows per page.

Domain-specific terminology

Define terms the AI should use consistently:
A "case" refers to a customer support ticket.
"Resolution time" is measured from case creation to first response, not final closure.
"Active users" means users who logged in within the last 30 days.

Data handling rules

Set rules for how data should be queried and displayed:
Always sort tables by created date descending unless the user specifies otherwise.
Use metric units for all measurements.
Format dates as "Jan 15, 2025" — never use ISO format in the UI.
Currency values should always show two decimal places.

Architecture patterns

Define patterns the AI should follow:
All API routes should validate input with Zod schemas.
Database queries should use pagination — never fetch unbounded result sets.
Use server components for data fetching. Only use client components when interactivity is required.

Examples

Here are complete custom instruction sets for different types of apps:
This is an internal CRM dashboard for the sales team.

Terminology:
- "Deal" = a sales opportunity in our pipeline
- "Account" = a company we are selling to or have sold to
- "Contact" = an individual person at an account

Design rules:
- Use a sidebar layout with navigation on the left
- All tables should be sortable and searchable
- Show currency values in USD with two decimal places
- Use green for "Won", red for "Lost", blue for "In Progress"

Data rules:
- Default sort: most recently updated first
- Pagination: 50 rows per page for all tables
- Always show the total count above tables
This is an operations monitoring dashboard.

Always use dark mode.
Charts should use the following color palette: #3B82F6, #10B981, #F59E0B, #EF4444, #8B5CF6.
All timestamps should display in the user's local timezone.
Use 24-hour time format.

When building charts:
- Include a legend below the chart
- Use tooltips that show exact values on hover
- Default time range should be "Last 7 days"
This app manages customer support tickets.

Priority levels: Critical, High, Medium, Low
Status values: Open, In Progress, Waiting on Customer, Resolved, Closed

Always show ticket count badges next to status labels.
The default view should filter to "Open" and "In Progress" tickets only.
Sort by priority (Critical first), then by creation date (oldest first).

When displaying customer information, always show:
- Company name
- Contact name
- Account tier (Enterprise, Pro, Free)

Tips for effective instructions

Be specific

“Use dark mode” is better than “make it look nice.” Specific instructions produce consistent results.

Keep it concise

Focus on rules the AI should always follow. Do not include one-time instructions — put those in chat messages instead.

Use categories

Group related instructions under headings (Design, Data, Terminology). This helps the AI parse and apply them correctly.

Update as you go

Refine your instructions as your app evolves. Remove rules that no longer apply and add new ones as patterns emerge.

How custom instructions interact with prompts

Custom instructions are read by the AI alongside your chat messages. They do not override your prompts — instead, they provide background context. If your message conflicts with a custom instruction, the AI follows your message for that specific interaction. For example, if your custom instructions say “use dark mode” but you send a message saying “make this page use light mode”, the AI will apply light mode to that specific page.
Custom instructions apply to all threads within an app. You cannot set different instructions for different threads. If you need different AI behavior, create a separate app.

What’s next