init

init is a command for Claude Code from SatoruoGojoo/octopus. It costs 54 tokens per session (1,361 once invoked), scanned A, original, MIT.

A setup command for connecting an existing project to Octopus, a workflow built around OpenSpec project specifications and tracked changes. It checks the required command-line tool and project structure, surveys the codebase, and creates an Arena handover report.

In plain words
What is it for?
Use it once per project to check OpenSpec, review specifications and changes, inspect architecture, tests, databases, and APIs, and prepare a handover.
Why use it?
It identifies missing setup, old formats, unfinished changes, and the project’s main technical details before work begins.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions AGENTS.md.

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

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/satoruogojoo/octopus/init
Clone the repo
git clone --depth 1 https://github.com/SatoruoGojoo/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 init

README.md
[![agentmods](https://agentmods.dev/badge/commands/satoruogojoo/octopus/init.svg)](https://agentmods.dev/commands/satoruogojoo/octopus/init)
Your own site
<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>
Per session 54 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,361 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.1 $0.00054 $0.01361
Opus 5 $0.00027 $0.00681
Sonnet 5 $0.00011 $0.00272
Haiku 4.5 $0.00005 $0.00136

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

Security

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.

commands/init.md · 56 lines

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.mdopenspec/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 檔位置(找 *.sqlmigrations/、ORM model)
  • API 形式(REST/GraphQL/gRPC;有無 OpenAPI 檔)

3. 盤點 change 現況(確定性檢查)

  • Bash 跑 openspec list --specsopenspec list --changes(或 Glob openspec/specs/**/spec.mdopenspec/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>

Read the full file on GitHub · 56 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 Changed · +1 lines e4da3f00bf87
  2. 6d ago First seen · 55 lines · 54 tokens per session scan A 1cf63a11983f

Subscribe to this mod's changes

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.