OpenClaw skill
coding-opencode
An OpenClaw skill named coding-opencode that enables agents to interact with the OpenCode coding environment. It provides tools for generating code, executing code in a sandbox, viewing execution results, and managing code files. The skill supports multiple programming languages through OpenCode's interpreter capabilities.
Files
Review the files below to add this skill to your agents.
Security notice: review the SKILL.md file and repository content first before using any third-party skill.
SKILL.md content
---
name: coding-opencode
description: Memungkinkan penggunaan agen pengkodean OpenCode yang telah dikustomisasi dengan "Oh My OpenCode" untuk tugas pengembangan kode yang kompleks, eksplorasi codebase, debugging, refactoring, dan orkestrasi multi-model. Gunakan skill ini ketika Anda membutuhkan bantuan coding AI yang otonom dan canggih, terutama saat Anda ingin memanfaatkan fitur-fitur "Oh My OpenCode" seperti agen Sisyphus, Hephaestus, Oracle, Librarian, atau Explorer, serta alat LSP/AST.
---
# Skill: coding-opencode
Skill ini dirancang untuk memanfaatkan kemampuan penuh dari instalasi OpenCode Anda yang telah dikustomisasi dengan "Oh My OpenCode". Ini memberikan akses ke orkestrasi multi-agen yang canggih, alat pengembangan yang terintegrasi, dan alur kerja otomatis untuk menyelesaikan tugas-tugas pengkodean.
## Kapan Menggunakan Skill Ini
Gunakan `coding-opencode` ketika Anda:
* Membutuhkan bantuan AI untuk menulis atau memodifikasi kode.
* Perlu melakukan eksplorasi codebase yang mendalam.
* Membutuhkan bantuan untuk debugging atau refactoring.
* Ingin memanfaatkan agen khusus seperti Frontend UI/UX Engineer atau Oracle.
* Berencana untuk melakukan tugas pengembangan yang membutuhkan beberapa langkah dan koordinasi antar agen.
* Ingin mengaktifkan mode "ultrawork" atau "ulw" untuk eksekusi tugas yang otonom dan berkelanjutan.
## Fitur Utama Melalui "Oh My OpenCode"
"Oh My OpenCode" menghadirkan beberapa agen dan fitur canggih ke OpenCode Anda:
* **Sisyphus (Main Agent)**: Mengorkestrasi agen-agen lain untuk memastikan tugas diselesaikan sampai tuntas.
* **Hephaestus (Autonomous Deep Worker)**: Agen otonom yang berorientasi pada tujuan untuk eksekusi mendalam.
* **Oracle (Design & Debugging)**: Agen spesialis untuk membantu dalam desain dan proses debugging.
* **Librarian (Docs & Codebase Exploration)**: Agen untuk mencari dokumentasi dan menjelajahi codebase.
* **Explore (Fast Codebase Grep)**: Untuk eksplorasi codebase yang sangat cepat.
* **LSP & AST Tools**: Dukungan penuh untuk Language Server Protocol (LSP) dan Abstract Syntax Tree (AST) untuk refactoring yang lebih akurat dan aman.
* **Multi-model Orchestration**: Memungkinkan penggunaan berbagai model AI yang berbeda, masing-masing dioptimalkan untuk tugas tertentu.
* **`ultrawork` / `ulw` Keyword**: Cukup sertakan `ultrawork` atau `ulw` dalam perintah Anda untuk mengaktifkan alur kerja otomatis penuh yang memanfaatkan semua agen dan fitur "Oh My OpenCode".
## Cara Menggunakan
Untuk menggunakan skill ini, Anda dapat memanggil perintah OpenCode melalui tool `exec`, dan menyertakan instruksi serta argumen yang diperlukan. Jika Anda ingin mengaktifkan orkestrasi penuh dari "Oh My OpenCode", pastikan untuk menyertakan `ultrawork` atau `ulw` dalam *prompt* atau argumen Anda.
**Contoh Umum:**
```bash
# Untuk memulai sesi OpenCode dengan mode ultrawork
opencode --agent build --ultrawork "Buatkan sebuah fungsi Python untuk menghitung deret Fibonacci"
# Untuk meminta agen Librarian mencari informasi tentang suatu API
opencode --agent build "ulw: Cari dokumentasi untuk API 'requests' Python dan berikan contoh penggunaan dasar."
# Untuk refactoring kode
opencode --agent build "ulw: Refactor file 'src/main.js' agar menggunakan async/await."
```
**Perhatikan:** Perintah `opencode` di atas adalah contoh. Karena OpenCode diinstal di **WSL** dan dijalankan via **PowerShell**, setiap perintah OpenCode perlu diawali dengan `wsl`.
Contoh: `wsl opencode ...`
**Target Folder:** Semua operasi pengkodean atau manipulasi file akan menargetkan `C:\Users\Administrator\Documents\Jagonyakomputer` sebagai *working directory* utama secara default, kecuali jika ditentukan lain.
**Integrasi Docker:** Agent memiliki kemampuan untuk mengoperasikan Docker container via PowerShell, jika diperlukan untuk tugas yang melibatkan containerisasi atau lingkungan pengembangan terisolasi.
## Konfigurasi
"Oh My OpenCode" sangat dapat dikustomisasi. Konfigurasi dapat ditemukan di:
* `.opencode/oh-my-opencode.json` (untuk proyek)
* `~/.config/opencode/oh-my-opencode.json` (untuk pengguna)
Anda dapat mengubah model yang digunakan oleh agen tertentu, suhu, *prompt*, dan izin di file konfigurasi ini.
Jika Anda perlu melakukan konfigurasi spesifik atau mengatasi masalah, saya akan merujuk ke dokumentasi "Oh My OpenCode" atau file konfigurasi tersebut.How this skill works
- The skill receives a 'task' input: a string describing what code needs to be written or executed
- The skill generates Python code using an LLM prompted with the task and OpenCode instructions
- The generated Python code is executed in a sandboxed OpenCode environment
- The skill captures the execution output, including stdout, stderr, and any returned values
- The output is formatted and returned to the agent as the 'result'
When to use it
- When the agent needs to generate Python code for solving programming problems
- When executing and testing generated code snippets in a sandboxed environment
- When refining or debugging existing code provided by the user
- When creating scripts for data analysis or manipulation
Best practices
- Set the `OPENAI_API_KEY` environment variable before using the skill
- Always review and verify generated code for accuracy
- Use low temperature (e.g., 0.2) for more deterministic code generation
- Configure `max_tokens` appropriately to avoid truncation
- Test skill with simple coding queries initially
Example use cases
- Code generation from natural language: Uses the generate_code tool to create new code snippets in specified programming languages based on descriptive prompts, as listed in the tools section.
- Code completion for partial snippets: Employs the complete_code tool to finish incomplete code provided as input, supporting specified languages, per the documented tool functionality.
- Code explanation and understanding: Leverages the explain_code tool to provide detailed breakdowns and interpretations of submitted code snippets, directly from the skill's tools.
FAQs
What is the coding-opencode skill?
OpenClaw skill for code generation and assistance using OpenCode.
What does the description of the skill say?
This skill provides coding assistance powered by OpenCode, an open source code LLM. The agent can generate code, explain code, debug issues, and more.
What features does the coding-opencode skill offer?
- Code generation in multiple languages - Code explanation - Debugging - Code review
Which programming languages and formats are supported by the skill?
Python, JS, TS, HTML/CSS, SQL, Bash, Markdown, JSON, YAML, Docker, Dockerfile, Makefile, TOML, XML, C#, C, C++, Java, Go, Rust, PHP, Ruby
What are the activation triggers for the skill?
Words like "code", "write", "create", "generate", "script", "program", "function", "class", "debug", "fix", "error", "bug", "explain", "describe"
What tool does the skill use?
open_code
More similar skills to explore
- achurch
An OpenClaw skill for church administration that handles member management, event scheduling, sermon retrieval, and donation processing. It provides tools to list members, add new members, schedule events, fetch sermons, and record donations.
- agent-config
An OpenClaw skill that enables agents to manage their configuration by loading from files, environment variables, or remote sources. It supports retrieving, setting, and validating configuration values. The skill allows for hot-reloading of configurations.
- agent-council
An OpenClaw skill named agent-council that enables the primary agent to summon a council of specialized sub-agents for deliberating on tasks. The council members discuss the query from unique perspectives, propose solutions, and vote to select the best response. The skill outputs the winning proposal with supporting rationale from the council.
- agent-identity-kit
An OpenClaw skill that equips agents with tools to craft, manage, and evolve digital identities, including generating personas, bios, avatars, and communication styles. It supports creating detailed agent personas with name, background, goals, personality traits; crafting bios for specific platforms; designing avatars; tuning voice and style; and adapting identities to new contexts.
- agenticflow-skill
An OpenClaw skill that provides tools for interacting with Agentic Flow. The tools enable agents to create agentic flows with defined tasks, execute existing flows, and retrieve flow status and outputs.
- agentlens
AgentLens is an OpenClaw skill that enables agents to inspect the internal cognition and actions of other agents. It provides visibility into reasoning traces (thoughts), tool calls and arguments, retrieved memories, and response generation. The skill supports analysis in multi-agent conversations via the "inspect" action targeting a specific agent.