Spec file
Claude Code output styles: preserve coding instructions
Set keep-coding-instructions for a project output style, then check file placement and when changes take effect.
Output styles can make replies shorter or diagram-first throughout a session. They change role, tone and format, so consider whether software-engineering instructions should remain. This guide provides an original style sample and file checks. Claude Code did not load the style, and no model-format compliance is certified.
- Verified
- · Not tested by us
- Applies to
- Claude Code Applies to local Claude Code; the page gives no unified version floor. Use the 2026-11-04 check and actual interface.[1]
- Tools
File locations
| Path | Scope | How it is read |
|---|---|---|
./.claude/output-styles/decision-first.md | Project output style; a user-level style can live in ~/.claude/output-styles/. | The terminal reads styles at startup; restart after creating or editing a style during a session.[1] |
When to use
- You want a consistent reply structure while retaining coding behavior across a session.[1]
When not to use
- You need deterministic file-access or command-permission restrictions.[1]
File location and original sample
Create a Markdown file in project .claude/output-styles/. User and managed locations are also documented; nested project styles with the same name resolve to the nearest working-directory location. The sample below sets reply order and explicitly retains coding instructions. It is an editable original exercise, not an official supplied style.[1]
---
name: Decision first
description: Start with the decision and its evidence
keep-coding-instructions: true
---
State the decision, show the evidence, and give the next action.
Keep assumptions explicit.
Why set the retention flag
The docs say to set keep-coding-instructions: true when changing communication while keeping coding behavior, and to omit it when the role will not perform software engineering. A Markdown extension alone does not establish retention. Decide whether the style is a communication preference or a role change, then inspect the frontmatter.[1]
Switching and reloading
Use /output-style or the Output style option in /config to select a style. Current versions apply it from the next message; the docs say versions before v2.1.251 required /clear or a new session. Restart terminal Claude Code after creating or editing style files during a session. Inspect the selected name, actual file and same-name directory precedence; saving a file and loading it in the session are separate checks.[1]
Local checks and boundaries
Offline checks covered frontmatter delimiters, fields and the retention flag. No user configuration, style switch or model request was performed. When adopting it, observe a small explanation task and adjust from the result. A style instructs the model without guaranteeing strict compliance and does not replace permissions or automated acceptance checks.[1]
Sources
All links are official pages; verification dates are listed per source, and links point to the version checked.