System prompt
A system prompt is the instruction set given to a model before any user message, defining its role, constraints, and behaviour for the whole conversation. In coding tools it is written by the vendor and describes how the agent should use its tools and edit code.
It is separate from your prompt and carries more weight. When a tool consistently formats output a certain way or refuses a certain class of request, that behaviour usually lives in the system prompt rather than in the model.
When you build with an API directly you write your own, and the same rule applies: it is for durable behaviour that should hold across every request, not for the task at hand.
What this means in practice
You cannot usually edit a coding tool's system prompt, but rules files are layered on top of it and are the supported way to shape behaviour. That is why a rules file changes results more reliably than rephrasing an individual prompt.
A minimal system prompt, annotated by role
You are the code-review assistant for our TypeScript monorepo. ← role Rules that apply to every review: ← durable rules - Flag any use of `any`, floating promises, and untyped catch. - Our style: named exports, no default exports outside routes. - Severity levels: blocker / should-fix / nit. Use them. Never rewrite code wholesale; propose minimal diffs. ← boundary Output format: one finding per line, `file:line severity: note`. ← output contract
Role, durable rules, boundary, output contract — the four parts nearly every working system prompt has. The arrows are annotations; delete them.
Prompts for the tools this applies to
Related terms
- Custom instructions
Custom instructions are standing directions you give an AI tool that apply to every request rather than a single one — preferred language and framework, response style, conventions to follow.
- Prompt template
A prompt template is a reusable prompt with placeholders for the parts that change — the file, the framework, the requirement — so a structure that works can be applied to many tasks without being rewritten each time..
- Meta-prompting
Meta-prompting is using a model to write or improve a prompt rather than to do the task directly.
- Prompt injection
Prompt injection is an attack where instructions hidden in content a model reads are treated as commands rather than data.