Skip to content

gtmdev-br/opencode-profiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

OpenCode Profiles 🎭

GitHub stars MIT License Release Last commit
OpenCode CI Repo size agent-ci

Switch between OpenCode agent personalities β€” with dedicated agents, MCP servers, and permissions β€” using a single command.

Demo β€” listing profiles and running validation


$ op --list
  agents          Criador de Agentes & Skills
  build           Engenheiro de Software
  cowork          Assistente Colaborativo (All Skills)
  debug           Diagnosticador de Sistemas
  design          Designer Visual & Criativo
  development     Desenvolvedor Full-Stack
  fixbug          CaΓ§ador de Bugs
  full            Full Stack (All Skills + All MCPs)
  looping         Executor de Loops & AutomaΓ§Γ£o
  media           Produtor de ConteΓΊdo & MΓ­dia
  monster         Modo MΓ‘ximo (All Skills + All MCPs)
  openfilm        Produtor Audiovisual
  plan            Estrategista de Produto & Marketing
  sales           Executivo de Vendas
  socialmedia     Social Media Strategist
  strategy        Estrategista de NegΓ³cios & Growth
  workflow        Arquiteto de Workflows

Why?

Your OpenCode agent is only as good as its configuration. Without profiles, you use the same personality for debugging, code reviews, architecture design, and content creation β€” even though each task demands a different focus.

OpenCode Profiles lets you:

  • 🎯 Switch instantly between 17 specialized personalities
  • 🧠 Load the right agents and MCP servers for each task
  • πŸ”§ Change permissions and tool access per profile
  • πŸ’° Save tokens β€” smaller profiles use up to 93% fewer tokens than a full setup
  • 🀝 Share profiles with your team via git

Quick Install

# Clone the repository
git clone https://github.com/gtmdev-br/opencode-profiles.git ~/.config/opencode/opencode-profiles

# Run the installer
cd ~/.config/opencode/opencode-profiles
./install.sh

# Reload your shell
source ~/.zshrc

# Try it
op

Requirements: macOS or Linux, zsh, OpenCode installed.


How It Works

                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚         op <profile>              β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚         op.sh                     β”‚
                    β”‚  ────────────────────────────      β”‚
                    β”‚  1. Writes .active_profile        β”‚
                    β”‚  2. Symlinks opencode.json        β”‚
                    β”‚  3. Symlinks agents/              β”‚
                    β”‚  4. Opens opencode                β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚         opencode                   β”‚
                    β”‚  ────────────────────────────      β”‚
                    β”‚  Reads .active_profile from        β”‚
                    β”‚  CLAUDE.md PROFILE:BEGIN block     β”‚
                    β”‚  Loads profile.<name>.md           β”‚
                    β”‚  β†’ Personality active              β”‚
                    β”‚  β†’ Relevant skills available       β”‚
                    β”‚  β†’ Specific MCPs connected         β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Each profile has three layers:

Layer File What it defines
Personality profile.<name>.md Behavior rules, priorities, skill recommendations
Config opencode.<name>.json MCP servers, permissions, token limits
Agents agents-by-profile/<name>/ Sub-agents available for delegation

Available Profiles

Curated (included)

Profile Description Best for
build Software Engineer TDD coding, PR reviews, debugging
design Visual Designer & Creative UI, CSS, visual prototyping
full Full Stack (All Skills + All MCPs) Multi-disciplinary projects
monster Max Power (All Skills + All MCPs) Everything at once
agents Agent & Skill Builder Skills, MCPs, tools
sales Sales Executive Outreach, CRM, proposals
cowork Collaborative Assistant (All Skills) Pair programming
minimalista Maximum focus Simple tasks, no distractions

Community (created by users)

Profile Description Best for
debug System Diagnostician Bug hunting, root cause analysis
development Full-Stack Developer Feature development
fixbug Bug Hunter Quick fixes, patches
looping Loop & Automation Executor Repetitive tasks
media Content & Media Producer Social media, copywriting
openfilm Audiovisual Producer Video, editing, animation
plan Product & Marketing Strategist Roadmaps, strategy
socialmedia Social Media Strategist Content calendars, engagement
strategy Business & Growth Strategist Business strategy, growth
workflow Workflow Architect Process design, automation

πŸ’‘ Create your own profile from the template at profiles/profile.example.md.


