Skip to content
BENIBIX Learn

--append-system-prompt Flag

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

It adds your text to the end of the default system prompt.

Think of it like

It is like you add one line to the end of the class rules.

Example

Jack's CI asks Claude to review pull requests. He adds --append-system-prompt-file with his team's style rules, and Claude still knows how to use its tools.

Why it matters

You add just what is new, and keep all that Claude needs to work well.

Definition

--append-system-prompt adds your text to the end of Claude Code's default system prompt. --append-system-prompt-file adds the text of a file. Claude keeps its tool guide and safety rules, and also follows yours. If you pass both forms, the file's text goes first.

Example code

bash
claude -p --append-system-prompt "Always reply in French" "Summarize README.md"
Keep the default prompt and add one rule.
The right stack shows this flag: the default, then yours.

Common mistake

Writing team rules here that every session needs. Those belong in CLAUDE.md, so they load without a flag.

Key takeaways

  1. 1
    Adds to the end. Default stays.
  2. 2
    Text or file. File goes first.
  3. 3
    Per run. CLAUDE.md for always.

Compare

Learn it properly