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.
npx agentmods add commands/satoruogojoo/octopus/initgit clone --depth 1 https://github.com/SatoruoGojoo/octopusWrote 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.
[](https://agentmods.dev/commands/satoruogojoo/octopus/init)<a href="https://agentmods.dev/commands/satoruogojoo/octopus/init"><img src="https://agentmods.dev/badge/commands/satoruogojoo/octopus/init.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00054 | $0.01361 |
| Opus 5 | $0.00027 | $0.00681 |
| Sonnet 5 | $0.00011 | $0.00272 |
| Haiku 4.5 | $0.00005 | $0.00136 |
Grade A, and why
init 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.
How it starts
The opening of the file, as written. The whole thing — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.
這是 Octopus 的 init:把一個既有專案接上 Octopus。你(主對話)依序執行。
步驟
1. OpenSpec 前置檢查(確定性檢查,自己做不用 agent)
- CLI:Bash 跑
openspec --version。失敗 → 停,請使用者先安裝(npm 全域安裝 OpenSpec CLI,指令以官方 README 為準:github.com/Fission-AI/OpenSpec),裝好回覆再續 - 結構偵測:
- 有
openspec/config.yaml→ v1.x,直接接管 - 有
openspec/project.md或openspec/AGENTS.md(無 config.yaml)→ v0.x legacy——提示使用者官方建議跑openspec update升級(並照官方 migration guide 手動把 project.md 內容遷到 config.yaml),不代跑;specs/changes 核心結構兩代一致,可先照常盤點 - 都沒有 → 停,請使用者跑
openspec init;CLI 1.7.0+ 支援非互動參數,經使用者明確點頭後可代跑openspec init --tools claude --no-animation(互動式版本仍不代跑)
- 有
- 舊 Octopus 格式偵測:Glob
specs/*/spec.md(v0.4 前的specs/NNN-*格式)——有就列出並提示:已完工的留著當歷史即可;留有未完成尾巴的,建議 openspec 結構建立後把尾巴開成一筆 change 承接(/octopus:spec,把殘餘 tasks 當需求輸入);不代遷移
2. 摸專案
用 Agent 工具啟動 scout,請它回報專案概況:
- 架構與分層、主要語言/框架
- 測試怎麼跑(指令、框架)
- DB 種類與 schema/migration 檔位置(找
*.sql、migrations/、ORM model) - API 形式(REST/GraphQL/gRPC;有無 OpenAPI 檔)
3. 盤點 change 現況(確定性檢查)
- Bash 跑
openspec list --specs與openspec list --changes(或 Globopenspec/specs/**/spec.md、openspec/changes/*/) - 逐筆開放中的 change:Read
.openspec.yaml——有沒有octopus.status?值是什麼? 順讀 tasks.md 的 checkbox 完成度
4.【TPM 確認點:狀態補登】
缺 octopus.status 的 change 列成清單問使用者:「這幾筆各是什麼狀態(Draft/Locked/Implemented)?」
- 他逐一回答 → 用 Edit 補進各
.openspec.yaml(無此檔就建立) - 不可自行判定狀態——尤其不可擅自標 Locked;他不想現在處理就跳過,缺狀態的 change 進 build 會在入口被要求先補登
5. 建 Arena
- 建
.claude/.octopus-arena/decisions.md(表頭:日期|change|決策|結論) - 檢查該 repo
.gitignore:沒有.claude/.octopus-arena/這行就加上(Octopus 預設私有),並告知使用者已加 - 把步驟 2 scout 的用量追記
.claude/.octopus-arena/metrics.md(append-only;無檔就自建,表頭| 日期 | 管線 | change | agent | 輪次 | tokens | 備註 |;tokens 取 harness 回報、拿不到記「查無」;追記失敗不阻塞)
6. 交接報告(一屏內)
## Octopus 接機報告:<專案名>
- 概況:<語言/框架/分層,一~兩行>
- 測試:<指令>;DB:<種類,schema 位置>
- OpenSpec:CLI <版本>;結構 <v1.x / legacy(建議升級)>;主 spec <N 個 domain>
- Change 盤點:開放中 N 筆——Locked X(可直接 /octopus:build)/ Draft Y / Implemented 待 archive Z / 缺狀態 W
- Arena:已建立(已加入 .gitignore)
- 建議下一步:<例:add-xxx 已 Locked → /octopus:build add-xxx;或:無開放 change,需求進來走 /octopus:spec>
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.
- 2d ago Changed · +1 lines e4da3f00bf87
- 6d ago First seen · 55 lines · 54 tokens per session scan A 1cf63a11983f
init is a command published in the GitHub repository SatoruoGojoo/octopus (2 stars, last pushed 5d ago), licensed MIT. It adds 54 tokens to every session and 1,361 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.
Other commands, from other repositories
simplify
The over-engineering review: five tags (delete, stdlib, native, yagni, shrink), a mandatory replacement per finding, and a real null result when there is nothing to cut.
git
The pre-finish status: branch, hygiene findings, message checks, workflow lint, template state.
init
Install the formatters this repository needs, with every command visible before it runs.
release
Generate changelog, bump version, and create git tag.
statusline
Show the governor fleet in your Claude Code statusline. Explicit, opt-in, and chains — it never replaces an existing statusline.
setup
Interactive auth setup wizard. Choose provider, configure OAuth, email, generate schema, create UI components — all in one command.