Crawler Summary

opencode-agent answer-first brief

OpenClaw Agent control bridge for OpenCode CLI. Activates on coding tasks: implementation, review, refactoring, analysis. Uses non-interactive mode with session resume. --- name: opencode-agent description: "OpenClaw Agent control bridge for OpenCode CLI. Activates on coding tasks: implementation, review, refactoring, analysis. Uses non-interactive mode with session resume." metadata: {"openclaw":{"emoji":"๐Ÿš€","requires":{"bins":["gh"],"anyBins":["opencode"],"env":[]}}} --- OpenCode Agent - Control Bridge for OpenCode CLI **Purpose**: This skill provides the interface for OpenClaw A Published capability contract available. No trust telemetry is available yet. Last updated 3/1/2026.

Freshness

Last checked 3/1/2026

Best For

Contract is available with explicit auth and schema references.

Not Ideal For

opencode-agent is not ideal for teams that need stronger public trust telemetry, lower setup complexity, or more explicit contract coverage before production rollout.

Evidence Sources Checked

editorial-content, capability-contract, runtime-metrics, public facts pack

Claim this agent
Agent DossierGitHubSafety: 89/100

opencode-agent

OpenClaw Agent control bridge for OpenCode CLI. Activates on coding tasks: implementation, review, refactoring, analysis. Uses non-interactive mode with session resume. --- name: opencode-agent description: "OpenClaw Agent control bridge for OpenCode CLI. Activates on coding tasks: implementation, review, refactoring, analysis. Uses non-interactive mode with session resume." metadata: {"openclaw":{"emoji":"๐Ÿš€","requires":{"bins":["gh"],"anyBins":["opencode"],"env":[]}}} --- OpenCode Agent - Control Bridge for OpenCode CLI **Purpose**: This skill provides the interface for OpenClaw A

OpenClawself-declared

Public facts

6

Change events

1

Artifacts

0

Freshness

Mar 1, 2026

Verifiededitorial-contentNo verified compatibility signals

Published capability contract available. No trust telemetry is available yet. Last updated 3/1/2026.

Schema refs publishedTrust evidence available

Trust score

Unknown

Compatibility

OpenClaw

Freshness

Mar 1, 2026

Vendor

Xuha233

Artifacts

0

Benchmarks

0

Last release

Unpublished

Executive Summary

Key links, install path, and a quick operational read before the deeper crawl record.

Verifiededitorial-content

Summary

Published capability contract available. No trust telemetry is available yet. Last updated 3/1/2026.

Setup snapshot

git clone https://github.com/xuha233/opencode-agent-skill.git
  1. 1

    Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.

  2. 2

    Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Evidence Ledger

Everything public we have scraped or crawled about this agent, grouped by evidence type with provenance.

Verifiededitorial-content
Vendor (1)

Vendor

Xuha233

profilemedium
Observed Mar 1, 2026Source linkProvenance
Compatibility (2)

Protocol compatibility

OpenClaw

contractmedium
Observed Feb 24, 2026Source linkProvenance

Auth modes

api_key, oauth

contracthigh
Observed Feb 24, 2026Source linkProvenance
Artifact (1)

Machine-readable schemas

OpenAPI or schema references published

contracthigh
Observed Feb 24, 2026Source linkProvenance
Security (1)

Handshake status

UNKNOWN

trustmedium
Observed unknownSource linkProvenance
Integration (1)

Crawlable docs

6 indexed pages on the official domain

search_documentmedium
Observed Apr 15, 2026Source linkProvenance

Release & Crawl Timeline

Merged public release, docs, artifact, benchmark, pricing, and trust refresh events.

Self-declaredagent-index

Artifacts Archive

Extracted files, examples, snippets, parameters, dependencies, permissions, and artifact metadata.

Self-declaredGITHUB OPENCLEW

Extracted files

0

Examples

6

Snippets

0

Languages

typescript

Parameters

Executable Examples

text

User Request โ†’ Intent Recognition โ†’ Context Check โ†’ Command Selection

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ DECISION FLOW                                                   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Step 1: Intent Recognition
โ”œโ”€ Is coding task? โ”€โ”€NOโ”€โ”€โ†’ Use other skill
โ””โ”€ YES โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ Continue to Step 2

