This repository contains the configuration files for Opencode, an interactive CLI tool designed to assist users with software engineering tasks. Opencode leverages specialized AI agents to help with coding, debugging, refactoring, and more. The configurations here define the behaviors and capabilities of these agents.
The repository is typically located at ~/.config/opencode on Unix-like systems (Linux/macOS) or equivalent on Windows.
This directory holds Markdown files (.md) that define the specialized agents. Each file describes the expertise, tools, and focus areas of a particular agent type. These agents can be invoked using the task tool within Opencode sessions.
-
ai-engineer.md: Configuration for an AI engineering specialist. Focuses on building AI systems, including model integration, prompt engineering, and AI workflow automation. Ideal for tasks involving LLMs, embeddings, and AI pipelines.
-
code-reviewer.md: Defines a code reviewer agent. Specializes in analyzing code for quality, security vulnerabilities, best practices, and performance issues. Supports multiple languages and provides actionable feedback on maintainability and technical debt.
-
data-analyst.md: For data analysis and business intelligence tasks. Expertise in SQL, Python for data manipulation, visualization tools (e.g., Matplotlib, Tableau), and deriving actionable insights from datasets.
-
data-engineer.md: Configuration for data engineering workflows. Covers building scalable data pipelines, ETL/ELT processes, big data technologies (e.g., Spark, Kafka), and cloud platforms (e.g., AWS, GCP) for reliable data infrastructure.
-
data-scientist.md: Tailored for data science projects. Includes statistical analysis, machine learning model development, exploratory data analysis (EDA), and storytelling with data to drive business decisions.
-
git-workflow-manager.md: Git specialist for branching strategies, merge conflict resolution, repository management, and team collaboration. Helps automate workflows and ensure scalable version control practices.
-
ml-engineer.md: Machine learning engineering agent. Manages the full ML lifecycle: from data preparation and model training to deployment, monitoring, and optimization of ML systems in production.
-
python-pro.md: Advanced Python development agent. Emphasizes modern Python 3.11+ features, type safety (e.g., mypy), async programming, data science libraries (e.g., Pandas, NumPy), and web frameworks (e.g., FastAPI, Django).
-
rust-engineer.md: Rust systems programming expert. Focuses on memory safety, ownership models, async Rust, performance optimization, and building mission-critical applications like CLI tools or embedded systems.
The core configuration file for Opencode. It specifies global settings, such as default behaviors, tool integrations, and environment variables. Do not edit this file unless you understand the implications, as it controls the tool's functionality.
-
Installation:
- Clone or copy this repository to
~/.config/opencode. - Ensure Opencode CLI is installed (via npm or your package manager). Refer to the official documentation at https://opencode.ai for installation instructions.
- Clone or copy this repository to
-
Running Opencode:
- Navigate to your project directory.
- Run
opencodein your terminal. - Interact with the tool by describing your task (e.g., "Fix this bug in main.py" or "Add a new feature to the API").
-
Invoking Agents:
- For complex tasks, Opencode can launch specialized agents using the
tasktool. - Example: To review code, use the code-reviewer agent by specifying
subagent_type: \"code-reviewer\"in your task prompt.
- For complex tasks, Opencode can launch specialized agents using the
-
Customization:
- Edit agent Markdown files to tailor behaviors to your needs (e.g., add specific tools or adjust expertise focus).
- Update
opencode.jsonfor global changes, but back it up first.
Opencode provides a suite of tools for file manipulation, code execution, web fetching, and more. Agents have access to:
- Bash: Execute shell commands.
- Edit/Write/Read: Modify and inspect files.
- Glob/Grep/List: Search and list codebase elements.
- Task: Launch sub-agents for specialized work.
- TodoWrite/TodoRead: Manage task lists for complex projects.
- WebFetch: Retrieve and analyze web content.
- Issues: Report bugs or suggest improvements at https://github.com/sst/opencode/issues.
- Contributing: Fork the repo, add new agent configurations, and submit a pull request.
- License: This configuration is open-source; check individual files for details.
- If agents don't load, verify the path
~/.config/opencodeand file permissions. - For tool errors, ensure your environment has necessary dependencies (e.g., Git, Node.js).
- Consult the Opencode docs at https://opencode.ai for detailed troubleshooting.
For more information, visit the official Opencode website or join the community discussions.