self-improve
Update skill documentation and extend OpenCode capabilities based on learnings
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Update skill documentation and extend OpenCode capabilities based on learnings
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Create and manage isolated git worktrees safely.
Opinionated workflow for submodule development + PRs + control-center pointer bumps.
Store Apple notarization IDs in Keychain and notarize/staple OpenWork DMGs locally.
Sync control-center master and update submodule pointers safely.
Require every OpenCode plugin to expose get_skills and get_version tools.
Use client.app.log() instead of console.log in OpenCode plugins
| name | self-improve |
| description | Update skill documentation and extend OpenCode capabilities based on learnings |
I am OpenCode - a powerful AI coding agent built for the terminal by SST. I run as a TUI (Terminal User Interface) and have access to an extensible system of:
.opencode/skill/).opencode/agent/).opencode/plugin/).opencode/tool/)I should use this knowledge to extend my own capabilities when needed.
Update documentation immediately when:
Location: .opencode/skill/<name>/SKILL.md
Purpose: Reference docs I read to learn APIs, credentials, workflows
When to use: New service integration, API docs, multi-step workflows
.opencode/skill/
├── bitwarden/SKILL.md # Credential management
├── qbittorrent/SKILL.md # Torrent downloads
├── telegram/SKILL.md # Notifications
├── home-assistant/SKILL.md # Smart home
└── self-improve/SKILL.md # This file
Location: .opencode/agent/<name>.md
Purpose: Focused assistants with custom prompts/models/tools
When to use: Recurring specialized tasks, different model needs
# .opencode/agent/code-reviewer.md
---
description: Reviews code for best practices and potential issues
mode: subagent
model: anthropic/claude-sonnet-4-20250514
tools:
write: false
edit: false
---
You are a code reviewer. Focus on security, performance, and maintainability.
Built-in agents:
build - Primary agent with all tools (default)plan - Analysis without making changesgeneral - Subagent for research and multi-step tasksexplore - Fast subagent for codebase explorationInvoke with: @agent-name in messages, or Tab to switch primary agents
Location: .opencode/plugin/<name>.js or .ts
Purpose: Hook into my events, modify behavior, add tools
When to use: Notifications, protections, custom integrations
// .opencode/plugin/notification.js
export const NotificationPlugin = async ({ project, client, $, directory, worktree }) => {
return {
event: async ({ event }) => {
if (event.type === "session.idle") {
await $`notify-send "OpenCode" "Task completed!"`
}
},
}
}
Available events:
session.idle, session.created, session.errortool.execute.before, tool.execute.afterfile.edited, message.updatedpermission.repliedLocation: .opencode/tool/<name>.ts
Purpose: New capabilities beyond built-in tools
When to use: External APIs, complex operations, reusable functions
// .opencode/tool/database.ts
import { tool } from "@opencode-ai/plugin"
export default tool({
description: "Query the project database",
args: {
query: tool.schema.string().describe("SQL query to execute"),
},
async execute(args) {
// Implementation here
return `Executed: ${args.query}`
},
})
Can invoke any language:
// .opencode/tool/python-script.ts
async execute(args) {
const result = await Bun.$`python3 script.py ${args.input}`.text()
return result.trim()
}
Location: opencode.json
Purpose: Connect to external tool servers
When to use: Pre-built integrations, complex external services
{
"mcp": {
"browser": {
"command": "npx",
"args": ["@anthropic-ai/mcp-server-puppeteer"]
}
}
}
Need to extend my capabilities?
│
├─ Just need reference docs/commands?
│ └─ Create a SKILL (.opencode/skill/<name>/SKILL.md)
│
├─ Need a specialized AI persona/workflow?
│ └─ Create an AGENT (.opencode/agent/<name>.md)
│
├─ Need to hook into my events/modify behavior?
│ └─ Create a PLUGIN (.opencode/plugin/<name>.ts)
│
├─ Need a new callable function/API?
│ └─ Create a TOOL (.opencode/tool/<name>.ts)
│
└─ Need complex external integration?
└─ Add an MCP SERVER (opencode.json)
-d vs -F for curl)## Quick Usage (Already Configured)
# Most common commands - copy/paste ready
## Common Gotchas
# Things that don't work as expected
## API Reference
# Endpoints, parameters, return values
## First-Time Setup
# Only needed once, keep at bottom
mkdir -p .opencode/skill/<skill-name>
Template:
---
name: skill-name
description: One-line description
---
## Quick Usage (Already Configured)
### Action 1
\`\`\`bash
command here
\`\`\`
## Common Gotchas
- Thing that doesn't work as expected
## First-Time Setup (If Not Configured)
### What you need from the user
1. ...
mkdir -p .opencode/agent
Template:
---
description: What this agent does
mode: subagent # or "primary"
model: anthropic/claude-sonnet-4-20250514
temperature: 0.3
tools:
write: false
edit: false
bash: false
---
You are a [role]. Focus on:
- Task 1
- Task 2
mkdir -p .opencode/tool
Template:
import { tool } from "@opencode-ai/plugin"
export default tool({
description: "What this tool does",
args: {
param: tool.schema.string().describe("Parameter description"),
},
async execute(args, context) {
// Implementation
return "result"
},
})
Before: curl -d "urls=..."
After: curl -F "urls=..." (multipart/form-data required)
## Common Gotchas
- `jq` is NOT installed - use grep/cut for JSON parsing
- "Fails." response means duplicate, not error
If I keep doing code reviews, create .opencode/agent/review.md
If I keep calling the same API, create .opencode/tool/api-name.ts