Step 2: Task Type
โ”œโ”€ Implementation? โ”€โ”€โ†’ Step 3a
โ”œโ”€ Review? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ Step 3b
โ”œโ”€ Refactor? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ Step 3c
โ”œโ”€ Explain? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ Step 3d
โ”œโ”€ Bug Fix? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ Step 3e
โ””โ”€ Other โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ Step 3a (default)

Step 3a: Implementation Context
โ”œโ”€ New project / unrelated task? โ”€โ”€โ†’ opencode run "prompt"
โ”œโ”€ Continue existing task? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ Check Step 4
โ””โ”€ Risky change (large refactor)? โ”€โ†’ opencode run --continue --fork "prompt"

Step 3b: Code Review Context
โ”œโ”€ Single file? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ opencode run --file file.ts "review"
โ”œโ”€ Multiple files? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ opencode run --file f1.ts --file f2.ts "review"
โ”œโ”€ After implementation? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ opencode run --continue "review changes"
โ””โ”€ Specific session? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ opencode run --session <id> "review files"

Step 3c: Refactoring Context
โ”œโ”€ Small change (safe)? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ opencode run --continue "refactor X"
โ”œโ”€ Large/Ambiguous change? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ opencode run --continue --fork "try refactoring"
โ””โ”€ Multiple approaches? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ Fork each approach separately

Step 3d: Explanation Context
โ”œโ”€ Understand codebase? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ opencode run "explain architecture"
โ”œโ”€ Specific file? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ opencode run --file file.ts "explain this"
โ””โ”€ Session recall? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ Check Step 4

Step 3e: Bug Fix Context
โ”œโ”€ Error log provided? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ opencode run --file error.log "investigate"
โ”œโ”€ Context files available? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ opencode run --file src/ts "fix bug"
โ””โ”€ Multiple fix attempts? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ opencode run --continue --fork "try fix B"

Step 4: Session Context
โ”œโ”€ User says "continue"

bash

opencode run "prompt" [OPTIONS]

bash

opencode run "Implement user registration with password hashing and JWT tokens"

bash

opencode run --continue "Add email verification feature"

bash

opencode run --continue --fork "Try implementing with OAuth2 instead"

bash

opencode run "Review authentication flow for security issues" --file src/auth.ts --file src/session.ts

Docs & README

Full documentation captured from public sources, including the complete README when available.

Self-declaredGITHUB OPENCLEW

Docs source

GITHUB OPENCLEW

Editorial quality

ready

OpenClaw Agent control bridge for OpenCode CLI. Activates on coding tasks: implementation, review, refactoring, analysis. Uses non-interactive mode with session resume. --- name: opencode-agent description: "OpenClaw Agent control bridge for OpenCode CLI. Activates on coding tasks: implementation, review, refactoring, analysis. Uses non-interactive mode with session resume." metadata: {"openclaw":{"emoji":"๐Ÿš€","requires":{"bins":["gh"],"anyBins":["opencode"],"env":[]}}} --- OpenCode Agent - Control Bridge for OpenCode CLI **Purpose**: This skill provides the interface for OpenClaw A

Full README

name: opencode-agent description: "OpenClaw Agent control bridge for OpenCode CLI. Activates on coding tasks: implementation, review, refactoring, analysis. Uses non-interactive mode with session resume." metadata: {"openclaw":{"emoji":"๐Ÿš€","requires":{"bins":["gh"],"anyBins":["opencode"],"env":[]}}}

OpenCode Agent - Control Bridge for OpenCode CLI

Purpose: This skill provides the interface for OpenClaw Agent to control OpenCode CLI for coding tasks.


Activation Conditions

Activate this skill when user request matches any coding task pattern:

Implementation Tasks

Keywords: implement, build, create, add function, write code, generate Examples:

  • "Implement user registration"
  • "Create a REST API endpoint"
  • "Add error handling"

Code Review Tasks

Keywords: review, audit, check, analyze code Examples:

  • "Review this code for bugs"
  • "Security audit of auth module"
  • "Check code quality"

Refactoring Tasks

Keywords: refactor, improve, optimize, clean up Examples:

  • "Refactor this function"
  • "Optimize database queries"
  • "Improve code structure"

Explanation Tasks

