Agent skill
opencode-agent
Delegate coding tasks to an attached OpenCode server via `opencode run --attach`. Use when: (1) building new features, (2) refactoring, (3) reviewing changes, (4) iterative coding with background monitoring. This skill is server-only and always uses `--attach` with `--dir` (server-side path).
Install this agent skill to your Project
npx add-skill https://github.com/feed-mob/agent-skills/tree/main/skills/opencode-agent
Metadata
Additional technical details for this skill
- openclaw
-
{ "emoji": "\ud83e\udd16", "requires": { "anyBins": [ "opencode" ] } }
SKILL.md
OpenCode Agent
Use this skill to run coding tasks through a remote OpenCode server.
Required Command Pattern
Always use this shape:
opencode run --attach <server_url> "<task>" --dir "<server_path>"
Example:
opencode run --attach http://127.0.0.1:4096 "what is in this folder" --dir "/home/richard/FeedMob"
Configuration
Read these values from environment variables:
# Example values
export OPENCODE_SERVER_URL=http://127.0.0.1:4096
export OPENCODE_SERVER_DIR=/home/richard/FeedMob
# Check values
printenv OPENCODE_SERVER_URL && printenv OPENCODE_SERVER_DIR
If either value is missing, ask the user to provide the missing value(s) before running commands. Never assume, infer, or hardcode OPENCODE_SERVER_URL or OPENCODE_SERVER_DIR.
Preflight requirement before any attached run:
- Run
printenv OPENCODE_SERVER_URL && printenv OPENCODE_SERVER_DIR. - If the command fails or a value is missing/empty, ask the user for the missing value(s).
- Only proceed after both values are explicitly provided.
- Check existing projects by running
opencode run --attach $OPENCODE_SERVER_URL 'pwd && ls -1d */ || true' --dir "$OPENCODE_SERVER_DIR", then list results for the user. - Create a new folder for new tasks by running
opencode run --attach $OPENCODE_SERVER_URL 'mkdir -p <task-folder>' --dir "$OPENCODE_SERVER_DIR".
PTY Required
OpenCode is interactive. Always run with pty:true.
# Correct
bash pty:true command:"opencode run --attach $OPENCODE_SERVER_URL 'Explain async/await in JavaScript' --dir '$OPENCODE_SERVER_DIR'"
# Wrong (no PTY)
bash command:"opencode run --attach $OPENCODE_SERVER_URL 'Explain async/await in JavaScript' --dir '$OPENCODE_SERVER_DIR'"
Server-Side Directory Rule
--dir is required by this skill and points to a path on the machine where opencode server is running.
- Do not treat
--diras a client/local path unless server and client are the same machine. - Prefer absolute paths for
--dir. - The
workdirfield in bash does not replace--dirfor attached OpenCode execution.
One-Shot Usage
bash pty:true command:"opencode run --attach $OPENCODE_SERVER_URL 'Add error handling to API calls' --dir '$OPENCODE_SERVER_DIR'"
Background Usage
# Start
bash pty:true background:true command:"opencode run --attach $OPENCODE_SERVER_URL 'Refactor auth module and run tests' --dir '$OPENCODE_SERVER_DIR'"
# Monitor
process action:log sessionId:XXX
process action:poll sessionId:XXX
# Respond if needed
process action:submit sessionId:XXX data:"yes"
# Stop
process action:kill sessionId:XXX
Bash Tool Parameters
| Parameter | Type | Description |
|---|---|---|
| command | string | The shell command to run |
| pty | boolean | Use for coding agents! Allocates a pseudo-terminal for interactive CLIs |
| workdir | string | Working directory (agent sees only this folder's context) |
| background | boolean | Run in background, returns sessionId for monitoring |
| timeout | number | Timeout in seconds (kills process on expiry) |
| elevated | boolean | Run on host instead of sandbox (if allowed) |
Process Tool Actions (for background sessions)
| Action | Description |
|---|---|
| list | List all running/recent sessions |
| poll | Check if session is still running |
| log | Get session output (with optional offset/limit) |
| write | Send raw data to stdin |
| submit | Send data + newline (like typing and pressing Enter) |
| send-keys | Send key tokens or hex bytes |
| paste | Paste text (with optional bracketed mode) |
| kill | Terminate the session |
Rules
- Always use
opencode run --attach. - Always include
--dir. - Always use
pty:true. - Keep users updated when running background sessions (start, milestone, error, finish).
- If a session hangs, inspect logs first, then restart or ask user for direction.
- Never assume environment variable values; ask the user when missing.
Troubleshooting
# Start server
opencode server --port 4096
- Connection issue: verify
OPENCODE_SERVER_URLpoints to a live server. - Path issue: verify
OPENCODE_SERVER_DIRexists on the server machine. - No output: confirm
pty:trueis set and checkprocess action:log.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
skill-name
A clear, complete description of what this skill does and when Claude should use it
gemini-image-generator
Generate, edit, or transform images with Gemini Nano Banana using bundled Python scripts (Flash or Pro) including aspect ratio, resolution, image-to-image edits, logo overlays, and reference images. Use when users request image generation, image edits, image-to-image transformations, logo placement, or specific aspect ratios or resolutions.
feedmob-reporting-skills
MUST use this skill when using mcp__feedmob-reporting__* tools. Provides structured workflows for FeedMob reporting analysis. Key: All clients (Possible Finance, Koho Financial, TextNow, AppsFlyer MMP, etc.) use client_paid_action_count × gross_cpi (dynamic event field based on client_paid_action in click_url_histories). Critical for ensuring correct multi-step workflows and accurate data reconciliation. Trigger words: any feedmob-reporting MCP tool usage, Possible Finance, Koho Financial, TextNow, AppsFlyer, Singular reports, Adjust reports, direct spend, gross spend verification, spend reconciliation, client_paid_action.
feedmob-campaign-creator
Create FeedMob campaigns with guided workflow. Use when users request campaign creation, link generation, or new partner launches. Handles: (1) Campaign naming via feedmob-campaign-naming, (2) Client data retrieval, (3) App selection, (4) Campaign preview, (5) Campaign creation. Trigger keywords: create campaign, new campaign, generate campaign, campaign setup, link generation, partner launch, media plan campaign, 创建campaign, 生成活动, 新建campaign.
install-civitai-videoflow-bundle
Automatically installs and validates the Civitai Videoflow skill bundle from the civitai-agent-skills repository. Supports git clone or manual zip upload, runs npx skills add in dependency-safe order, and guides environment and tool prerequisite checks for CIVITAI_RECORDS_DATABASE_URL, DUOMI_API_TOKEN, IMAGEKIT_PRIVATE_KEY, and CIVITAI_ACCOUNT. Use when: user needs videoflow setup, install Civitai pipeline skills, configure image-to-video workflow, enable Civitai publish pipeline, or when civitai-videoflow and related worker skills are mentioned but unavailable. Triggers: install videoflow skills, setup civitai skills bundle, configure civitai-agent-skills, enable videoflow commands, install duomi/civitai pipeline skills.
install-weekly-hubspot-report-bundle
Automatically installs and configures weekly-hubspot-report and weekly-hubspot-report-pipeline skills from feedmob-skills repository. Supports git clone or manual zip upload, runs npx skills add commands, and guides environment variable setup for FEMINI_API_TOKEN, FEEDAI_API_TOKEN, and AWS credentials. Use when: user needs HubSpot reporting, install HubSpot skills, generate weekly ticket reports, configure report pipeline, or when weekly-hubspot-report* skills are mentioned but not available. Triggers: install HubSpot skills, setup HubSpot reporting, HubSpot weekly report, configure HubSpot, feedmob-skills installation.
Didn't find tool you were looking for?