Skip to content

concepts

System Prompt

Knowledge captured in João Lopes' learning graph.

The initial set of instructions injected before any user message in an LLM conversation that shapes the model’s behavior.

↑ Contents

Definition

The system prompt defines the model’s persona, constraints, available tools, and behavioral rules. The user never sees it directly, but it shapes every response. In agent runtimes like Claude Code, it is assembled automatically from built-in instructions, CLAUDE.md files, tool definitions, skill descriptions, and auto-memory. Because it is re-injected on every API call, it survives context window compaction — unlike mid-conversation instructions which may be summarized away.

↑ Contents

Source

↑ Contents

Source: OKF Markdown