Keywords: explain, what does, how does, understand Examples:

  • "Explain how authentication works"
  • "What does this function do?"
  • "Analyze the architecture"

Bug Fix Tasks

Keywords: fix bug, debug, resolve error, investigate issue Examples:

  • "Fix the login bug"
  • "Debug this error"
  • "Investigate performance issue"

Command Decision Logic

User Request โ†’ Intent Recognition โ†’ Context Check โ†’ Command Selection

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ DECISION FLOW                                                   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Step 1: Intent Recognition
โ”œโ”€ Is coding task? โ”€โ”€NOโ”€โ”€โ†’ Use other skill
โ””โ”€ YES โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ Continue to Step 2

Step 2: Task Type
โ”œโ”€ Implementation? โ”€โ”€โ†’ Step 3a
โ”œโ”€ Review? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ Step 3b
โ”œโ”€ Refactor? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ Step 3c
โ”œโ”€ Explain? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ Step 3d
โ”œโ”€ Bug Fix? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ Step 3e
โ””โ”€ Other โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ Step 3a (default)

Step 3a: Implementation Context
โ”œโ”€ New project / unrelated task? โ”€โ”€โ†’ opencode run "prompt"
โ”œโ”€ Continue existing task? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ Check Step 4
โ””โ”€ Risky change (large refactor)? โ”€โ†’ opencode run --continue --fork "prompt"

Step 3b: Code Review Context
โ”œโ”€ Single file? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ opencode run --file file.ts "review"
โ”œโ”€ Multiple files? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ opencode run --file f1.ts --file f2.ts "review"
โ”œโ”€ After implementation? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ opencode run --continue "review changes"
โ””โ”€ Specific session? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ opencode run --session <id> "review files"

Step 3c: Refactoring Context
โ”œโ”€ Small change (safe)? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ opencode run --continue "refactor X"
โ”œโ”€ Large/Ambiguous change? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ opencode run --continue --fork "try refactoring"
โ””โ”€ Multiple approaches? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ Fork each approach separately

Step 3d: Explanation Context
โ”œโ”€ Understand codebase? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ opencode run "explain architecture"
โ”œโ”€ Specific file? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ opencode run --file file.ts "explain this"
โ””โ”€ Session recall? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ Check Step 4

Step 3e: Bug Fix Context
โ”œโ”€ Error log provided? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ opencode run --file error.log "investigate"
โ”œโ”€ Context files available? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ opencode run --file src/ts "fix bug"
โ””โ”€ Multiple fix attempts? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ opencode run --continue --fork "try fix B"

Step 4: Session Context
โ”œโ”€ User says "continue"? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ opencode run --continue "prompt"
โ”œโ”€ User provides session ID? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ opencode run --session <id> "prompt"
โ”œโ”€ Latest session relevant? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ Check via opencode session list
โ””โ”€ Need clean slate? โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ opencode run "prompt"

Core Commands

Primary: opencode run

Syntax:

opencode run "prompt" [OPTIONS]

Key Flags for Agent:

| Flag | When to Use | Context | |------|------------|---------| | --continue, -c | Task continuation | User says "continue", "add", "more" | | --session, -s <id> | Specific session recovery | User provides ID or references old task | | --fork | Alternative approaches | Risky changes, multiple implementations | | --file, -f <path> | Context attachment | References files, multi-file review, directory | | --model, -m <provider/model> | Model selection | Deep reasoning (Claude Sonnet), fast/cheap (DeepSeek) | | --format json | Programmatic output | Need to parse events, extract structured data |

Recommended Patterns:

  1. New Implementation:

    opencode run "Implement user registration with password hashing and JWT tokens"
    
  2. Continue Task:

    opencode run --continue "Add email verification feature"
    
  3. Fork for Alternative:

    opencode run --continue --fork "Try implementing with OAuth2 instead"
    
  4. With Context Files:

    opencode run "Review authentication flow for security issues" --file src/auth.ts --file src/session.ts
    
  5. Specific Model:

    opencode run --model anthropic/claude-sonnet-4-20250514 "Implement complex algorithm"
    

Session Management

List Sessions:

opencode session list --format json

Returns JSON: [{id, title, updated, created, projectId, directory}]

Check Latest:

opencode session list | head -2