Commands

op                      # List available profiles with descriptions
op <profile>            # Activate profile and launch opencode
op <profile> <path>     # Activate profile and open a specific project
op --list               # List profiles (without launching opencode)
op --help               # Show full help
op --version            # Show version

Creating a Profile

# 1. Personality template
cp profiles/profile.example.md ~/.config/opencode/profile.my-profile.md
# Edit with your favorite editor

# 2. MCP config template
cp templates/opencode.example.json ~/.config/opencode/opencode.my-profile.json
# Add your API keys, paths, etc.

# 3. (Optional) Profile-specific agents
mkdir -p ~/.config/opencode/agents-by-profile/my-profile
# Add .md agent files

# 4. Activate
op my-profile

Profile structure

~/.config/opencode/
β”œβ”€β”€ opencode.my-profile.json     ← MCP servers, permissions
β”œβ”€β”€ profile.my-profile.md        ← Personality, rules, skills
└── agents-by-profile/
    └── my-profile/              ← Sub-agents (optional)
        β”œβ”€β”€ agent1.md
        └── agent2.md

CLAUDE.md Configuration

Add this block to ~/.claude/CLAUDE.md so OpenCode automatically loads the right personality:

<!-- PROFILE:BEGIN β€” managed by install.sh, do not edit this block -->
## Ative Profile Personality

This session runs under a specific **profile** that defines your persona,
priorities, and available skills.

1. **Read the active profile name**:
   `~/.config/opencode/.active_profile`

2. **Load the personality instructions** for that profile:
   `~/.config/opencode/profile.<name>.md`

   Replace `<name>` with the content of `.active_profile`.

3. **Follow the profile's behavior rules** as your primary operating
   instructions for this session.

4. **Skills listed in the profile are recommendations** β€” you must still
   call `skill("name")` to load them. The profile tells you *which* skills
   to prioritize, not *when* to load them.

If `.active_profile` doesn't exist or the profile file is missing, fall
back to the `full` profile:
`~/.config/opencode/profile.full.md`
<!-- PROFILE:END -->

Environment Variables

Variable Default Description
OP_CONF_DIR ~/.config/opencode Configuration directory
OP_PROFILES_DIR $OP_CONF_DIR Profile personality directory
OP_DEFAULT_PROFILE build Default profile

Token Cost Comparison

Profile Tokens/req DeepSeek V3 Claude Fable 5
full 797K $130 $4,836
monster 574K $94 $3,499
build 54K $10 $380
design 36K $9 $342

Smaller profiles like build (54K) save ~93% in tokens compared to full.


FAQ

What happens when I run op build?

The script:

  1. Writes the profile name to .active_profile
  2. Symlinks opencode.json β†’ opencode.build.json (swaps MCP servers)
  3. Symlinks agents/ β†’ agents-by-profile/build/ (swaps sub-agents)
  4. Launches opencode, which reads .active_profile via CLAUDE.md
  5. The profile.build.md personality is loaded

Can I share my profiles with my team?

Yes! The repo is public by design. Only avoid committing files with API keys (opencode.*.json, .env). The .gitignore already handles this.

How do I disable the profile system?

# Remove symlinks and restore originals
rm ~/.config/opencode/opencode.json
mv ~/.config/opencode/.opencode.json.backup ~/.config/opencode/opencode.json
rm ~/.config/opencode/agents
mv ~/.config/opencode/.agents.backup ~/.config/opencode/agents

# Remove the alias
sed -i '' '/alias op=/d' ~/.zshrc
source ~/.zshrc

Does install.sh overwrite my existing profiles?

No. The installer uses cp -n (no overwrite), preserving existing files. To force update a specific profile, manually copy: cp profiles/profile.build.md ~/.config/opencode/

Can I use profiles with other AI coding tools?

The personality files (profile.*.md) use the standard AGENTS.md format, so they work with any tool that supports it. The op.sh activator is OpenCode-specific.


Star History

Star History Chart

Related

  • agent-ci β€” CLI tool for validating, testing, and benchmarking OpenCode profiles. Run agent-ci validate after installing profiles to verify everything is configured correctly, or agent-ci benchmark build design to compare two profiles on the same task.

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.


License

MIT β€” see LICENSE.



Made with ❀️ by gtmdev-br · Report bug · Discussion

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages