Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

opencode

БесплатноБез исполняемых скриптовНе проверен

OpenCode is an open-source AI coding agent that runs in the terminal, reads a codebase, edits files and runs shell commands using any of 75+ model providers…

TerminalSkillsот TerminalSkills★ 221 звезда на GitHub

Об этом скилле

OpenCode — Open-Source Terminal Coding Agent

Overview

OpenCode (formerly sst/opencode, now anomalyco/opencode, MIT licensed) is an AI coding agent with a terminal UI, a desktop app and a headless mode. It reads the project, edits files, runs shell commands and keeps sessions that can be undone, shared or resumed. It is not tied to one vendor: models come from the Models.dev catalogue (Anthropic, OpenAI, Google, Bedrock, OpenRouter, Groq and many more) or from a local server such as Ollama or LM Studio.

Two primary agents ship with it: build (full access, the default) and plan (for analysis: file edits denied except plan files in .opencode/plans/, but bash is allowed unless you restrict it; see the config below). Subagents such as general and explore are called by the primary agent or with @general / @explore in a message. Everything is configured in opencode.json plus Markdown files under .opencode/.

Instructions

Install

# Node.js package (bun, pnpm and yarn global installs also work)
npm install -g opencode-ai

# Homebrew, macOS and Linux; the project's own tap is updated first
brew install anomalyco/tap/opencode

# Arch Linux
sudo pacman -S opencode

# Any OS through mise
mise use -g github:anomalyco/opencode

opencode --version

On Windows use WSL, or scoop install opencode / choco install opencode. A container image is published as ghcr.io/anomalyco/opencode. The official installer can also be downloaded and inspected before running it:

curl -fsSL https://opencode.ai/install -o install-opencode.sh
bash install-opencode.sh

Update with opencode upgrade (or pin with opencode upgrade v1.18.33). Set "autoupdate": false in the config to stop start-up updates.

Connect a model provider

Inside the TUI run /connect, pick a provider and paste the key; from the shell use opencode providers login (alias opencode auth login). Keys are stored in ~/.local/share/opencode/auth.json. Standard provider variables already in the environment or in a project .env are also picked up.

export ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY"   # created at console.anthropic.com
opencode providers list        # stored credentials and detected env variables
opencode models anthropic      # exact provider/model IDs to put in the config
opencode models --refresh      # re-fetch the catalogue from models.dev

Start a project

cd ~/code/invoice-service
opencode                       # opens the TUI in this directory

In the TUI, type /init once: it scans the repo and writes AGENTS.md with build, test and convention notes. Commit it. If there is no AGENTS.md, OpenCode falls back to CLAUDE.md, and it also reads ~/.claude/skills/, so a Claude Code setup keeps working. Useful keys and commands: Tab switches build/plan, @ fuzzy-finds files, /undo and /redo roll back agent edits, /share creates a link (sharing is manual by default), /models switches model.

Configure with opencode.json

Configs merge, later ones winning per key: remote org defaults, global ~/.config/opencode/opencode.json, OPENCODE_CONFIG, project opencode.json, .opencode/ directories, OPENCODE_CONFIG_CONTENT, then admin-managed files (/etc/opencode/ on Linux). A project file safe to commit:

{
  "$schema": "https://opencode.ai/config.json",
  "model": "anthropic/claude-sonnet-4-5",
  "small_model": "anthropic/claude-haiku-4-5",
  "instructions": ["CONTRIBUTING.md", "docs/architecture.md"],
  "permission": {
    "read": { "*": "allow", "*.env": "deny", "*.env.*": "deny", "*.env.example": "allow" },
    "edit": "ask",
    "bash": {
      "*": "ask",
      "npm test*": "allow",
      "npm run lint*": "allow",
      "git status*": "allow",
      "git push *": "deny"
    }
  },
  "agent": {
    "plan": {
      "permission": {
        "edit": { "*": "deny", ".opencode/plans/*.md": "allow" },
        "bash": { "*": "ask", "git log*": "allow", "git diff*": "allow" }
      }
    }
  },
  "share": "disabled"
}

Permission values are allow, ask or deny; in object form the last matching pattern wins, so put "*" first. Top-level permission rules are merged after the built-in plan rules, so the "edit": "ask" above would replace plan's edit deny; the agent.plan block restores it and makes plan ask before shell commands (the stock plan agent runs bash without asking and is only told not to change files). Keys include read, edit, bash, glob, grep, task, skill, webfetch, websearch and external_directory. Reference secrets as "{env:ANTHROPIC_API_KEY}" or "{file:~/.secrets/openai-key}" instead of pasting them. Run opencode debug config to print the merged result.

Custom agents

A Markdown file in .opencode/agents/ (or ~/.config/opencode/agents/) becomes an agent named after the file:

---
description: Reviews SQL migrations for locking, data loss and missin
Полный SKILL.md на GitHub

Установить opencode в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

_scores.json

FAQ

Что делает скилл opencode?

OpenCode is an open-source AI coding agent that runs in the terminal, reads a codebase, edits files and runs shell commands using any of 75+ model providers or a local model. Use it to set up OpenCode, write opencode.json, choose models and providers, restrict permissions, create custom agents and slash commands, add MCP servers, or script it with `opencode run` in CI. Trigger phrases: "install opencode", "configure opencode.json", "use opencode with Ollama", "opencode run in CI", "opencode plan mode", "create an opencode agent", "open-source alternative to Claude Code".

Как установить скилл opencode?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл opencode запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить opencode с