Source profileQuality 95/100Review permissions

moltis-org/moltis/crates/skills/src/assets/autonomous-ai-agents/opencode/SKILL.md

opencode

Delegate coding tasks to OpenCode CLI agent for feature implementation, refactoring, PR review, and long-running autonomous sessions. Requires the opencode CLI installed and authenticated.

Source repository stars
2,836
Declared platforms
0
Static risk flags
2
Last source update
2026-08-24
Source checked
2026-08-25

Decision brief

What it does: where it fits

Use OpenCode as an autonomous coding worker orchestrated by Moltis terminal/process tools. OpenCode is a provider-agnostic, open-source AI coding agent with a TUI and CLI.

Best for

  • User explicitly asks to use OpenCode
  • You want an external coding agent to implement/refactor/review code
  • You need long-running coding sessions with progress checks

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/moltis-org/moltis --skill "crates/skills/src/assets/autonomous-ai-agents/opencode"
Safe inspection promptEditorial

Inspect the Agent Skill "opencode" from https://github.com/moltis-org/moltis/blob/39dfef8a141a55985982dc959e1ed02cb245c727/crates/skills/src/assets/autonomous-ai-agents/opencode/SKILL.md at commit 39dfef8a141a55985982dc959e1ed02cb245c727. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Or just kill the process

    process(action="kill", sessionid="")

    Output includes OPENCODESMOKEOKCommand exits without provider/model errorsFor code tasks: expected files changed and tests pass
  2. 02

    Procedure

    1. Verify tool readiness: - terminal(command="opencode --version") - terminal(command="opencode auth list") 2. For bounded tasks, use opencode run '...' (no pty needed). 3. For iterative tasks, start opencode with background=true, pty=true. 4. Monitor long tasks with process(act…

    Verify tool readiness:terminal(command="opencode --version")terminal(command="opencode auth list")
  3. 03

    PR Review Workflow

    OpenCode has a built-in PR command:

    OpenCode has a built-in PR command:Or review in a temporary clone for isolation:
  4. 04

    Verification

    Success criteria: - Output includes OPENCODESMOKEOK - Command exits without provider/model errors - For code tasks: expected files changed and tests pass

    Output includes OPENCODESMOKEOKCommand exits without provider/model errorsFor code tasks: expected files changed and tests pass
  5. 05

    When to Use

    User explicitly asks to use OpenCode

    User explicitly asks to use OpenCodeYou want an external coding agent to implement/refactor/review codeYou need long-running coding sessions with progress checks

Permission review

Static risk signals and limitations

Runs scripts

medium · line 41

The documentation asks the agent to run terminal commands or scripts.

terminal(command="opencode run 'Add retry logic to API calls and update tests'", workdir="~/project")

Runs scripts

medium · line 47

The documentation asks the agent to run terminal commands or scripts.

terminal(command="opencode run 'Review this config for security issues' -f config.yaml -f .env.example", workdir="~/project")

Network access

medium · line 149

The documentation includes network, browsing, or remote request actions.

terminal(command="REVIEW=$(mktemp -d) && git clone https://github.com/user/repo.git $REVIEW && cd $REVIEW && opencode run 'Review this PR vs main. Report bugs, security risks, test gaps, and style issues.' -f $(git diff origin/main --name-o

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score95/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars2,836SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
moltis-org/moltis
Skill path
crates/skills/src/assets/autonomous-ai-agents/opencode/SKILL.md
Commit
39dfef8a141a55985982dc959e1ed02cb245c727
License
MIT
Collected
2026-08-25
Default branch
main
View the original SKILL.md

OpenCode CLI

Use OpenCode as an autonomous coding worker orchestrated by Moltis terminal/process tools. OpenCode is a provider-agnostic, open-source AI coding agent with a TUI and CLI.

When to Use

  • User explicitly asks to use OpenCode
  • You want an external coding agent to implement/refactor/review code
  • You need long-running coding sessions with progress checks
  • You want parallel task execution in isolated workdirs/worktrees

Prerequisites

  • OpenCode installed: npm i -g opencode-ai@latest or brew install anomalyco/tap/opencode
  • Auth configured: opencode auth login or set provider env vars (OPENROUTER_API_KEY, etc.)
  • Verify: opencode auth list should show at least one provider
  • Git repository for code tasks (recommended)
  • pty=true for interactive TUI sessions

Binary Resolution (Important)

Shell environments may resolve different OpenCode binaries. If behavior differs between your terminal and the agent, check:

terminal(command="which -a opencode")
terminal(command="opencode --version")

If needed, pin an explicit binary path:

terminal(command="$HOME/.opencode/bin/opencode run '...'", workdir="~/project", pty=true)

One-Shot Tasks

Use opencode run for bounded, non-interactive tasks:

terminal(command="opencode run 'Add retry logic to API calls and update tests'", workdir="~/project")

Attach context files with -f:

terminal(command="opencode run 'Review this config for security issues' -f config.yaml -f .env.example", workdir="~/project")

Show model thinking with --thinking:

terminal(command="opencode run 'Debug why tests fail in CI' --thinking", workdir="~/project")

Force a specific model:

terminal(command="opencode run 'Refactor auth module' --model openrouter/anthropic/claude-sonnet-4", workdir="~/project")

Interactive Sessions (Background)

For iterative work requiring multiple exchanges, start the TUI in background:

terminal(command="opencode", workdir="~/project", background=true, pty=true)
# Returns session_id

# Send a prompt
process(action="submit", session_id="<id>", data="Implement OAuth refresh flow and add tests")

# Monitor progress
process(action="poll", session_id="<id>")
process(action="log", session_id="<id>")

# Send follow-up input
process(action="submit", session_id="<id>", data="Now add error handling for token expiry")

# Exit cleanly — Ctrl+C
process(action="write", session_id="<id>", data="\x03")
# Or just kill the process
process(action="kill", session_id="<id>")

Important: Do NOT use /exit — it is not a valid OpenCode command and will open an agent selector dialog instead. Use Ctrl+C (\x03) or process(action="kill") to exit.

TUI Keybindings

KeyAction
EnterSubmit message (press twice if needed)
TabSwitch between agents (build/plan)
Ctrl+POpen command palette
Ctrl+X LSwitch session
Ctrl+X MSwitch model
Ctrl+X NNew session
Ctrl+X EOpen editor
Ctrl+CExit OpenCode

Resuming Sessions

After exiting, OpenCode prints a session ID. Resume with:

terminal(command="opencode -c", workdir="~/project", background=true, pty=true)  # Continue last session
terminal(command="opencode -s ses_abc123", workdir="~/project", background=true, pty=true)  # Specific session

Common Flags

FlagUse
run 'prompt'One-shot execution and exit
--continue / -cContinue the last OpenCode session
--session <id> / -sContinue a specific session
--agent <name>Choose OpenCode agent (build or plan)
--model provider/modelForce specific model
--format jsonMachine-readable output/events
--file <path> / -fAttach file(s) to the message
--thinkingShow model thinking blocks
--variant <level>Reasoning effort (high, max, minimal)
--title <name>Name the session
--attach <url>Connect to a running opencode server

Procedure

  1. Verify tool readiness:
    • terminal(command="opencode --version")
    • terminal(command="opencode auth list")
  2. For bounded tasks, use opencode run '...' (no pty needed).
  3. For iterative tasks, start opencode with background=true, pty=true.
  4. Monitor long tasks with process(action="poll"|"log").
  5. If OpenCode asks for input, respond via process(action="submit", ...).
  6. Exit with process(action="write", data="\x03") or process(action="kill").
  7. Summarize file changes, test results, and next steps back to user.

PR Review Workflow

OpenCode has a built-in PR command:

terminal(command="opencode pr 42", workdir="~/project", pty=true)

Or review in a temporary clone for isolation:

terminal(command="REVIEW=$(mktemp -d) && git clone https://github.com/user/repo.git $REVIEW && cd $REVIEW && opencode run 'Review this PR vs main. Report bugs, security risks, test gaps, and style issues.' -f $(git diff origin/main --name-only | head -20 | tr '\n' ' ')", pty=true)

Parallel Work Pattern

Use separate workdirs/worktrees to avoid collisions:

terminal(command="opencode run 'Fix issue #101 and commit'", workdir="/tmp/issue-101", background=true, pty=true)
terminal(command="opencode run 'Add parser regression tests and commit'", workdir="/tmp/issue-102", background=true, pty=true)
process(action="list")

Session & Cost Management

List past sessions:

terminal(command="opencode session list")

Check token usage and costs:

terminal(command="opencode stats")
terminal(command="opencode stats --days 7 --models anthropic/claude-sonnet-4")

Pitfalls

  • Interactive opencode (TUI) sessions require pty=true. The opencode run command does NOT need pty.
  • /exit is NOT a valid command — it opens an agent selector. Use Ctrl+C to exit the TUI.
  • PATH mismatch can select the wrong OpenCode binary/model config.
  • If OpenCode appears stuck, inspect logs before killing:
    • process(action="log", session_id="<id>")
  • Avoid sharing one working directory across parallel OpenCode sessions.
  • Enter may need to be pressed twice to submit in the TUI (once to finalize text, once to send).

Verification

Smoke test:

terminal(command="opencode run 'Respond with exactly: OPENCODE_SMOKE_OK'")

Success criteria:

  • Output includes OPENCODE_SMOKE_OK
  • Command exits without provider/model errors
  • For code tasks: expected files changed and tests pass

Rules

  1. Prefer opencode run for one-shot automation — it's simpler and doesn't need pty.
  2. Use interactive background mode only when iteration is needed.
  3. Always scope OpenCode sessions to a single repo/workdir.
  4. For long tasks, provide progress updates from process logs.
  5. Report concrete outcomes (files changed, tests, remaining risks).
  6. Exit interactive sessions with Ctrl+C or kill, never /exit.

Frequently asked questions

What to verify before installation and use

What does the opencode source document cover?

Use OpenCode as an autonomous coding worker orchestrated by Moltis terminal/process tools. OpenCode is a provider-agnostic, open-source AI coding agent with a TUI and CLI.

How do I install opencode?

The source record exposes this install command: npx skills add https://github.com/moltis-org/moltis --skill "crates/skills/src/assets/autonomous-ai-agents/opencode". Inspect the command and pinned source before running it.

Which permission-related actions were detected?

Static rules flagged exec-script, network in the source; the page lists the matching lines and excerpts.

Alternatives

Compare before choosing

Computed 93235,927

NousResearch/hermes-agent

opencode

Delegate coding to OpenCode CLI (features, PR review).

Computed 10029,034

garrytan/gbrain

bulk-ingestion

End-to-end discipline for turning any large data source (audio libraries, email takeouts, document corpora, chat exports, API dumps) into brain pages at scale. The lifecycle spine: SCHEMA → ACCESS → TRIAL → EVALUATE → IMPROVE → CODIFY → TEST → SKILLIFY → BULK → MONITOR. State is tracked in a durable JSON manifest (see MANIFEST-PATTERN.md) so any crash, session boundary, or subagent fan-out resumes from ground truth instead of memory.

Computed 10024,921

alirezarezvani/claude-skills

app-store-optimization

App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist

Computed 1005,241

dotnet/skills

migrate-vstest-to-mtp

Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing