I have found opencode isn't very good at understanding itself, especially when it comes to writing plugins or custom tools. Context7 is obviously available, as is webfetch. But since collating all the .mdx docs to provide as context, performance wise it's doing a much better job "on itself". Context7 works sometimes but it's often too narrowly scoped, I've found an information dump far more effective.
A usage example is asking "In opencode, how can I run a linter after each file edit and have any violations fixed immediately". Or questions where there are many ways to do it - a plugin, a subagent, agent, command... figuring out the "best" way. In those cases, it helps to preload all docs, which are all well written and concise anyway.
The idea being that opencode can proactively help users make the most of opencode, or add a feature, or in my case figure out how to transpose things from other clients (Claude Code, Kilo, Cursor).
I believe Claude Code, as part of its system prompt or similar, has instructions on on how to look up anthropic's reference docs (which is available in .md format at URLs like https://docs.claude.com/en/docs/claude-code/hooks.md). Claude Code is much better at creating its own agents/subagents/commands etc. whereas in my experience, Opencode gets really confused and ends up creating bizarre formats, structure, frontmatter, etc. unless there are existing patterns for it to mirror.
Best performance is when you have opencode source cloned and let it research and investigate more thoroughly, but that's an inch too far for most usage.
I have found opencode isn't very good at understanding itself, especially when it comes to writing plugins or custom tools. Context7 is obviously available, as is webfetch. But since collating all the
.mdxdocs to provide as context, performance wise it's doing a much better job "on itself". Context7 works sometimes but it's often too narrowly scoped, I've found an information dump far more effective.A usage example is asking "In opencode, how can I run a linter after each file edit and have any violations fixed immediately". Or questions where there are many ways to do it - a plugin, a subagent, agent, command... figuring out the "best" way. In those cases, it helps to preload all docs, which are all well written and concise anyway.
The idea being that opencode can proactively help users make the most of opencode, or add a feature, or in my case figure out how to transpose things from other clients (Claude Code, Kilo, Cursor).
I believe Claude Code, as part of its system prompt or similar, has instructions on on how to look up anthropic's reference docs (which is available in .md format at URLs like https://docs.claude.com/en/docs/claude-code/hooks.md). Claude Code is much better at creating its own agents/subagents/commands etc. whereas in my experience, Opencode gets really confused and ends up creating bizarre formats, structure, frontmatter, etc. unless there are existing patterns for it to mirror.
Best performance is when you have opencode source cloned and let it research and investigate more thoroughly, but that's an inch too far for most usage.