This repository contains the OpenCode AI coding agent skill for the OpenClaw framework.
OpenCode is an advanced AI coding agent that can:
- Generate code from natural language descriptions
- Review code for bugs, performance issues, and best practices
- Refactor existing code for improved maintainability
- Assist with debugging and fixing issues
- Generate documentation for codebases
- Integrate with ACP (Automated Control Protocol) for web application interaction
- Background Processing: Long-running OpenCode tasks run in the background
- Model Flexibility: Support for various AI models including DeepSeek variants
- Project Context Awareness: Works within specific project directories
- ACO Protocol Support: Automated Control Protocol integration for web apps
- Process Management: Monitor, control, and interact with running OpenCode sessions
- OpenCode CLI tool installed and available in PATH
- Appropriate AI model access credentials (if required)
bash workdir:~/my-project background:true command:"opencode run \"Create a React component for user authentication\""bash workdir:~/my-project background:true command:"opencode -m deepseek/deepseek-coder run \"Implement the API endpoints for user management\""bash workdir:~/my-project background:true command:"opencode run \"Review the changes in src/services and suggest improvements\""# Run general OpenCode task
./run.sh run ./my-project "Create a caching layer for the database queries"
# Perform code review
./run.sh review ./my-project "src/utils"
# Fix specific bugs
./run.sh fix ./my-project "memory leaks in data processing module"This skill integrates with:
- The coding-agent framework
- ACP (Automated Control Protocol) for web application automation
- Background process management for long-running tasks
- Various AI models including DeepSeek, GPT, and others
- Always review AI-generated code before merging to production
- Be specific with prompts to get better results
- Break complex tasks into smaller, focused prompts
- Monitor background processes and terminate if necessary