Delete Session:

opencode session delete <session-id>

Statistics

Get Current Usage:

opencode stats --format json

Last N Days:

opencode stats --days 7 --format json

Export/Import

Export Session:

opencode export <session-id> > backup.json

Import Session:

opencode import <file.json or URL>

Context Awareness Rules

Rule 1: Is This a Coding Task?

Positive Indicators โœ…:

  • "implement", "build", "create", "write code", "generate"
  • "review", "audit", "check", "analyze code"
  • "refactor", "improve", "optimize"
  • "fix bug", "debug", "resolve error"
  • "explain", "what does", "how does"
  • Mentions specific programming concepts (API, database, function, class)

Negative Indicators โŒ:

  • "write documentation" โ†’ Use file editing tools
  • "create blog post" โ†’ Use writing skills
  • "summarize this article" โ†’ Use reading skills
  • "translate to Chinese" โ†’ Use translation skills (not code)

Rule 2: Should I Add Files?

Add Files When:

  • User explicitly mentions files: "Review file.ts"
  • Multiple related files: "Review auth module" โ†’ Attach all auth files
  • Directory reference: "Analyze this API" โ†’ Attach entire dir/
  • Error logs provided: Always attach
  • Code snippets in conversation: Create temp file, then attach

File Attachment Order:

  1. User-specified files (highest priority)
  2. Related context files (same directory, naming patterns)
  3. Error logs / stack traces
  4. Test files (if testing mentioned)

Maximum Rule: Attach up to 10 files at once. For more, ask user.

Rule 3: Continue vs New Session

Use --continue When:

  • User says "continue", "add", "more", "next"
  • Follow-up to previous message
  • Implementing multi-phase plan
  • Refactoring based on review findings

Use --session <id> When:

  • User provides specific session ID
  • Reference to earlier task (by time/description)
  • Switching between parallel work streams

Start New Session When:

  • Completely unrelated task
  • Fresh start requested ("start over", "new task")
  • After major context break

Rule 4: Fork or Modify?

Fork When:

  • Risky/large refactoring
  • Trying multiple approaches
  • Experimental changes
  • Unsure of correct solution

Modify When:

  • Small, safe changes
  • Follow-up to clear plan
  • Bug fixes to existing code
  • Adding simple features

Workflows

Standard Implementation Flow

# Phase 1: Explore (Read-only)
opencode run "Explain the current authentication implementation" --file src/auth.ts

# Phase 2: Plan
opencode run --continue "Create a detailed plan for adding password reset feature"

# Phase 3: Implement
opencode run --continue "Implement the password reset feature"

# Phase 4: Test
opencode run --continue "Write tests for password reset"

# Phase 5: Review
opencode run --continue "Review the implementation for security issues"

# Phase 6: Commit
git checkout -b feat/password-reset
git add .
git commit -m "feat: add password reset"
gh pr create -t "feat: add password reset" -b "..."

Code Review Flow

# Attach all relevant files
opencode run -f src/auth/login.ts -f src/auth/session.ts -f src/api/auth.ts "Review authentication module for security issues, error handling, and code quality"

# Fix findings
opencode run --continue "Address the review findings:
1. Fix SQL injection risk in login query
2. Add input validation for email/username
3. Handle edge case of expired JWT tokens"

# Re-review
opencode run --continue "Re-review after fixes"

Bug Fix Flow

# Investigate
opencode run -f logs/error.log -f src/auth/login.ts "Analyze this error: User reports 'Login fails with valid credentials'"
opencode run --continue "What's the root cause?"

# Fix
opencode run --continue "Implement the fix for root cause identified"

# Verify
opencode run --continue "Verify the fix resolves the issue"

A/B Testing with Forks

# Approach A
opencode run "Implement user authentication with JWT tokens"

# Fork for Approach B (OAuth2)
opencode run --continue --fork "Replace JWT with OAuth2 flow"

# Fork for Approach C (Session-based auth)
opencode run -s <fork-b-id> --fork "Try session-based authentication"

# Compare
opencode run -s <original-id> "List pros/cons of JWT approach"
opencode run -s <fork-b-id> "List pros/cons of OAuth2 approach"

Output Interpretation

Default Output (Plain Text)

Format: Human-readable text Agent Action: Present to user, summarize if long

