6 6
7> Adapt Claude Code for uses beyond software engineering7> Adapt Claude Code for uses beyond software engineering
8 8
9Output styles change how Claude responds, not what Claude knows. They modify the system prompt to set role, tone, and output format while keeping core capabilities like running scripts, reading and writing files, and tracking TODOs. Use one when you keep re-prompting for the same voice or format every turn, or when you want Claude to act as something other than a software engineer.9Output styles change how Claude responds, not what Claude knows. They modify the system prompt to set role, tone, and output format. Use one when you keep re-prompting for the same voice or format every turn, or when you want Claude to act as something other than a software engineer.
10
11A custom output style adds your instructions to the system prompt and lets you choose whether to keep Claude Code's built-in software engineering instructions. Keep them when you're changing how Claude communicates but still coding, like always answering with a diagram. Leave them out when Claude isn't doing software engineering at all, like a writing assistant or data analyst.
10 12
11For instructions about your project, conventions, or codebase, use [CLAUDE.md](/en/memory) instead.13For instructions about your project, conventions, or codebase, use [CLAUDE.md](/en/memory) instead.
12 14
13## Built-in output styles15## Built-in output styles
14 16
15Claude Code's **Default** output style is the existing system prompt, designed17Claude Code's **Default** output style is the existing system prompt, designed to help you complete software engineering tasks efficiently.
16to help you complete software engineering tasks efficiently.
17 18
18There are three additional built-in output styles:19There are three additional built-in output styles:
19 20
20* **Proactive**: Claude executes immediately, makes reasonable assumptions21* **Proactive**: Claude executes immediately, makes reasonable assumptions instead of pausing for routine decisions, and prefers action over planning. This applies the same guidance as [auto mode](/en/permission-modes#eliminate-prompts-with-auto-mode) without changing your permission mode, so you still see permission prompts before tools run.
21 instead of pausing for routine decisions, and prefers action over planning.
22 This applies the same guidance as
23 [auto mode](/en/permission-modes#eliminate-prompts-with-auto-mode) without
24 changing your permission mode, so you still see permission prompts before
25 tools run.
26
27* **Explanatory**: Provides educational "Insights" in between helping you
28 complete software engineering tasks. Helps you understand implementation
29 choices and codebase patterns.
30
31* **Learning**: Collaborative, learn-by-doing mode where Claude will not only
32 share "Insights" while coding, but also ask you to contribute small, strategic
33 pieces of code yourself. Claude Code will add `TODO(human)` markers in your
34 code for you to implement.
35
36## How output styles work
37
38Output styles directly modify Claude Code's system prompt.
39 22
40* Custom output styles exclude instructions for coding (such as verifying code23* **Explanatory**: Provides educational "Insights" in between helping you complete software engineering tasks. Helps you understand implementation choices and codebase patterns.
41 with tests), unless `keep-coding-instructions` is true.
42* All output styles have their own custom instructions added to the end of the
43 system prompt.
44* All output styles trigger reminders for Claude to adhere to the output style
45 instructions during the conversation.
46 24
47Token usage depends on the style. Adding instructions to the system prompt25* **Learning**: Collaborative, learn-by-doing mode where Claude will not only share "Insights" while coding, but also ask you to contribute small, strategic pieces of code yourself. Claude Code will add `TODO(human)` markers in your code for you to implement.
48increases input tokens, though prompt caching reduces this cost after the first
49request in a session. The built-in Explanatory and Learning styles produce
50longer responses than Default by design, which increases output tokens. For
51custom styles, output token usage depends on what your instructions tell Claude
52to produce.
53 26
54## Change your output style27## Change your output style
55 28
56Run `/config` and select **Output style** to pick a style from a menu. Your29Run `/config` and select **Output style** to pick a style from a menu. Your selection is saved to `.claude/settings.local.json` at the [local project level](/en/settings).
57selection is saved to `.claude/settings.local.json` at the
58[local project level](/en/settings).
59 30
60To set a style without the menu, edit the `outputStyle` field directly in a31To set a style without the menu, edit the `outputStyle` field directly in a settings file:
61settings file:
62 32
63```json theme={null}33```json theme={null}
64{34{
66}36}
67```37```
68 38
69Because the output style is set in the system prompt at session start,39Because the output style is set in the system prompt at session start, changes take effect the next time you start a new session. This keeps the system prompt stable throughout a conversation so prompt caching can reduce latency and cost.
70changes take effect the next time you start a new session. This keeps the system
71prompt stable throughout a conversation so prompt caching can reduce latency and
72cost.
73 40
74## Create a custom output style41## Create a custom output style
75 42
76Custom output styles are Markdown files with frontmatter and the text that will43A custom output style is a Markdown file: frontmatter for metadata, then the instructions to add to the system prompt.
77be added to the system prompt:
78 44
79```markdown theme={null}45<Steps>
80name: My Custom Style46 <Step title="Create a Markdown file">
81description:47 Save it at one of three levels. The file name becomes the style name unless you set `name` in the frontmatter.
82 A brief description of what this style does, to be displayed to the user
83 48
84# Custom Style Instructions49 * User: `~/.claude/output-styles`
50 * Project: `.claude/output-styles`
51 * Managed policy: `.claude/output-styles` inside the [managed settings directory](/en/settings#settings-files)
52 </Step>
85 53
86You are an interactive CLI tool that helps users with software engineering54 <Step title="Add frontmatter and instructions">
87tasks. [Your custom instructions here...]55 Decide whether to keep Claude Code's software engineering instructions. Set `keep-coding-instructions: true` if you're changing how Claude communicates but still want it coding the same way. Leave it out if Claude won't be doing software engineering.
88 56
89## Specific Behaviors57 This example leads every explanation with a diagram while keeping Claude's coding behavior:
90 58
91[Define how the assistant should behave in this style...]59 ```markdown theme={null}
92```60 ---
61 name: Diagrams first
62 description: Lead every explanation with a diagram
63 keep-coding-instructions: true
64 ---
93 65
94You can save these files at three levels:66 When explaining code, architecture, or data flow, start with a Mermaid diagram showing the structure, then explain in prose.
95 67
96* User: `~/.claude/output-styles`68 ## Diagram conventions
97* Project: `.claude/output-styles`69
98* Managed policy: `.claude/output-styles` inside the [managed settings directory](/en/settings#settings-files)70 Use `flowchart TD` for control flow and `sequenceDiagram` for request paths. Keep diagrams under 15 nodes.
71 ```
72 </Step>
73
74 <Step title="Switch to your style">
75 Run `/config` and select your style under **Output style**. It takes effect the next time you start a session.
76 </Step>
77</Steps>
99 78
100[Plugins](/en/plugins-reference) can also ship output styles in an `output-styles/` directory.79[Plugins](/en/plugins-reference) can also ship output styles in an `output-styles/` directory.
101 80
102### Frontmatter81### Frontmatter
103 82
104Output style files support frontmatter for specifying metadata:83Output style files support these frontmatter fields:
105 84
106| Frontmatter | Purpose | Default |85| Frontmatter | Purpose | Default |
107| :------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------- |86| :------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------- |
108| `name` | Name of the output style, if not the file name | Inherits from file name |87| `name` | Name of the output style, if not the file name | Inherits from file name |
109| `description` | Description of the output style, shown in the `/config` picker | None |88| `description` | Description of the output style, shown in the `/config` picker | None |
110| `keep-coding-instructions` | Whether to keep the parts of Claude Code's system prompt related to coding. | false |89| `keep-coding-instructions` | Keep Claude Code's built-in software engineering instructions | `false` |
111| `force-for-plugin` | Plugin output styles only: apply this style automatically whenever the plugin is enabled, without requiring users to select it. Overrides the user's `outputStyle` setting. If multiple enabled plugins set this, the first one loaded wins. | false |90| `force-for-plugin` | Plugin output styles only: apply this style automatically whenever the plugin is enabled, without requiring users to select it. Overrides the user's `outputStyle` setting. If multiple enabled plugins set this, Claude Code uses the first one loaded. | `false` |
112 91
113## Comparisons to related features92## How output styles work
114 93
115### Output Styles vs. CLAUDE.md vs. --append-system-prompt94Output styles directly modify Claude Code's system prompt.
95
96* All output styles have their own custom instructions added to the end of the system prompt.
97* All output styles trigger reminders for Claude to adhere to the output style instructions during the conversation.
98* Custom output styles leave out Claude Code's built-in software engineering instructions, such as how to scope changes, write comments, and verify work, unless `keep-coding-instructions` is set to `true`.
116 99
117Choose based on whether Claude should stop acting as a coding assistant or keep100Token usage depends on the style. Adding instructions to the system prompt increases input tokens, though prompt caching reduces this cost after the first request in a session. The built-in Explanatory and Learning styles produce longer responses than Default by design, which increases output tokens. For custom styles, output token usage depends on what your instructions tell Claude to produce.
118its default role and learn more. Output styles replace the software-engineering
119parts of Claude Code's system prompt with your own role and voice, so use one
120when Claude should adopt a different identity, like a writing editor or a
121data-analysis assistant. CLAUDE.md and `--append-system-prompt` both keep
122Claude Code's default identity and add to it, so use them when Claude should
123remain a coding assistant that also follows your project conventions or extra
124instructions.
125 101
126The mechanisms differ as well. Output styles edit the system prompt directly.102## Comparisons to related features
127CLAUDE.md adds its contents as a user message after the system prompt.
128`--append-system-prompt` appends content to the end of the system prompt without
129removing anything.
130 103
131### Output Styles vs. [Agents](/en/sub-agents)104Several features customize how Claude Code behaves. Output styles modify the system prompt directly and apply to every response. The others add instructions without changing the default system prompt, or scope them to a specific task.
132 105
133Use an output style to change how the main conversation responds in every106| Feature | How it works | Use it when |
134session. Use a [subagent](/en/sub-agents) when you want a separately scoped107| :----------------------- | :----------------------------------------------------------- | :---------------------------------------------------------------------- |
135helper that the main conversation delegates to. Output styles affect only the108| Output styles | Modifies the system prompt | You want a different role, tone, or default response format every turn |
136system prompt of the main agent loop. Agents handle specific tasks and can carry109| [CLAUDE.md](/en/memory) | Adds a user message after the system prompt | Claude should always know your project conventions and codebase context |
137their own model, tools, and context about when to invoke them.110| `--append-system-prompt` | Appends to the system prompt without removing anything | You want a one-off addition for a single invocation |
111| [Agents](/en/sub-agents) | Runs a subagent with its own system prompt, model, and tools | You want a separately scoped helper for a focused task |
112| [Skills](/en/skills) | Loads task-specific instructions when invoked or relevant | You have a reusable workflow |
138 113
139### Output Styles vs. [Skills](/en/skills)114## Related resources
140 115
141Output styles modify how Claude responds (formatting, tone, structure) and are always active once selected. Skills are task-specific prompts that you invoke with `/skill-name` or that Claude loads automatically when relevant. Use output styles for consistent formatting preferences; use skills for reusable workflows and tasks.116* [Settings](/en/settings): where the `outputStyle` field lives and how settings precedence works
117* [Permission modes](/en/permission-modes): the Proactive style mirrors auto mode without changing your permission mode
118* [Plugins](/en/plugins): package and distribute output styles alongside skills, hooks, and agents
119* [Debug your configuration](/en/debug-your-config): diagnose why an output style isn't taking effect