
Learning Output Style
Plugin学习模式:在业务逻辑、错误处理等关键决策点请你亲手写 5–10 行代码,同时讲解实现取舍,适合边做边学。Anthropic 官方插件,基于 SessionStart 钩子,会额外消耗 token。
Learning Style Plugin
This plugin combines the unshipped Learning output style with explanatory functionality as a SessionStart hook.
Note: This plugin differs from the original unshipped Learning output style by also incorporating all functionality from the explanatory-output-style plugin, providing both interactive learning and educational insights.
WARNING: Do not install this plugin unless you are fine with incurring the token cost of this plugin's additional instructions and the interactive nature of learning mode.
What it does
When enabled, this plugin automatically adds instructions at the start of each session that encourage Claude to:
- Learning Mode: Engage you in active learning by requesting meaningful code contributions at decision points
- Explanatory Mode: Provide educational insights about implementation choices and codebase patterns
Instead of implementing everything automatically, Claude will:
- Identify opportunities where you can write 5-10 lines of meaningful code
- Focus on business logic and design choices where your input truly matters
- Prepare the context and location for your contribution
- Explain trade-offs and guide your implementation
- Provide educational insights before and after writing code
How it works
The plugin uses a SessionStart hook to inject additional context into every session. This context instructs Claude to adopt an interactive teaching approach where you actively participate in writing key parts of the code.
When Claude requests contributions
Claude will ask you to write code for:
- Business logic with multiple valid approaches
- Error handling strategies
- Algorithm implementation choices
- Data structure decisions
- User experience decisions
- Design patterns and architecture choices
When Claude won't request contributions
Claude will implement directly:
- Boilerplate or repetitive code
- Obvious implementations with no meaningful choices
- Configuration or setup code
- Simple CRUD operations
Example interaction
Claude: I've set up the authentication middleware. The session timeout behavior is a security vs. UX trade-off - should sessions auto-extend on activity, or have a hard timeout?
In auth/middleware.ts, implement the handleSessionTimeout() function to define the timeout behavior.
Consider: auto-extending improves UX but may leave sessions open longer; hard timeouts are more secure but might frustrate active users.
You: [Write 5-10 lines implementing your preferred approach]
Educational insights
In addition to interactive learning, Claude will provide educational insights about implementation choices using this format:
`★ Insight ─────────────────────────────────────`
[2-3 key educational points about the codebase or implementation]
`─────────────────────────────────────────────────`
These insights focus on:
- Specific implementation choices for your codebase
- Patterns and conventions in your code
- Trade-offs and design decisions
- Codebase-specific details rather than general programming concepts
Usage
Once installed, the plugin activates automatically at the start of every session. No additional configuration is needed.
Migration from Output Styles
This plugin combines the unshipped "Learning" output style with the deprecated "Explanatory" output style. It provides an interactive learning experience where you actively contribute code at meaningful decision points, while also receiving educational insights about implementation choices.
If you previously used the explanatory-output-style plugin, this learning plugin includes all of that functionality plus interactive learning features.
This SessionStart hook pattern is roughly equivalent to CLAUDE.md, but it is more flexible and allows for distribution through plugins.
Managing changes
- Disable the plugin - keep the code installed on your device
- Uninstall the plugin - remove the code from your device
- Update the plugin - create a local copy of this plugin to personalize it
- Hint: Ask Claude to read https://docs.claude.com/en/docs/claude-code/plugins.md and set it up for you!
Philosophy
Learning by doing is more effective than passive observation. This plugin transforms your interaction with Claude from "watch and learn" to "build and understand," ensuring you develop practical skills through hands-on coding of meaningful logic.
相关资源

Explanatory Output Style
Plugin用 SessionStart 钩子复刻已弃用的 Explanatory 输出风格:写代码前后插入「★ Insight」讲解实现取舍与代码库惯例。Anthropic 官方插件,会额外消耗 token。
anthropics/claude-code151k
Plugin Dev
Plugin开发 Claude Code 插件的工具包:7 个技能覆盖插件结构、钩子、MCP 集成、命令、子代理与技能编写,附八阶段引导式创建命令,以及代理生成、插件校验、技能评审三个子代理。Anthropic 官方维护。
anthropics/claude-code151k
Hookify
Plugin用一句话描述或分析近期对话自动生成钩子规则,以 Markdown 文件配置匹配条件,拦截或警告危险命令与不想要的写法,无需重启即生效。Anthropic 官方插件。
anthropics/claude-code151k
Ralph Loop
Plugin用 Stop 钩子实现 Ralph Wiggum 循环:把同一个提示词反复交给 Claude,让它基于上一轮留下的文件改动持续迭代,直到输出完成标记或达到迭代上限。Anthropic 官方插件。
anthropics/claude-plugins-official40.4k
Claude Code Setup
Plugin扫描代码库,按类别推荐最合适的钩子、技能、MCP 服务器、子代理与斜杠命令;只分析不改文件,适合给项目快速配好 Claude Code。Anthropic 官方插件。
anthropics/claude-plugins-official40.3k
Claude Plugins Official
PluginAnthropic 官方插件市场,Claude Code 默认内置,收录 300 多个官方与合作方插件,覆盖开发、安全、设计与办公协作,用 /plugin 即可浏览安装。
anthropics/claude-plugins-official40.2k