JSON Output (--format json)

Format: Event stream Event Types:

  • message.updated - Agent/model info
  • message.part.updated - Text/tool/reasoning
  • step-start, step-finish - Tool execution
  • session.status - Session state (idle/busy/error)

Agent Action: Parse and extract:

  • Text content for user
  • Tool calls for logging
  • Errors for troubleshooting

Session List Output

Table Format: Human-readable Agent Action: Show latest 5-10 sessions

JSON Format: Structured data Agent Action: Parse for automation, date filtering


Error Handling

Command Fails

  1. Check OpenCode installed:
    command -v opencode && opencode --version
    
  2. Check configured:
    opencode auth list
    
  3. Check session exists:
    opencode session list
    
  4. Retry with clearer prompt

Timeout

  • Message: "OpenCode is still processing, waiting..."
  • Action: Wait 60s, then check progress again
  • Fallback: Ask user if they want to continue waiting

Rate Limits

  • Message: "Rate limit reached, retrying in 60s..."
  • Action: Wait 60s, then retry command

API Errors

  • Message: "API error: [error message]"
  • Action: Check auth credentials, or try different model

Examples

Example 1: Simple Implementation

User: "Implement a user logout function"

Agent Reasoning:

  1. Intent: Implementation โœ…
  2. Context: Existing auth module
  3. Command: opencode run "Implement user logout with JWT token invalidation and session management"

Agent Action:

opencode run "Implement user logout function:
- Clear JWT token
- Invalidate session
- Add error handling
- Return proper response" --file src/auth/session.ts

Example 2: Code Review

User: "Review the login code"

Agent Reasoning:

  1. Intent: Code Review โœ…
  2. Context: Auth module (search for login files)
  3. Files: src/auth/login.ts, src/auth/session.ts

Agent Action:

opencode run "Review authentication login and session management for security issues, error handling, code quality" --file src/auth/login.ts --file src/auth/session.ts

Example 3: Bug Fix

User: "Login fails with valid credentials"

Agent Reasoning:

  1. Intent: Bug Fix โœ…
  2. Context: Error log + login code

Agent Action:

opencode run "Investigate: User reports 'Login fails with valid credentials'. Find root cause and propose fix" --file logs/error.log --file src/auth/login.ts

Example 4: Multi-Task

User: "Implement registration, then add email verification, then test"

Agent Reasoning:

  1. Intent: Implementation (multi-phase)
  2. Use --continue for phases

Agent Action:

# Phase 1
opencode run "Implement user registration with password hashing"

# Phase 2
opencode run --continue "Add email verification after registration"

# Phase 3
opencode run --continue "Write tests for registration + verification workflow"

Configuration

OpenCode Config Files

  • Main: ~/.local/share/opencode/config.json
  • Auth: ~/.local/share/opencode/auth.json

Agent Behavior Recommendations

  1. Always use --continue for related tasks
  2. Fork before risky changes
  3. Prefer --format json for programmatic parsing
  4. Check opencode session list before new session
  5. Report token usage via opencode stats periodically
  6. Add files liberally โ€” more context = better outcome
  7. Model selection: DeepSeek for fast/cheap, Claude Sonnet for deep reasoning

Quick Reference

| Scenario | Command | |----------|---------| | New task | opencode run "prompt" | | Continue task | opencode run --continue "prompt" | | Fork alternative | opencode run --continue --fork "prompt" | | Review single file | opencode run --file file.ts "review" | | Review multiple files | opencode run -f f1.ts -f f2.ts "review" | | Bug investigation | opencode run -f error.log "investigate" | | Deep reasoning | opencode run -m anthropic/claude-sonnet-4 "task" | | List sessions | opencode session list --format json | | Get stats | opencode stats --format json | | Export session | opencode export <id> > backup.json |

Contract & API

Machine endpoints, protocol fit, contract coverage, invocation examples, and guardrails for agent-to-agent use.

Verifiedcapability-contract

Contract coverage

Status

ready

Auth

api_key, oauth

Streaming

Yes

Data region

global

Protocol support

OpenClaw: self-declared

Requires: openclew, lang:typescript, streaming

Forbidden: high_risk

Guardrails

Operational confidence: medium

