skip to content

In Claude Code, how does an output style differ from CLAUDE.md, --append-system-prompt and a hook, and why can it never enforce a rule?

level: seniorimportance: must knowfreq 14%

answer

  1. voice and role, not policy
  2. built-ins add, custom styles can drop
  3. CLAUDE.md stays loaded
  4. append adds, replace removes
  5. a hook runs regardless of the model

basics

~20 s

An output style reshapes how Claude responds: built-ins add instructions, custom styles also drop the coding instructions unless kept. CLAUDE.md and --append-system-prompt only add. All three are guidance; enforcement comes from hooks and permission rules.

solid answer

~40 s

Claude Code sends the active style's instructions with every request. The four non-default built-in styles keep the standard software-engineering instructions and add their own; a custom style leaves those out unless `keep-coding-instructions: true`. CLAUDE.md is delivered as a user message after the system prompt and stays loaded whichever style you pick. `--append-system-prompt` appends at launch without removing anything, while `--system-prompt` replaces the whole default prompt, tool guidance and safety instructions included. Every one of these is an instruction the model tries to follow, so none of them can guarantee an outcome. Something that must happen every time belongs in a hook, which Claude Code itself runs at a lifecycle event; what may run at all is decided by permission rules and modes. Styles also do not shape subagents, except a fork.

go deeper

for a junior

Recall that an output style changes how Claude responds, CLAUDE.md holds project knowledge, and a hook is what makes something happen every time.

for a middle

Explain the add-versus-remove difference: built-in styles and --append-system-prompt only add, a custom style drops the engineering instructions unless kept, and --system-prompt replaces everything.

for a senior

Show the guidance-versus-enforcement line in practice: move a must-hold rule out of a style into a hook or permission rule, and know styles skip non-fork subagents.

for a principal

Design the split for a team: CLAUDE.md for knowledge, a shared style for voice, hooks and permission settings for guarantees, and say why policy expressed as prose will eventually be ignored.

## Four ways to change what Claude is told Claude Code gives Claude instructions from several places, and each one changes them differently. An interviewer asking this wants to hear **what each layer adds or removes** and **which layer actually controls behaviour**. | Mechanism | When it applies | Adds | Removes | |---|---|---|---| | Default (no style) | Always | Nothing beyond the standard prompt | Nothing | | Built-in style (`Proactive`, `Concise`, `Explanatory`, `Learning`) | Whole session, switchable | Its own instructions | Nothing; engineering instructions stay | | Custom style | Whole session, switchable | Its own instructions | The software-engineering instructions, unless `keep-coding-instructions: true` | | CLAUDE.md | Every session | Project knowledge, as a user message after the system prompt | Nothing | | `--append-system-prompt` | One launch | Text appended to the system prompt | Nothing | | `--system-prompt` | One launch | Your replacement text | The entire default prompt, tool guidance and safety instructions included | ## What an output style changes An **output style** sets role, tone and response format for every response in the session. Claude Code sends the active style's instructions with each request; when you switch mid-session, the new style arrives as a message in the conversation and applies from your next message. The defining difference from the additive mechanisms is that a **custom** style can take something away: unless `keep-coding-instructions` is `true`, Claude Code leaves out its built-in engineering instructions, such as how to scope changes, write comments and verify work. CLAUDE.md is untouched by any style; it stays loaded whichever style is active. ## Guidance versus enforcement Every layer in the table is text the model reads and tries to follow. None of them is a control: - A style that says "never run `git push`" makes a push less likely, not impossible. - A CLAUDE.md rule is followed most of the time, but vague or conflicting instructions are not guaranteed to be. - The Proactive style tells Claude to check with you before deleting data or changing a shared or production system, yet that check is conversational and separate from permission prompts; the permission mode is unchanged. Enforcement lives elsewhere in Claude Code: 1. **Hooks** run at lifecycle events whether or not the model cooperates, for example formatting after every edit or blocking a command before it runs. 2. **Permission rules and modes** decide which tool calls run, ask or are denied. 3. Beyond those, the sandbox and managed settings constrain what a session can touch. ## Choosing the right layer | You want | Use | |---|---| | Every response in a certain voice, length or format, or a different role | An output style | | Claude to know the project's conventions, commands and structure | CLAUDE.md | | One addition for a scripted run, keeping the default prompt | `--append-system-prompt` | | A non-coding pipeline agent with its own identity | `--system-prompt`, accepting that you now own tool and safety guidance | | Something that must happen every time without exception | A hook | These combine: CLAUDE.md for what Claude should know, a style for how it responds, a hook for what must be guaranteed. ## Scope: subagents and forks Output styles apply to the main conversation and to a **fork**, which inherits the parent's full conversation and system prompt. Other subagents run their own system prompt, so a reviewer subagent answers in its own voice whatever style the session uses. A team that wants terse subagent output writes that into the subagent's own instructions. ## Traps candidates fall into - Treating a custom style as purely additive, then wondering why Claude stopped verifying its work: the coding instructions were dropped. - Expecting a style or CLAUDE.md line to "block" an action. Only a hook or a permission rule can. - Reaching for `--system-prompt` to change tone, which discards far more than tone. - Putting project facts into a style, so they vanish the moment someone switches to another style; CLAUDE.md keeps them loaded regardless. - Forgetting that a style's instructions travel with every request, so a long style adds input tokens to every session that uses it.

  • When would you choose --system-prompt over a custom output style?
    When Claude Code's default identity no longer fits, such as a non-coding agent in a pipeline nobody watches, set per invocation at launch. `--system-prompt` replaces the entire default prompt, including tool guidance and safety instructions, so you take responsibility for them. An output style is a persistent, switchable, shareable persona; for an extra rule in a scripted run, `--append-system-prompt` keeps the default prompt intact.
  • A team's custom style says never to run git push, and Claude ran it anyway. What do you change?
    Stop expecting prose to enforce. The style was guidance the model weighed against the task. Move the rule to an enforcing layer: a permission rule that denies the push, or a hook that blocks the command before it runs. Keep the style for voice and format, and keep the rationale in CLAUDE.md if Claude should understand why.
  • Does a subagent defined in .claude/agents answer in the session's output style?
    No. A subagent runs its own system prompt, so the session's output style does not shape its responses. The exception is a fork, which inherits the parent's full conversation and system prompt, style included. To change a subagent's voice, write it into that subagent's own instructions.

An output style is the style guide handed to a writer: it changes the voice of everything they produce, and a custom one can even replace the house engineering manual, but it locks no doors. Stopping an action takes the lock, a permission rule, or the alarm that always fires, a hook.

  • A custom output style can block commands it tells Claude not to run.
  • Switching to a custom style unloads the project's CLAUDE.md.
  • --append-system-prompt removes the coding instructions like a custom style does.
  • Proactive's check before destructive actions replaces permission prompts.
  • Every subagent inherits the main session's output style.
  • --system-prompt only changes tone; tool and safety guidance remain.