OmniscioGuidesClaude Code learning output style
Claude Code learning mode: a copyable output style
A finished diff teaches you what changed, not why. The useful middle is a session that builds the thing, says why at each fork, and hands you one piece small enough to finish in a sitting.
Here is the file that does it, the field that keeps the code quality up while it teaches, where to save it, and the mistake that makes the edits you make go unnoticed.
Checked against Anthropic’s output styles documentation. By the Omniscio team. Updated .
The file
Save this as teach.md. Everything after the second --- is the instruction text Claude receives with every request.
---
name: teach
description: Explain the reasoning as you build, and leave one exercise per session.
keep-coding-instructions: true
---
Treat this task as a lesson in this codebase, not a demonstration.
Before the first edit, name the plan in three bullets: the files you expect to touch, the one design decision that matters, and how you will know it works.
While you work, after each self-contained chunk, add a `Lesson` block of at most three points:
- why this approach over the obvious alternative;
- which existing code set the pattern you followed;
- what would break if someone changed it later.
When you reach the first decision with more than one defensible answer - error handling, a data shape, a boundary between modules - leave it to me:
- put a `TODO(human)` comment where my code goes;
- say what is already built, what I should write, and what to weigh;
- stop and wait. Do not write a draft beside it.
When I reply, give one `Lesson` about what I wrote, then finish the task without stopping again.
Keep the code production quality: this style changes what you explain, not what you build.Three parts do the work. The plan up front means you can redirect before any file changes. The Lesson blocks are the explanation, placed where it is useful rather than at the end. The TODO(human) hand-off is the exercise, and “stop and wait” is what makes it an exercise rather than a suggestion that Claude quietly completes for you.
What each field does
| Line | What it changes |
|---|---|
name: teach | The name in the /config picker and the name you type after /output-style. The default is the file name, so this line only matters if you rename the file. |
description: | The line under the name in the picker. Nothing behavioural depends on it, but it is what tells you, six months later, why you wrote this one. |
keep-coding-instructions: true | Keeps Claude Code’s own software engineering instructions working alongside your text. Default false. For a teaching style it does two jobs: it keeps the code good, and it keeps the parts Claude does on its own — scope, comments, verification — at their normal standard. |
| the body | Plain Markdown instructions. The headings and bullets are for Claude to read, not for anything to render. |
That field only does anything on the full system prompt, which Haiku 4.5, Sonnet 5, Opus 4.7 and earlier models in those families use by default; newer models get a shorter prompt with no engineering section, so the field has no effect there. Set CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT to 0 to select the full prompt on any model.
A misspelled field is ignored without an error, so a typo in keep-coding-instructions leaves the default in place and nothing tells you. When a style seems to load but half its behaviour is missing, that is the first thing to check.
There is a fourth field, force-for-plugin, which applies a style automatically whenever a plugin is enabled. It is for styles that ship inside plugins; a file in your own folder does not need it.
Where the file goes
Two places matter for a style like this one.
~/.claude/output-styles/teach.md— every project on this machine. This is the right home when you are learning Claude Code itself, because the lesson should follow you into whatever repository you open..claude/output-styles/teach.md— one project. Once it is committed, everyone who works in the folder can pick it, and settingoutputStylein the committed.claude/settings.jsonmakes it the default for all of them. This is the right home when the thing you are learning is this codebase: theLessonblocks will reference its patterns, and the exercises will make sense to a new teammate too.
A third location exists for policy: .claude/output-styles/ inside the managed settings directory, which an organisation can deploy to every machine it manages. Project styles also load from every .claude/output-styles/ folder between your working directory and the repository root, with the closest one winning a name clash.
The file name is the style name unless name is set, so teach.md is selected with /output-style teach.
Switch to it, and confirm it is active
- Save the file. If a session is already open in the terminal, restart it: style files are read at startup, so the open session cannot see a file it did not see at launch.
- Run
/output-style teach. If you prefer the menu, run/configand pick the style under Output style. - Run
/output-stylewith no argument. The list marks the current style;teachmarked as current is the confirmation. - Send a small task. The first reply should open with the three-bullet plan, before the first edit.
The command and the menus save the choice to .claude/settings.local.json at the local project level, so the style comes back automatically in that project. To set it by hand, the key is case-sensitive and must match the style name exactly:
{
"outputStyle": "teach"
}The command ignores case, the settings key does not, and a value that matches no style gives you the Default style rather than an error. A switch applies from your next message; on v2.1.251 and later that holds mid-session, and before it you had to run /clear or start again.
To make it the default everywhere, set outputStyle in ~/.claude/settings.json. A project’s own settings files take precedence, so a repository can opt out for everyone working in it.
The common mistake
Editing the file and wondering why nothing changed. In the terminal, Claude Code reads output style files when it starts. Save a new rule, send another message, and the session keeps using the copy it read at launch. The fix is one restart, and it catches almost everyone the first time, because settings and permissions reload into a running session without one and a style file does not.
The second mistake is expecting the pause to be reliable. A style is an instruction Claude follows, and Anthropic says plainly that it does not guarantee something always happens or never happens. If the exercise must be left for you every time, the honest tool is a hook that runs at a lifecycle event, not a longer file. In practice the TODO(human) hand-off works well, but it works because Claude follows it, not because anything enforces it.
The third is choosing the wrong system prompt for the job. keep-coding-instructions only has an effect on the full system prompt; the shorter prompt does not carry that section at all, which is why the field has no effect there.
This file, or the built-in Learning style
Claude Code ships a Learning style built on the same idea: it adds Insight blocks that explain the choices behind the code, leaves small pieces for you at a real design decision, marks the spot with a TODO(human) comment, and stops and waits. If that is what you want, select it and skip this page: run /output-style learning.
The file above is for when you want a different balance:
- A plan before the first edit. Anthropic’s description of the built-in does not mention a plan step; this file asks for the three-bullet plan first, so you can redirect the whole task before a file changes.
- A trigger you can move. The built-in leaves a piece when it reaches “a real design decision”. The file above says “more than one defensible answer”, which is the line to edit: narrow it and the session stops once, widen it and it stops more often.
- A named block you can search for.
Lessonis distinct from the built-in’sInsight, so the two never blur together if you switch between them.
The built-in Explanatory style is the lighter version: the same Insight blocks, and no exercises to write. The four built-in styles and what each one changes are covered on the output styles guide.
Where these answers come from
- The frontmatter fields and their defaults: Anthropic, Output styles, frontmatter reference. Read November 25, 2026.
- The built-in Learning style, its
TODO(human)hand-off and the way it waits: the same page, built-in output styles. - The three file locations, the nested-folder rule and the restart requirement: the same page, create a custom output style.
- Switching, case sensitivity and persistence: the same page, change your output style.
- That nothing is enforced, and what the full system prompt carries: the same page, how output styles work.
- Which models get the full system prompt by default, and the switch that selects it: Environment variables, the
CLAUDE_CODE_SIMPLE_SYSTEM_PROMPTrow.
Common questions
What is Claude Code learning mode?
It is the built-in Learning output style. Claude explains the choices behind the code it writes, marks a spot with TODO(human), says what to write there, then stops and waits while you write it.
How do I switch Claude Code to a custom teaching style?
Save the file in ~/.claude/output-styles or .claude/output-styles, restart the terminal session so the file is read, then run /output-style teach. Run /output-style with no argument to see it marked as current.
Can I make the exercises smaller or larger?
Yes, that is the reason to use a file rather than the built-in style. Change the condition that triggers a hand-off — the line about decisions with more than one defensible answer — and the style stops at more or fewer points.
Why does my edited style file have no effect?
In the terminal, style files are read when Claude Code starts. A file created or edited during a session takes effect after a restart, not on the next message.