🤔Did You Know This About OpenCode??
Did you know you can completely rewrite OpenCode’s default system prompt directly from your config?
All you have to do is drop a prompt key into your opencode.json file and point it to a local markdown file. You can target the build agent, the plan agent, or use this exact architecture to spin up entirely custom sub-agents inside your repo.
Here is what the configuration looks like:
{
"agent": {
"build": {
"mode": "primary",
"model": "anthropic/claude-sonnet-4-20250514",
"prompt": "{file:./prompts/build.txt}",
"permission": {
"edit": "allow",
"bash": "allow"
}
},
"plan": {
"mode": "primary",
"model": "anthropic/claude-haiku-4-20250514",
"permission": {
"edit": "deny",
"bash": "deny"
}
},
"code-reviewer": {
"description": "Reviews code for best practices and potential issues",
"mode": "subagent",
"model": "anthropic/claude-sonnet-4-20250514",
"prompt": "You are a code reviewer. Focus on security, performance, and maintainability.",
"permission": {
"edit": "deny"
}
}
}
}
1:02
2
2 comments
Brandon Melville
5
🤔Did You Know This About OpenCode??
The Cheddar Chase
skool.com/thecheddarchase
Learn AI tools and business strategies that actually make money online. Step-by-step AI strategy for real growth.
Leaderboard (30-day)
Powered by