spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / plugins / explanatory-output-style / README.md
72 lines · 2.4 KBPreviewCodeRaw
1# Explanatory Output Style Plugin
2
3This plugin recreates the deprecated Explanatory output style as a SessionStart
4hook.
5
6WARNING: Do not install this plugin unless you are fine with incurring the token
7cost of this plugin's additional instructions and output.
8
9## What it does
10
11When enabled, this plugin automatically adds instructions at the start of each
12session that encourage Claude to:
13
141. Provide educational insights about implementation choices
152. Explain codebase patterns and decisions
163. Balance task completion with learning opportunities
17
18## How it works
19
20The plugin uses a SessionStart hook to inject additional context into every
21session. This context instructs Claude to provide brief educational explanations
22before and after writing code, formatted as:
23
24```
25`★ Insight ─────────────────────────────────────`
26[2-3 key educational points]
27`─────────────────────────────────────────────────`
28```
29
30## Usage
31
32Once installed, the plugin activates automatically at the start of every
33session. No additional configuration is needed.
34
35The insights focus on:
36
37- Specific implementation choices for your codebase
38- Patterns and conventions in your code
39- Trade-offs and design decisions
40- Codebase-specific details rather than general programming concepts
41
42## Migration from Output Styles
43
44This plugin replaces the deprecated "Explanatory" output style setting. If you
45previously used:
46
47```json
48{
49 "outputStyle": "Explanatory"
50}
51```
52
53You can now achieve the same behavior by installing this plugin instead.
54
55More generally, this SessionStart hook pattern is roughly equivalent to
56CLAUDE.md, but it is more flexible and allows for distribution through plugins.
57
58Note: Output styles that involve tasks besides software development, are better
59expressed as
60[subagents](https://docs.claude.com/en/docs/claude-code/sub-agents), not as
61SessionStart hooks. Subagents change the system prompt while SessionStart hooks
62add to the default system prompt.
63
64## Managing changes
65
66- Disable the plugin - keep the code installed on your device
67- Uninstall the plugin - remove the code from your device
68- Update the plugin - create a local copy of this plugin to personalize this
69 plugin
70 - Hint: Ask Claude to read
71 https://docs.claude.com/en/docs/claude-code/plugins.md and set it up for
72 you!