Contract is available with explicit auth and schema references.
Trust confidence is not low and verification freshness is acceptable.
Invocation examples
curl -s "https://xpersona.co/api/v1/agents/xuha233-opencode-agent-skill/snapshot"
curl -s "https://xpersona.co/api/v1/agents/xuha233-opencode-agent-skill/contract"
curl -s "https://xpersona.co/api/v1/agents/xuha233-opencode-agent-skill/trust"

Reliability & Benchmarks

Trust and runtime signals, benchmark suites, failure patterns, and practical risk constraints.

Missingruntime-metrics

Trust signals

Handshake

UNKNOWN

Confidence

unknown

Attempts 30d

unknown

Fallback rate

unknown

Runtime metrics

Observed P50

unknown

Observed P95

unknown

Rate limit

unknown

Estimated cost

unknown

No benchmark suites or observed failure patterns are available.

Media & Demo

Every public screenshot, visual asset, demo link, and owner-provided destination tied to this agent.

Missingno-media
No screenshots, media assets, or demo links are available.

Related Agents

Neighboring agents from the same protocol and source ecosystem for comparison and shortlist building.

Self-declaredprotocol-neighbors
GITHUB_REPOSactivepieces

Rank

70

AI Agents & MCPs & AI Workflow Automation โ€ข (~400 MCP servers for AI agents) โ€ข AI Automation / AI Agent with MCPs โ€ข AI Workflows & AI Agents โ€ข MCPs for AI Agents

Traction

No public download signal

Freshness

Updated 2d ago

OPENCLAW
GITHUB_REPOScherry-studio

Rank

70

AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs

Traction

No public download signal

Freshness

Updated 5d ago

MCPOPENCLAW
GITHUB_REPOSAionUi

Rank

70

Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | ๐ŸŒŸ Star if you like it!

Traction

No public download signal

Freshness

Updated 6d ago

MCPOPENCLAW
GITHUB_REPOSCopilotKit

Rank

70

The Frontend for Agents & Generative UI. React + Angular

Traction

No public download signal

Freshness

Updated 23d ago

OPENCLAW
Machine Appendix

Contract JSON

{
  "contractStatus": "ready",
  "authModes": [
    "api_key",
    "oauth"
  ],
  "requires": [
    "openclew",
    "lang:typescript",
    "streaming"
  ],
  "forbidden": [
    "high_risk"
  ],
  "supportsMcp": false,
  "supportsA2a": false,
  "supportsStreaming": true,
  "inputSchemaRef": "https://github.com/xuha233/opencode-agent-skill#input",
  "outputSchemaRef": "https://github.com/xuha233/opencode-agent-skill#output",
  "dataRegion": "global",
  "contractUpdatedAt": "2026-02-24T19:41:36.846Z",
  "sourceUpdatedAt": "2026-02-24T19:41:36.846Z",
  "freshnessSeconds": 4428365
}

Invocation Guide

{
  "preferredApi": {
    "snapshotUrl": "https://xpersona.co/api/v1/agents/xuha233-opencode-agent-skill/snapshot",
    "contractUrl": "https://xpersona.co/api/v1/agents/xuha233-opencode-agent-skill/contract",
    "trustUrl": "https://xpersona.co/api/v1/agents/xuha233-opencode-agent-skill/trust"
  },
  "curlExamples": [
    "curl -s \"https://xpersona.co/api/v1/agents/xuha233-opencode-agent-skill/snapshot\"",
    "curl -s \"https://xpersona.co/api/v1/agents/xuha233-opencode-agent-skill/contract\"",
    "curl -s \"https://xpersona.co/api/v1/agents/xuha233-opencode-agent-skill/trust\""
  ],
  "jsonRequestTemplate": {
    "query": "summarize this repo",
    "constraints": {
      "maxLatencyMs": 2000,
      "protocolPreference": [
        "OPENCLEW"
      ]
    }
  },
  "jsonResponseTemplate": {
    "ok": true,
    "result": {
      "summary": "...",
      "confidence": 0.9
    },
    "meta": {
      "source": "GITHUB_OPENCLEW",
      "generatedAt": "2026-04-17T01:47:42.325Z"
    }
  },
  "retryPolicy": {
    "maxAttempts": 3,
    "backoffMs": [
      500,
      1500,
      3500
    ],
    "retryableConditions": [
      "HTTP_429",
      "HTTP_503",
      "NETWORK_TIMEOUT"
    ]
  }
}

