r/opencode
•
u/jcheroske
•
10d ago
•
3
I love OpenCode
Working in OC is very satisfying. This is a subagent display I built for v1. I would never have been able to do this in claude.
EDIT: I'm enjoying the response this post is getting. There are the usual miserable, insufferable folks you get on any post, but lots of sincere people asking real questions. It motivates me to share more.
I am very familiar with the frustrations in this agent coding space. You can feel the power of the LLM, but harnessing it to produce good code is really tough. It's easy to get a pile of code, but that code has enormous code debt baked in much of the time. How to get good, maintainable code out is the trick. There is no one right answer. I think what's needed is a structure of repositories, skills, and various deterministic code bits, such as small helper CLIs, hooks, TUI plugins, etc, that allow you to build your workflow in the way that works for you. It's small steps over weeks and months that win the race. My workflow now can lift some heavy things, but it wasn't always that way. When a shortcoming is found in the flow, you need a place to address it. That place might be a skill, the AGENTS.md itself, an agent definition, or something else. The key is having the place, or creating it, so that you can capture the change you want. I like standing on the shoulders of Superpowers, because I think the developer is solid and I think the community around it is keeping the project on track, but I might ditch it at some point if I feel it's not helping anymore.
The first thing I would do is create a repo for holding your global agent configs. I called mine opencode, but you can call it anything. You will want to symlink the folders of this repo into your home directory so that OC sees its files as the global config. You want to be able to work in this repo just like any other repo. In this repo you want to create a folder called config where you'll keep all your global config like skills, your global AGENTS.md, your TUI plugins, etc.
Next, you'll want to create a launcher CLI in this repo that wraps the launch of OpenCode. Mine is oc. This gives you a place to run scripts before OC launches. Next, you're going to create a small CLI that manages the symlinks from this repo to your home directory. It will make sure that your global config and plugins and anything else you come up with are all linked correctly. Then you will put a call to this in your oc launcher.
Here are the global skills that I feel have been the most important. Each has a SKILL.md and a references/ folder with directive files loaded via progressive disclosure. I'm going to paste in Opus's description of each one:
---
directive-quality: This is my skill for writing and maintaining the AI instructions themselves: AGENTS.md, agent prompts, skill packages and directive-bearing config. Its core rule is "use the least context that fully specifies the required behavior." It aims for clear instructions the agent actually follows, not for a lower line count. It routes each job to a focused reference, covering wording and examples, how a skill package is laid out, how skills compose, metadata validation, where an instruction should live, and structured assessments (including sweeps across a whole collection and reviews of the directives in the current conversation). Before any change it checks that the instruction is going in the right place. Afterward it checks that nothing the old text required was lost, and tests the cases where a rule should fire, where it shouldn't, and the exceptions, while stating plainly that passing those checks doesn't guarantee the agent will always comply.
code-quality: This skill shapes the code agents write, and every rule in it comes from one idea: "good code is code that is cheap to change correctly." It's organized around nine pillars. Among them: one logical change should touch one place, invalid states should be impossible to represent, modules should hide more than their interfaces expose, names should tell you what the code does, errors should be handled once where recovery is possible, decisions should be kept apart from side effects, and the codebase's existing conventions win over the agent's own preferences. It also has a self-check table of common LLM coding mistakes, such as reinventing a helper the repo already has, flag sprawl where an enum belongs, catch-log-continue error handling, pass-through wrappers, comments that just restate the code, and tests that mirror the implementation. A matching eight-step review checklist makes the point that a diff can work and still fail review. Testing guidance and architecture/audit guidance sit in separate references that load only when that kind of work starts, and agents load the skill at the start of every role in my workflow, so it applies to coding and review alike.
superpowers-policy: This is my local layer on top of the obra/superpowers (https://github.com/obra/superpowers) plugin. It changes how Superpowers behaves in my setup without forking or patching the upstream package. Its main section names exactly which upstream behaviors I override. TDD still runs red-green-refactor, but test selection follows my own test-design guide. Review checklists only count within the approved scope, so a reviewer can't turn "you could also improve…" into required work. Brainstorming has to restate the intended outcome before it proposes options, and spec and plan locations follow my planning-folder conventions. The rest is a routing table: for each orchestration action it names the one reference that governs it, such as review-loop budgets, picking and continuing workers, sizing tasks, delegating writing, handling unknowns before dependent work, and closing out an effort. Agents load only the reference they need for the action at hand, and a missing reference stops that action instead of letting the agent improvise.
---
Ok, enough Opus spam. I'm going to stop there for now. If folks want to talk about other parts of the workflow, such as agent generation, let me know and I'll add it.