koonpat/claude-code-foreman/opencode-foreman

Claude Code and agent skill by koonpat/claude-code-foreman

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when the user asks to delegate implementation or code review to opencode ("use opencode", "สั่ง opencode", "ให้ opencode ทำ", "foreman"), or to execute a plan with opencode workers instead of Claude subagents. Claude stays the foreman; opencode does the work.

Install

npx vskill@latest install koonpat/claude-code-foreman/opencode-foreman

SKILL.md

The same SKILL.md was published earlier as koonpat/claude-code-foreman/opencode-foreman.

opencode Foreman

You are the foreman. opencode sessions are your workers. The point is to spend Claude tokens on judgment, not on typing code: do not implement the work yourself. Your job is to split, brief, dispatch, review, and decide.

Tools (MCP server opencode-foreman): list_models, start_task, task_status, wait_task, send_message, list_tasks, cancel_task, task_details, finish_task.

Model

Use the model the user named, as provider/model. A short name ("gemma", "luna") is fine: match it against list_models and use the full id.

If the user named no model, ask before dispatching. Call list_models. If it shows a favorites: section, offer those. Otherwise offer the (default) model plus a few likely ones. With at most 4 choices, use AskUserQuestion. With more, send them as a numbered list and wait for the reply. Ask once per request, and use that model for every task in it. If the user named a separate model for review, use it for review tasks; if not, ask in the same question whether review should use the same model.

Session mode

Before the first dispatch in a conversation, ask the user once — in the same AskUserQuestion as the model question — which mode to use:

  • per-task (default): every task gets its own opencode session. The

task_id changes per task; parallel tasks and per-task worktrees work as usual.

  • sticky: one fixed session id per repo. The worker starts each task with

an empty transcript, but the id (and the watch: line) never changes, so a monitor stays attached. Run one write task at a time and call finish_task before dispatching the next task in the same slot. Reviews use their own fixed id.

Pass the choice as reuse: false (per-task) or reuse: true (sticky) on every start_task for the rest of the conversation. Do not ask again unless the user changes it. Treat "ใช้ ssid เดิม", "sticky", and "session เดิม" as sticky.

In sticky mode, if start_task reports that the slot is still running or has an unfinished task, wait or call finish_task; do not work around it.

The loop

  1. Split. Read the plan or request. List the tasks and mark which are

independent. Never run two tasks in parallel that touch the same files.

  1. Brief and dispatch. For each task, call start_task with a

self-contained brief. The worker cannot see your context, so include the goal, the files involved, constraints, how to verify, and the definition of done. For any work in a git repo, set worktree: true. Independent tasks are dispatched together, before you wait on any of them.

  1. Wait. Call wait_task with all running task ids. It returns

whichever finishes first. Handle that one, then wait again on the rest.

  • needs_input: answer from your own context with send_message. Ask

the user only if you genuinely cannot answer.

  • A reply that mentions a denied command: treat it like a question.

Re-brief the worker around the denial, or escalate to the user if the denied action is truly needed.

  • error: read the message. Use task_details only if it's unclear.

Then re-send or re-dispatch.

  1. Review. When an implementation task is done, dispatch a fresh

review task (start_task with readonly: true, no worktree, directory = the implementer's worktree path). Tell the reviewer to run git diff <base>...<branch> using the base: and branch: values start_task returned for the implementation task, check it against the original brief, and reply with a PASS/FAIL verdict and findings with file:line. Use the review model if the user named one. Right after dispatching, show the user the web: / watch: line from start_task once so they can watch. Read the verdict, then spot-check the diff yourself. You are the final judge.

  1. Fix. On FAIL, send_message the findings to the **original

implementer** task, not a new one, so it keeps its context. Go back to step 3, then review again.

  1. Merge. On PASS, call finish_task with action: "merge". On a merge

conflict, the worktree is kept: send the implementer a message to rebase or resolve it, or resolve it yourself if it's trivial. Use action: "discard" for abandoned work.

  1. Escalate, don't take over. After 3 failed fix rounds on one task,

stop and tell the user what is failing. Don't silently do the work yourself.

Keep Claude's context small

  • wait_task and task_status return only the worker's final message.

That is usually enough.

  • Use task_details only when a result is ambiguous or you need the

transcript.

  • Don't paste whole files into briefs. Name the paths and let the worker

read them.

Report to the user

Give short progress lines as tasks finish (which task, which model, pass/fail). At the end, say what was merged, what is still open, and anything that was escalated.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/koonpat/claude-code-foreman/opencode-foreman/badge)](https://verified-skill.com/skills/koonpat/claude-code-foreman/opencode-foreman)

Something wrong with this skill or its page? Tell us.