Trust JSON

{
  "status": "unavailable",
  "handshakeStatus": "UNKNOWN",
  "verificationFreshnessHours": null,
  "reputationScore": null,
  "p95LatencyMs": null,
  "successRate30d": null,
  "fallbackRate": null,
  "attempts30d": null,
  "trustUpdatedAt": null,
  "trustConfidence": "unknown",
  "sourceUpdatedAt": null,
  "freshnessSeconds": null
}

Capability Matrix

{
  "rows": [
    {
      "key": "OPENCLEW",
      "type": "protocol",
      "support": "unknown",
      "confidenceSource": "profile",
      "notes": "Listed on profile"
    }
  ],
  "flattenedTokens": "protocol:OPENCLEW|unknown|profile"
}

Facts JSON

[
  {
    "factKey": "docs_crawl",
    "category": "integration",
    "label": "Crawlable docs",
    "value": "6 indexed pages on the official domain",
    "href": "https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar",
    "sourceUrl": "https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar",
    "sourceType": "search_document",
    "confidence": "medium",
    "observedAt": "2026-04-15T05:03:46.393Z",
    "isPublic": true
  },
  {
    "factKey": "vendor",
    "category": "vendor",
    "label": "Vendor",
    "value": "Xuha233",
    "href": "https://github.com/xuha233/opencode-agent-skill",
    "sourceUrl": "https://github.com/xuha233/opencode-agent-skill",
    "sourceType": "profile",
    "confidence": "medium",
    "observedAt": "2026-03-01T06:02:04.557Z",
    "isPublic": true
  },
  {
    "factKey": "protocols",
    "category": "compatibility",
    "label": "Protocol compatibility",
    "value": "OpenClaw",
    "href": "https://xpersona.co/api/v1/agents/xuha233-opencode-agent-skill/contract",
    "sourceUrl": "https://xpersona.co/api/v1/agents/xuha233-opencode-agent-skill/contract",
    "sourceType": "contract",
    "confidence": "medium",
    "observedAt": "2026-02-24T19:41:36.846Z",
    "isPublic": true
  },
  {
    "factKey": "auth_modes",
    "category": "compatibility",
    "label": "Auth modes",
    "value": "api_key, oauth",
    "href": "https://xpersona.co/api/v1/agents/xuha233-opencode-agent-skill/contract",
    "sourceUrl": "https://xpersona.co/api/v1/agents/xuha233-opencode-agent-skill/contract",
    "sourceType": "contract",
    "confidence": "high",
    "observedAt": "2026-02-24T19:41:36.846Z",
    "isPublic": true
  },
  {
    "factKey": "schema_refs",
    "category": "artifact",
    "label": "Machine-readable schemas",
    "value": "OpenAPI or schema references published",
    "href": "https://github.com/xuha233/opencode-agent-skill#input",
    "sourceUrl": "https://xpersona.co/api/v1/agents/xuha233-opencode-agent-skill/contract",
    "sourceType": "contract",
    "confidence": "high",
    "observedAt": "2026-02-24T19:41:36.846Z",
    "isPublic": true
  },
  {
    "factKey": "handshake_status",
    "category": "security",
    "label": "Handshake status",
    "value": "UNKNOWN",
    "href": "https://xpersona.co/api/v1/agents/xuha233-opencode-agent-skill/trust",
    "sourceUrl": "https://xpersona.co/api/v1/agents/xuha233-opencode-agent-skill/trust",
    "sourceType": "trust",
    "confidence": "medium",
    "observedAt": null,
    "isPublic": true
  }
]

Change Events JSON

[
  {
    "eventType": "docs_update",
    "title": "Docs refreshed: Sign in to GitHub ยท GitHub",
    "description": "Fresh crawlable documentation was indexed for the official domain.",
    "href": "https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar",
    "sourceUrl": "https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar",
    "sourceType": "search_document",
    "confidence": "medium",
    "observedAt": "2026-04-15T05:03:46.393Z",
    "isPublic": true
  }
]

Sponsored

Ads related to opencode-agent and adjacent AI workflows.