r/opencode • u/jcheroske • 20d ago
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.
41
u/ComfortableJacket283 20d ago
how much does it cost you in api credits lol
16
u/Pinterest_animals 20d ago
Can't understand what's opencode role here
10
u/UnchartedFr 20d ago
what plugin do you use for the display of your agents ?
16
u/Total-Management8023 20d ago
wait..... 36 subagents?????????? holy shit i need to get my rookie numbers up. most of the time my models just use 10 at max
13
u/Bagelsarenakeddonuts 20d ago
everyone does this, but for some reason there is no standard open process for it, which is wild to me.
Sure everyone's workflow is a little different, but I'd adopt someone elses workflow if they had all these kinks worked out.
Are there any open source collaborations to define this sort of workflow, with specific roles and skills? I mean not one random person's take, but an actual group of people collaborating?
2
u/ha_ku_na 20d ago
This looks promising, could you please share details of your setup spl the orcehstration and managin subagents part.
2
u/firest3rm6 20d ago
"I would never be able to do this in claude" ok bud
7
u/Any_Confidence2580 19d ago edited 19d ago •
You seem butt hurt that anyone would look at this and not immediately see what's wrong with this.
You paid a frontier model to execute a workflow you had already designed. That is the whole problem, and everything below is why.
HarnessTax ran 21 model-harness pairs with the model held fixed. Harness choice moves success by +-2% on SWE-bench Lite and +-5% on Terminal-Bench 2.0. Cost moves 2x between harnesses and up to 5x overall. The Scaffold Effect study found up to 40x in tokens per solved task against 0 to 8 points of pass rate.
Your harness is worth a few points and a multiple on cost. That is the lever. It is not worth a frontier model's rate on top of it, and you have not noticed that the structure you built is the reason you don't need one.
For scale: my blended cost per token is three cents per million. The sticker price on the model is fifteen cents input and sixty cents output; three cents is what you get when the cache hit rate is high and the harness keeps the prefix stable. Against a frontier model that is a five to twenty times difference before you count anything else.
Your Talos upgrade proves the point. Three major versions behind, config format changes, plugins to decommission, failure modes to test, one node at a time with reboots. Every one of those is a lookup with a check attached. That version dropped the in-tree cloud provider. That API version is gone from that manifest. Snapshot etcd before every bump. None of it needs a model that reasons about ambiguity. It needs a list and something that refuses to advance when a check fails.
You keep calling the task complex. It is long. Those are different problems and only one of them costs money.
I run a .NET 10 / Avalonia agent harness: domain-driven, an ACL on every external dependency, a doctrine test suite that enforces its own conventions, LSP integration, chain orchestration with git worktrees and a reconciler step. It has never used anything but GLM-5.3-Flash and DeepSeek V4.1-Flash-1017.
It works because the harness decides and the model executes. A plan becomes a chain. Each step is one session. The session opens with a rendered brief naming its one step, the plan goal, the ledger key, and the completion contract, and nothing else. The model may mark exactly one step done, and only if a verification command exited 0 since its last edit. The gate reads the session's shell ledger, so a green run from an hour ago followed by five edits is refused. The harness starts the next session. The model never picks what runs next.
A model that only has to do the step in front of it does not need to be smart. It needs to not deviate. That is the trick, and it is why the model stops mattering.
Now the part you are being misled about. You wrote a superpowers-policy skill to override upstream behavior. You built a layer to overrule the framework and then credited the framework.
Look at what you are overriding. Superpowers is a SessionStart hook injecting a meta-skill in EXTREMELY_IMPORTANT tags with a 1% rule: if there is even a 1% chance a skill applies, you must invoke it. Plus a red-flags table that pre-rebuts the rationalizations a model might make. Vincent says on the record it is deliberate persuasion engineering, drawing on Cialdini and the Wharton call-me-a-jerk study.
That is a forcing function for models that do not reliably run the procedure. Opus already runs it. Ask it to write the failing test first and it does. It does not need a table of excuses it might make, so the skill arrives as a second specification for something the model already has, and the model reconciles the two in its own idiom. It reads as compliance in the transcript. It does not show up in the diff.
Which is why your workflow needs the expensive model. Your correctness depends on the model's judgment about your instructions. The more capable the model, the better it is at deciding which parts of your methodology to follow. That is the trap, and it gets more expensive every time models improve.
The inverse is why a harness running GLM-5.3-Flash and DeepSeek V4.1-Flash-1017 finds Superpowers naive, and is right. Those are not weak models. They execute a procedure as well as anything you would pay ten times for, which is the point of the whole post. You're making on overpriced Opus read a Superpowers directive, notices it conflicts with something else in the context, and resolves the conflict before it acts. You get the behavior the directive asked for and conclude the directive worked. A model that simply executes does not perform that reconciliation, so a directive that says nothing the harness does not already enforce shows up as work that had to be redone.
On subagents you already diagnosed it and then kept the expensive half. You said Superpowers reused them too much and contexts were bloating. A fresh subagent is a fresh context, and a fresh context is a full-price context. On DeepSeek's card a cache hit is 50x cheaper than a miss. Superpowers 6.4's own release notes put inline execution at roughly 2x faster and half the cost of subagent-driven development with frontier models. You are running the configuration its author moved off, at a frontier premium.
What would have made your upgrade cheap: write the checklist. One line per version bump, one line per API removal, one line per plugin to decommission. Put a gate on each line. Let a three-cent model work the list. Let kubectl get nodes and an etcd health check decide whether it worked. None of that is a model's opinion, which is exactly why it does not need an expensive model to produce it.
You're the one that said the answer is repositories and skills and deterministic bits. But you're not following your own advice. You're depending on Opus to fix a mess for you on every turn. If you just want a pat on the back for a screenshot and a "woopie!" for using Kubernetes, you already got it.
1
u/Flaky_Pay_2367 20d ago
seems nice, could you share this workflow via github?
1
u/FaerunAtanvar 20d ago
So you don't want to share you orchestration and TUI setup?
1
u/Gumbi_Digital 19d ago
Have you tried T3 Code and agent orchestration?
1
u/2thick2fly 18d ago
My most interesting observation is that there seem to be virtually zero posts in Claude or Codex subreddits that discuss so detailed harnesses. Everyone seems to just vibing it without having any process around it - at least nothing more than the coding agent apps provide, which I think are definitely not enough.
1
u/Slow-Set-2856 18d ago
Why sonnet over opus?
1
u/snseeee 18d ago
Good! Matt pocock repo is top on software engineering as well, check it out and maybe you can improve your workflow as well it brings decades of experience in software engineering and computer science engineering
1
u/ChipmunkDbuffy 17d ago
What about refusal my claude max always refuses should I try it
2
u/MisterTHP 19d ago
me too i love opencode i am creating my own irc client v3 with it and it's awesome
1
u/blomjoe 20d ago
Looks very nice. Would you be open to share this tool?
1
u/Much-Researcher6135 20d ago
I really do think opencode is great, it's so clean to work with. Is it easy to extend?
1
u/KillrOfLife 20d ago
Care to hare your config?
1
u/Emergency-Celery6344 20d ago
hi I really need this can you please share, I am on limited plan so can't vibe my way
1
u/JoaoSilvaSenpai 20d ago
if you are looking for integration just use pi
1
u/Competitive-Yak-8255 19d ago
Nice
1
u/foreachKid 17d ago
Try T3 Code. This is reinventing the wheel.
1
u/--EyeInTheSky-- 16d ago
I'm not reading this
1
u/Junglistsss 16d ago edited 16d ago
The guy talks about bad code written by AI (granted code written by people are often multitude worse) but then used AI to generate his post lol.
Also technically, yes its not allowed to use Anthropic subscription this way. Currently not enforced.
1
u/MysteriousCoconut31 19d ago
I'm not reading all of that, but happy for you. Try to be more concise next time. Help me understand your point faster.
-1
u/Any_Confidence2580 20d ago
This is a horribly inefficient and expensive run.
0
u/MikeyKInc 20d ago
use oh-my-opencode-slim
1
u/[deleted] 20d ago
[removed] — view removed comment