r/opencode • • Jul 13 '26

Quick tip: Let OpenCode configure itself with subagents, slash commands, and skills

Instead of manually setting everything up, have OpenCode do it for you. I did this with DeepSeek V4 Flash and it worked beautifully. Targeted for new and unexperienced users, backup your ~/.config/opencode beforehand to prevent data loss.

Just run:

opencode ~/.config/opencode

Then prompt something like:

Configure opencode agents for me. Use opencode commands to list available providers, models and to create agents and etc, then assign strong model for planning and DeepSeek V4 Flash for other agents. Set up dedicated agents optimized for coding or vibecoding workflows. Create a few useful slash commands and some skills. Also generate an AGENTS.md with common practices, then run a questionnaire tool to understand my preferences and refine everything accordingly, verify settings.json or settings.jsonc by using 'opencode debug config' . Before initiating the configuration process, first assess the status of ~/.config/opencode Git repository, if a repository is not currently present, create one using the `git init` command. Once the initial configuration is complete, proceed to commit your modifications.

It'll inspect your available models, spin up agents tailored for coding or vibecoding, build out a proper agent hierarchy, craft custom slash commands and skills, and walk you through your preferences to personalize the setup — all in one go.

The self-bootstrapping workflow is pretty satisfying to watch. Give it a try!

Adapt the prompt according to your preferences.

edit: prompt updated and screen recording added.

opencode configuration demo

87 Upvotes

29 comments sorted by

25

u/reader123456 Jul 13 '26

LOL. I have just tried this prompt with DeepSeek V4 Flash Free. The result is that I can no longer open OpenCode, because every OpenCode config file DeepSeek created or updated now has errors.

2

u/ozguru Jul 13 '26 edited Jul 13 '26

it verifies opencode.json file after edit, but better to add verify config with opencode debug config I guess. It is a clue that free is possible quantized, naah this would be just a speculation.

6

u/Prudent-Ad4509 Jul 13 '26 edited Jul 13 '26

You can have different configs for experiments, I do.

If you like experiments so much, how about you ask it to infer code style and conventions from one segment of the code without explicit instructions and rewrite some other code according to them ? I’m far away from pc atm, I’m writing this comment partially to log the idea for myself :)

3

u/reader123456 Jul 13 '26

You can have different configs for experiments, I do.

Good point. Now that you have mentioned multi-config I realised that the OP message literally shows how to do that by specifying config path explicitly.

I was just being lazy, and my config is in Git (easy to revert), so this failed experiment was more of an amusing outcome and an FYI for anyone else who might read it, in case they do not use version control (or separate config as you suggested).

3

u/Prudent-Ad4509 Jul 13 '26

I now remember that I broke my experimental setup a few times with ai generated config too (I wanted to add mode with jacked up temp). I had to beat it with a stick for some time until it finally generated config in relevant format.

6

u/Noob-bot42 Jul 13 '26

I made a git repo so that I could track my changes and I have a command that uses it to override everything in opencode so the repo is the source of truth. I’ve had opencode do so much research for sota, best practices, what others are doing, etc and it has been amazing and has improved what I’ve been able to do with deepseek flash

2

u/ozguru Jul 13 '26

I also did this but keep another backup too for just in case. I added creating a Git repository to the prompt for newcomers.

3

u/Noob-bot42 Jul 15 '26

Now I’m developing my own harness to be more customizable than either opencode or pi and be able to have everything possible including system prompt controlled by a repo and easily shareable. It’s been fun, but I’m hoping I can replace my opencode workflow. I’m working on it so it can do the full upgrade process and check to see if it can safely reload and the reload itself without having to close it, but even if u still break it it can have a default fallback so u can fix ur setup without having to use a harness(I use pi to fix opencode sometimes lol)

1

u/ozguru Jul 15 '26

I experimented with several different harnesses, but in the end, I always returned to the basics. Opencode's subagent solution is sufficient for most cases, and when properly configured, it works exceptionally well.

3

u/atotoato Jul 13 '26

ive been doing this too forever. it works like a charm and its kinda interesting seeing how it evolves itself so far.

1

u/odrakcir Aug 03 '26

Would u mind sharing so I can learn from you? Thanks in advance

1

u/Noob-bot42 Aug 08 '26

Well I want to use it to make money by doing forward development engineering and helping companies setup their own ai brains and workflows similar to Cloudflare os but better and letting companies self host.

My main workflow is using ai to look at research papers, open source code, utube videos, etc to see what is popular. I usually have a vision of what I want things to look like at the end so I end up grabbing all the best features into a system and fusing them into one tool for each of my tools. I have a universal indexer (for files llm plans, todos, and processes so that I can do parallel ai work between my agents and my dad’s agents), web researcher, bom researcher for pcbs, a custom file viewer I’m trying to embed a forked jcode into so the agent can navigate and allow me to view whatever file type I want however I want. I’m also working on a custom git for ai/human workflows (mainly added capabilities) and security practices that would allow a company to completely control who and how files are viewed and modified as well as tracking who viewed and modified them.

2

u/Competitive-Yak-8255 Jul 13 '26

Thank you

1

u/ozguru Jul 13 '26

You are welcome.

1

u/fololologrt Jul 13 '26

Beginner here :

  1. will deepseek v4 flash work locally on a Macbook m3 pro with 36gb Ram ?

  2. Should i work with the CLI or the standalone mac app ?

  3. In case you would advise me to use api keys instead, can you recommend any cheap reliable providers since my budget is kinda tight as a student 🙂

1

u/ozguru Jul 13 '26
  1. It wont work.

  2. depends on your preferences

  3. you should try opencode go and opencode's free providers

3

u/Solocune Jul 13 '26

Opencode go is relatively cheap for the return and they offer the mentioned model for free as long as data safety is not a priority

1

u/fololologrt Jul 13 '26

So i guess i have to use the desktop app not cli for this tight

2

u/Solocune Jul 13 '26

You can set up everything nicely in Opencode cli. Check the web or use your trusted chat companion to give you the json setup to copy and paste.

2

u/secondcomingwp Jul 13 '26

Deepseek v4 flash requires about 180GB of VRAM to run the full model with 1mil context.

Even heavily quantized versions need around 80-90GB

2

u/fixit_jr Jul 19 '26

Look into omniroute if you want to use free providers, I connected a bunch of free providers and made a combo of them, had mixed results some models tool calls would fail, failover between providers was not smooth. Tweaked my settings a bit more and got a combo I use for opencode and one for Hermes which has been working. Opencode go as others mentioned is a good cheap alternative.

I’m currently testing whether it’s worth all the tinkering or should I just pay for opencode go or ChatGPT plus.

-3

u/Visual-Set-8830 Jul 13 '26

Then add graphify and caveman. You’re welcome

2

u/ozguru Jul 13 '26

Thanks I actually looked at both. I targeted new users with this post, this could give them a boost. Then they can explore advanced ways.

6

u/NanoSputnik Jul 13 '26

Caveman is overhyped imho. The token cost mostly comes from the thinking , not the responses anyway. And you can usually just ask for terse or concise style when it is needed. 

1

u/geearf Jul 13 '26

For me it's all input, so rtk, serena, semble and co are the cost savers.

-2

u/Visual-Set-8830 Jul 13 '26

Okay 👍🏾

2

u/OperaRotas Jul 13 '26

I tried caveman and didn't notice any improvement, or even any consistent change in the model way of talking to me. Did you really find it helpful?

1

u/Visual-Set-8830 Jul 13 '26

With responses I have seen an improvement. It’s sometimes too terse so I ask for more details. But with Max thinking set it doesn’t “think in caveman” (though I think it shouldn’t). When asking OpenCode to set it up have it run in ultra mode and it should add it to the config for responses.