autopilot

An automated workflow for finding ready-to-work software issues in local files or GitHub Issues and sending them through implementation and review.

In plain words
What is it for?
Processing local .scratch issues or GitHub Issues, dispatching implementers and reviewers, retrying unresolved work, and performing a final cross-project review against the project requirements.
Why use it?
It reduces the manual work of choosing issues, coordinating coding and review, retrying failed work, and checking for problems across the project.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/matthewye/opencode-toolbox/autopilot
Clone the repo
git clone --depth 1 https://github.com/MatthewYe/opencode-toolbox
Per session 66 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 8,330 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00066 $0.08330
Opus 5 $0.00033 $0.04165
Sonnet 5 $0.00013 $0.01666
Haiku 4.5 $0.00007 $0.00833

Measured 2d ago against content hash 3b1df8854083, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

autopilot scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/autopilot.md · 550 lines

How it starts

The opening of the file, as written. The whole thing — 550 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Execute the autopilot orchestrator workflow below. Orchestrator MUST include explicit skill tool loading instructions in implementer and reviewer dispatch prompts — see "执行 implementer" and reviewer dispatch sections for the exact preamble format.

Issue 来源识别

autopilot 支持两种 issue 来源。根据 target 参数或扫描结果判断:

target 特征 来源 状态机 合约文件
包含 / 的路径 本地 .scratch/ frontmatter Status: AGENT-BRIEF.md
#N 或纯数字 N GitHub Issue labels issue body(含 AC)
无参数扫描到本地 本地 .scratch/ frontmatter Status: AGENT-BRIEF.md
无参数扫描到 GitHub GitHub Issue labels issue body

前置约定

本地 issue 模式

  • target 使用绝对路径。如传入相对路径,拼接当前工作目录。
  • issue.md 以 YAML frontmatter 开头,Status 字段在 frontmatter 中。
  • 更新 Status:用 edit 工具修改 frontmatter 中的 Status: 行。
  • 追加注释:在 ## Comments 节末尾加 - <时间戳> autopilot: <内容>。无该节则在文件末尾创建。
  • 合约文件:同目录下 AGENT-BRIEF.md

GitHub Issue 模式

  • 使用 gh CLI 操作 issue。从 git remote -v 自动推断 repo。
  • 状态通过 labels 表达:in-progressresolvedneeds-info
  • 追加注释用 gh issue comment <N> --body "..."
  • 合约来自 issue body(其中包含 Acceptance Criteria 和 What to build,由 to-issues 创建)。
  • 读取 issue:gh issue view <N> --json number,title,body,labels,state

共用概念

  • Status: ready-for-agent(本地 frontmatter)↔ label ready-for-agent(GitHub)
  • Status: in-progress ↔ label in-progress
  • Status: resolved ↔ label resolved
  • Status: needs-info ↔ label needs-info

如果指定了 target

target 是路径(含 /

  1. 确认 <target>/issue.md 存在,不存在则报告错误并停止
  2. 确认 <target>/AGENT-BRIEF.md 存在,不存在则报告错误并停止
  3. 读取 <target>/issue.md,检查 Status: 是否为 ready-for-agentin-progress
  4. 非以上状态 → 回复当前状态并停止
  5. 更新 Status 为 in-progress
  6. 设置 source = "local", id = <target>
  7. <target> 推断 feature 目录(取 issue 目录的父级父级,如 .scratch/auth/issues/01-login/.scratch/auth/
  8. 设置 contract = <target>/AGENT-BRIEF.md 的内容作为合约文本
  9. 跳到"交叉 Issue Suggestion 匹配"

target 是 GitHub issue 号(#N 或纯数字 N

提取数字部分为 issueNumber

Read the full file on GitHub · 550 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 550 lines · 66 tokens per session scan A 3b1df8854083

Subscribe to this mod's changes

autopilot is a command published in the GitHub repository MatthewYe/opencode-toolbox (5 stars, last pushed 2mo ago), licensed MIT. It adds 66 tokens to every session and 8,330 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.