Add output-style feature similar to Claude Code
Summary
Add an output-style feature similar to Claude Code's output styles, allowing users to customize Claude's communication style and behavior for different use cases.
Description
Claude Code has a powerful output-style feature that allows users to completely change the AI assistant's personality, tone, and approach to tasks by swapping out the system prompt. This would be a valuable addition to OpenCode.
Key Features from Claude Code:
-
Built-in Output Styles:
- Default: Standard software engineering assistance
- Explanatory: Provides educational insights while coding
- Learning: Collaborative learn-by-doing mode with TODO(human) markers
-
Custom Output Styles: Users can create their own styles as Markdown files with frontmatter
-
How it Works:
- Directly modifies the system prompt
- Can exclude coding instructions unless specified
- Maintains core capabilities (file operations, script running, TODO tracking)
-
Usage:
- command to access menu
- to switch directly
- Project-level configuration
Benefits:
- Flexibility: Adapt OpenCode for different use cases beyond software engineering
- Customization: Allow users to create specialized assistants for teaching, mentoring, etc.
- Consistency: Maintain core OpenCode capabilities while changing behavior
Implementation Approach:
- Add output style configuration system
- Create slash command
- Support built-in styles (Default, Explanatory, Learning)
- Allow custom styles via Markdown files
- Store configuration at project level
This feature would significantly enhance OpenCode's versatility and user experience.
This issue might be a duplicate of existing issues. Please check:
- #3195: Dynamic system prompts for custom agents
Both requests focus on allowing users to customize the AI's behavior through system prompt modifications for different use cases. #3195 discusses dynamic system prompt generation for custom agents, while this issue proposes output styles as presets for switching behavior modes.
Feel free to ignore if you're specifically looking for a feature identical to Claude Code's output style system.
Hey @observerw, I wanna give it a try. Could you please assign it to me?
@hsachdeva9 observer is not a maintainer, they cannot assign issues to you.
Have you read our contributing rules?
Just create new primary agent, the output is same, Agent is more flexible then claude output-style
Just create new primary agent, the output is same, Agent is more flexible then claude output-style
Make sense, I'm using this method for now.
However, I think the primary agent is for "what to do" (coding, planning, etc.), and output style is for "how to do it" (consice, detailed, etc.). These are two factors that can be combined arbitrary.
i second this! i would like to use general agents and change between output styles without having to duplicate each agent "mode" (like build, plan, explain) per style