Skip to content
BENIBIX Learn

--system-prompt Flag

Also known as claude --system-prompt, --system-prompt-file

It swaps the whole default prompt for yours.

Think of it like

It is like you throw out the old rule book. Then you hand over a new one.

Example

Emma's script uses Claude to sort support tickets, not to write code. She gives it --system-prompt-file with her own rules, so none of the coding advice gets in the way.

Why it matters

For a job that is not coding, a short prompt of your own is clearer than a long one built for code.

Definition

--system-prompt replaces Claude Code's whole default system prompt with your own text. --system-prompt-file does the same with the text of a file. The default prompt holds the guide to the tools, the safety rules and the coding habits, so all of that goes too. Use it when Claude should not act as a coding helper at all.

Example code

bash
claude -p --system-prompt-file ./prompts/triage.txt "Sort these tickets"
Run with your own prompt in place of the default.
--system-prompt is the left stack: yours alone.

Common mistake

Using it to add one rule. That throws out the tool guide too. Use --append-system-prompt to add.

Key takeaways

  1. 1
    Replaces it all. Tools guide too.
  2. 2
    Text or file. -file form.
  3. 3
    Not for coding help. Use append.

Compare

Learn it properly