Give the AI persistent context about your app — coding conventions, design guidelines, and domain rules
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.
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.
Tell the AI how you want code structured and formatted:
Copy
Always use TypeScript interfaces, never type aliases.Use named exports, not default exports.Keep components under 150 lines — split into smaller components if needed.
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.
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.
Set rules for how data should be queried and displayed:
Copy
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.
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.
Here are complete custom instruction sets for different types of apps:
CRM Dashboard
Copy
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 accountDesign 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
Operations Dashboard
Copy
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"
Support Ticket Tracker
Copy
This app manages customer support tickets.Priority levels: Critical, High, Medium, LowStatus values: Open, In Progress, Waiting on Customer, Resolved, ClosedAlways 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)
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.