# --append-system-prompt Flag

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

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** claude --append-system-prompt, --append-system-prompt-file

## Think of it like

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

## 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

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.

## Example code

```bash
claude -p --append-system-prompt "Always reply in French" "Summarize README.md"
```

Keep the default prompt and add one rule.

## Why it matters

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

## Common mistake

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

## Three principles

- **Adds to the end.** Default stays.
- **Text or file.** File goes first.
- **Per run.** CLAUDE.md for always.

## Related terms

- [--system-prompt Flag](https://learn.benibix.com/term/ai/system-prompt-flag)
- [CLAUDE.md](https://learn.benibix.com/term/ai/claude-md)
- [System Prompt](https://learn.benibix.com/term/ai/system-prompt)
- [Output Style](https://learn.benibix.com/term/ai/output-style)

## Told apart from

- [--system-prompt vs --append-system-prompt](https://learn.benibix.com/compare/system-prompt-flag-vs-append-system-prompt-flag): People think --system-prompt and --append-system-prompt both just add rules. Only one of them adds. --append-system-prompt puts your text after Claude Code's default prompt. So Claude keeps its guide to the tools, its safety rules and its coding habits. --system-prompt throws the default away and uses only your text. For a coding task with a few extra rules, append. Replace only when Claude should not act as a coding helper at all.

## Taught in

- [System Prompt Flags](https://learn.benibix.com/learn/ai-claude-code-commands/system-prompt-flags): Claude Code Commands, 16/17

![--system-prompt swaps out the default prompt. --append-system-prompt adds your text after it.](https://learn.benibix.com/diagrams/flag-system-prompt.svg)

---

Source: https://learn.benibix.com/term/ai/append-system-prompt-flag
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
