opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Add output-style feature similar to Claude Code

Open observerw opened this issue 3 weeks ago • 6 comments

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:

  1. 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
  2. Custom Output Styles: Users can create their own styles as Markdown files with frontmatter

  3. How it Works:

    • Directly modifies the system prompt
    • Can exclude coding instructions unless specified
    • Maintains core capabilities (file operations, script running, TODO tracking)
  4. 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:

  1. Add output style configuration system
  2. Create slash command
  3. Support built-in styles (Default, Explanatory, Learning)
  4. Allow custom styles via Markdown files
  5. Store configuration at project level

This feature would significantly enhance OpenCode's versatility and user experience.

observerw avatar Dec 07 '25 12:12 observerw

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.

github-actions[bot] avatar Dec 07 '25 12:12 github-actions[bot]

Hey @observerw, I wanna give it a try. Could you please assign it to me?

hsachdeva9 avatar Dec 07 '25 17:12 hsachdeva9

@hsachdeva9 observer is not a maintainer, they cannot assign issues to you.

Have you read our contributing rules?

rekram1-node avatar Dec 07 '25 18:12 rekram1-node

Just create new primary agent, the output is same, Agent is more flexible then claude output-style

JunarisAlf avatar Dec 09 '25 06:12 JunarisAlf

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.

observerw avatar Dec 09 '25 06:12 observerw

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

InhaEclipse avatar Dec 11 '25 18:12 InhaEclipse