System Prompt

A system prompt is a hidden set of instructions given to an AI model that defines its behavior, personality, capabilities, and constraints. Unlike user prompts visible in conversation, system prompts shape how the AI responds to all requests and persist throughout a session.

Example

Cursor's system prompt might include: 'You are an expert software developer. Always consider edge cases. Prefer TypeScript over JavaScript. When showing code changes, explain your reasoning.'

System prompts are the invisible rules that govern AI behavior. Understanding them helps you work effectively with AI tools and customize their behavior when possible.

How System Prompts Work

[System Prompt: Hidden instructions defining AI behavior]
[User Prompt: Your visible message]
          ↓
[AI Response: Shaped by both system and user prompts]

What Goes in System Prompts

  • Role definition — "You are an expert software engineer"
  • Behavior rules — "Always explain your reasoning"
  • Constraints — "Never suggest deprecated patterns"
  • Knowledge — "The current date is..."
  • Formatting — "Use markdown for code blocks"

System Prompts vs Cursor Rules

System PromptCursor Rules
Set by the tool providerSet by you
Hidden from usersVisible in your project
General tool behaviorProject-specific guidance
Can't modify directlyFully customizable

Writing Effective Instructions

Whether in system prompts or Cursor Rules:

  • Be specific — Vague instructions get vague compliance
  • Prioritize — Most important rules first
  • Example — Show desired behavior, not just describe
  • Test — Verify the AI actually follows your rules

The Hidden Layer

Most AI tools have system prompts you never see. When a tool "just works" with your coding style, that's often a well-crafted system prompt. Cursor Rules let you add your own layer on top.

Ad
Favicon

 

  
 
Related Tools: