https://github.com/hugojosefson/opencode-config
config, agent definitions, tools I use with opencode.ai
https://github.com/hugojosefson/opencode-config
deno opencode vibe
Last synced: 3 months ago
JSON representation
config, agent definitions, tools I use with opencode.ai
- Host: GitHub
- URL: https://github.com/hugojosefson/opencode-config
- Owner: hugojosefson
- Created: 2025-09-30T17:52:02.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-09-30T20:42:49.000Z (3 months ago)
- Last Synced: 2025-09-30T21:06:24.784Z (3 months ago)
- Topics: deno, opencode, vibe
- Language: TypeScript
- Homepage:
- Size: 190 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Security: SECURITY.md
- Agents: AGENTS.md
Awesome Lists containing this project
README
# OpenCode Configuration
Configuration files, agent definitions, and tools for use with the opensource
client [opencode.ai](https://opencode.ai/).
Clone this repository as `~/.config/opencode` to use these configurations.
## What's here
| File/Directory | Description |
| :------------------------- | :--------------------------------------------------- |
| [AGENTS.md](AGENTS.md) | Global agent instructions loaded for all projects |
| [config.json](config.json) | OpenCode configuration (ignore the provider section) |
| [agent/](agent/) | Custom agent definitions for efficient token usage |
| [tool/](tool/) | Custom tool implementations |
## Custom agents
| Agent | Description |
| :------------------------------ | :------------------------------------------- |
| [delegator](agent/delegator.md) | Primary coordination agent (delegation-only) |
| [general](agent/general.md) | Full-capability subagent for actual work |
### Agent flow
1. Chat with the **delegator** agent, which has no tools except TODO list
management and task delegation.
2. The **delegator** breaks requests into smaller tasks and delegates them to
new instances of the **general** subagent.
3. The **general** subagent receives the same context and `AGENTS.md` but starts
with an empty context to spend all tokens on the actual task.
4. The **general** agent has access to all tools (except further delegation) and
performs the actual work: writing code, committing, pushing. It reports back
to the **delegator** when finished.
The **delegator** saves tokens because it doesn't load all tools and context.
The subagent handles all detailed operations and troubleshooting. The
**delegator** writes subagent prompts, reads completed results, and manages the
overall plan and TODO list.
### Example
This example shows the custom agent workflow using the
[opencode](https://opencode.ai/) client.
The context (upper right corner) shows the **delegator** has tokens remaining
because it delegated detailed work to the **general** subagent.
