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
| 1 | # Explanatory Output Style Plugin |
| 2 | |
| 3 | This plugin recreates the deprecated Explanatory output style as a SessionStart |
| 4 | hook. |
| 5 | |
| 6 | WARNING: Do not install this plugin unless you are fine with incurring the token |
| 7 | cost of this plugin's additional instructions and output. |
| 8 | |
| 9 | ## What it does |
| 10 | |
| 11 | When enabled, this plugin automatically adds instructions at the start of each |
| 12 | session that encourage Claude to: |
| 13 | |
| 14 | 1. Provide educational insights about implementation choices |
| 15 | 2. Explain codebase patterns and decisions |
| 16 | 3. Balance task completion with learning opportunities |
| 17 | |
| 18 | ## How it works |
| 19 | |
| 20 | The plugin uses a SessionStart hook to inject additional context into every |
| 21 | session. This context instructs Claude to provide brief educational explanations |
| 22 | before and after writing code, formatted as: |
| 23 | |
| 24 | ``` |
| 25 | `★ Insight ─────────────────────────────────────` |
| 26 | [2-3 key educational points] |
| 27 | `─────────────────────────────────────────────────` |
| 28 | ``` |
| 29 | |
| 30 | ## Usage |
| 31 | |
| 32 | Once installed, the plugin activates automatically at the start of every |
| 33 | session. No additional configuration is needed. |
| 34 | |
| 35 | The 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 | |
| 44 | This plugin replaces the deprecated "Explanatory" output style setting. If you |
| 45 | previously used: |
| 46 | |
| 47 | ```json |
| 48 | { |
| 49 | "outputStyle": "Explanatory" |
| 50 | } |
| 51 | ``` |
| 52 | |
| 53 | You can now achieve the same behavior by installing this plugin instead. |
| 54 | |
| 55 | More generally, this SessionStart hook pattern is roughly equivalent to |
| 56 | CLAUDE.md, but it is more flexible and allows for distribution through plugins. |
| 57 | |
| 58 | Note: Output styles that involve tasks besides software development, are better |
| 59 | expressed as |
| 60 | [subagents](https://docs.claude.com/en/docs/claude-code/sub-agents), not as |
| 61 | SessionStart hooks. Subagents change the system prompt while SessionStart hooks |
| 62 | add 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! |