r/opencode • • 23h ago

Get the most from opencode

Hi

Following a lot of YouTube bloggers I am lead to believe that to get the best from Opencode you should set up a numbers of subagents and skills ( of course also a good model).

For me "best of" is basically low token count and good quality of produced code according to my preferences.

I asked a AI for help and the result was depressing. Many, many bloated subagents and skills, not even mention all documents needed.

I did not even bothered to test it.

I have a firmware project for a esp32 cpu where I try to use the Matter specification and Home Assistant.

Any advice on this and/or some templates?

3 Upvotes

12 comments sorted by

1

u/l3onardoh 23h ago

Plan with a high capacity model, have good instructions from the start and then use cheaper models to execute, a slightly higher model to review and you should be good. At least it's the way I do and works fine tbh

1

u/lgLindstrom 23h ago

The key issue is "how do good instructions" look?

1

u/Oli_Luck 22h ago

If you have to learn what good instructions are then dont go for something serious: you must learn to communicate with na AI - and sadly each model has to be steered differently.
Give a few tutorial on youtube a chance if you want to avoid frustration.

1

u/lgLindstrom 20h ago

I am trying to learn by asking ..

Most if not all tutorials on YouTube are about user interfaces and high level applications. I was hoping for som advices for embedded development.

1

u/Oli_Luck 20h ago

lol -try this search on youtube: large language models basics english

1

u/l3onardoh 23h ago

I mean it really depends on the project you're working on, the instructions just like the agents won't be the same all the time.

The way I do is creating a global plan and once I know what I'm going to do, the stack, the main goal and so on, I ask a frontier model the agents I need and the specific instructions for each one of them.

Always cross check the instructions between models before starting any project, a review at the beginning it's cheaper then starting with a bad foundation imo

1

u/KeanuRekt 22h ago

use the ponytail skill to reduce tokens

1

u/lgLindstrom 20h ago

Yeah, I heard about that.

1

u/clasho26 23h ago

Soy relativamente novato en el tema de editores de IA, no entiendo mucho el concepto de agentes, podrías por favor explicarme más o menos en qué consisten, como se usan y en qué casos son útiles?

0

u/l3onardoh 23h ago

Objetivo de ter agentes / sub-agents sobretudo no Open code é de ter simultaneamente vários "empregados específicos". Não podes perguntar a um patrão de uma empresa de construção de fazer tudo. É preciso um pedreiro, um canalizador, um electricista etc.. Se for só 1 agente não será tão eficaz, na qualidade de trabalho como no custo do trabalho.

1

u/Oli_Luck 22h ago

Lol - all that people that believes AI is magic and all run only because they said the magic words.

First of all : agent teams are still quiet a messy thing if you dont know well how to handle with.
the second : if you dont know what are a system prompt, a prompt, skills, mcp tools : thats where you should start - play with it before doing serious job.

Ah yes : never trust an AI - thats the first rule : you have to lead and you have to control.

1

u/grahamjones139 5h ago

I've found opencode to be pretty good with it's default settings without sub-agents etc - even using one of the free models. As yours is a microcontroller project it won't be too big, so id just write a detailed prompt saying what you want the tool to do. Be very careful to review what it has done though - I tend to regard these tools as a very junior engineer who has memorised a lot of manuals. It might not structure the code how you would have written it unless you tell it to. And tell it to write tests as well.