build

build is a command for Claude Code from SatoruoGojoo/octopus. It costs 73 tokens per session (2,547 once invoked), scanned A, original, MIT.

An automated build command for an OpenSpec change, where a change is a planned piece of software work. It checks the plan, has a builder implement each task, reviews the result, and automatically repairs high-priority issues for up to three rounds.

In plain words
What is it for?
It helps implement tasks from an OpenSpec change, check that the work meets its plan, fix serious review findings, and prepare a report before merging and archiving the change.
Why use it?
It carries a previously approved change through implementation and review without stopping for routine decisions. It also records progress and produces an acceptance report for the person who will merge the code.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions subagents; mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the octopus plugin — 9 commands, 7 agents, 1 hook shipped together

Good fit It helps implement tasks from an OpenSpec change, check that the work meets its plan, fix serious review findings, and prepare a report before merging and archiving the change.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add SatoruoGojoo/octopus
Claude Code
/plugin install octopus

Made for: Claude Code.

Or install octopus, the plugin that ships this one along with the rest of its 9 commands, 7 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for build

README.md
[![agentmods](https://agentmods.dev/badge/commands/satoruogojoo/octopus/build/github.svg)](https://agentmods.dev/commands/satoruogojoo/octopus/build)
Your own site
<a href="https://agentmods.dev/commands/satoruogojoo/octopus/build"><img src="https://agentmods.dev/badge/commands/satoruogojoo/octopus/build/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for build

Your own site · 80×15
<a href="https://agentmods.dev/commands/satoruogojoo/octopus/build"><img src="https://agentmods.dev/badge/commands/satoruogojoo/octopus/build.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,547 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00073 $0.02547
Opus 5 $0.00036 $0.01273
Sonnet 5 $0.00015 $0.00509
Haiku 4.5 $0.00007 $0.00255

Measured 5d ago against content hash 041075f5fb97, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

build 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 5d 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/build.md · 82 lines

How it starts

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

這是 Octopus 的 build 管線(SDD 後半段)。你(主對話)擔任 Core 編排。

設計原則:全自主、不中途等人,但看得到進度。TPM 已在拍板停點放行過,執行中一律「保守預設+留痕」跑到底;同時 Builder 每完成一條 task 你就即時轉呈一則 task 回報(單向,不等回覆),TPM 隨行看得懂每條 task 對應的 code——這守住「理解 vs 盲簽」邊界,跑完不必回頭補看。

步驟

0. 入口閘門(確定性檢查,先做)

  1. CLI:Bash 跑 openspec --version。失敗 → 停,請使用者先安裝(指令以官方 README 為準:github.com/Fission-AI/OpenSpec)。
  2. run-marker:把當下 ISO 時間戳寫進目標 repo 的 .claude/.octopus-arena/.run(目錄不存在先建立)——守門 hook 只在 marker 有效期間生效。本管線於步驟 4 呈報告前刪除。

marker 是本管線的責任,任何出口都要清:marker 寫入後,每一條提早結束的路徑(下方的停下、拒絕,或執行中被使用者喊停)都必須先刪除 .run 再回話。漏刪會讓守門殘留到 TTL(4 小時)到期,期間使用者日常的 merge/主幹 commit 會被 branch-guard 誤攔。

解析 change(給名稱就找 openspec/changes/<name>/):

  • 找不到 → 停,Bash 跑 openspec list --changes(或 Glob openspec/changes/*/)列出現有 change 供確認;位於 changes/archive/拒絕(已歸檔結案,要改版請開新 change)
  • Read .openspec.yamloctopus.status
    • Locked → 直接續跑
    • Draft停下請 TPM 拍板(不自動鎖定):依 ${CLAUDE_PLUGIN_ROOT}/commands/spec.md 步驟 3 的格式呈現完整包(proposal 摘要+待拍板決策卡+tasklist),等使用者回 OK;拍板後照 spec.md 步驟 4 用 Edit 標 Locked +追記 Arena,再續跑。他不拍板就停在這裡,正常結束(記得刪 marker)
    • Implemented拒絕:「此 change 已 merge。tasks 未全完成者屬結案追蹤(完成後 archive),要再動 code 請開新 change」
    • octopus.status → 停:「change 缺狀態欄位,請先跑 /octopus:init 補登或親手標註」

1. 取得 tasks

Read 同目錄 tasks.md(/octopus:spec 已連 change 一起產出)。 若缺檔(手建的 change)→ 啟動 architect(窄入口:補產 tasks.md)補產,不停等確認,繼續往下。

用主對話的 todo 清單登記全部 tasks——這是 TPM 的進度條,每條回報後勾銷。

2. 實作(Builder 逐 task 派工)

這是「進度可見契約」的當前實作(設計文件 §5.2):逐條派工讓每次 agent 返回帶一條回報,Core 才能即時轉呈——因為 Claude Code 的 subagent 輸出在它返回前你看不到。Builder 本身是純執行層(不管派工節奏),逐條是**你(Core)**的編排選擇。

用 Agent 工具啟動 builder:給 change 路徑+完整 tasks+指定第一條未完成 task。它自驗狀態、建 feature branch(feat/<change-name>)、只做那一條、勾 tasks.md、返回 task 回報。

每次收到回報後:

  1. 即時轉呈使用者(task 回報原文——做了什麼/code 導讀/自主決定/測試),單向呈現,不停等回覆;todo 清單勾銷該條
  2. 用 SendMessage 對同一個 builder 指派下一條 task(不要重開新 agent——context 連貫是逐條派工的前提)
  3. 全部做完 → 取得最終變更摘要

3. 審查與自動修復迴圈(Reviewer ⇄ Builder)

用 Agent 工具啟動 reviewer(branch、主幹、change 路徑)取得驗收報告。

  • 有 P1 → 把 P1 清單用 SendMessage 轉回同一個 builder 修,修完重審——自動迴圈,不請示
  • 迴圈上限 3 輪:仍有 P1 → 不停下來空等裁決,帶著「修不掉的 P1 與原因」直接進下一步收尾,報告如實標紅、不建議 merge

Read the full file on GitHub · 82 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. 5d ago Changed · +2 lines 041075f5fb97
  2. 9d ago First seen · 80 lines · 73 tokens per session scan A ce1fcf6f8089

Subscribe to this mod's changes

build is a command published in the GitHub repository SatoruoGojoo/octopus (2 stars, last pushed 8d ago), licensed MIT. It adds 73 tokens to every session and 2,547 once invoked, about $0.0004 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.