octo-cli: Instructions file for Claude Code

CLAUDE.md

octo-cli CLAUDE.md is an instructions file for Claude Code from Mininglamp-OSS/octo-cli. It costs 5,044 tokens per session, scanned A, original, Apache-2.0.

Contributor instructions for octo-cli, a command-line program that lets AI agent systems call Octo services. They explain its architecture, identity model, command structure, and development conventions.

In plain words
What is it for?
Use them when modifying octo-cli, adding or changing service operations, understanding authentication and identity routing, or following its project commands and conventions.
Why use it?
They help contributors understand how the command-line interface is organized and how service commands are generated from API specifications. This lowers the chance of changing the wrong part of the system.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code; built for openclaw.

This is Mininglamp-OSS/octo-cli's own configuration. It tells Claude Code how to work on octo-cli itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything octo-cli configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Mininglamp-OSS/octo-cli. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Mininglamp-OSS/octo-cli/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/Mininglamp-OSS/octo-cli

Made for: Claude Code.

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 octo-cli CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mininglamp-oss/octo-cli/claude-md/github.svg)](https://agentmods.dev/instructions/mininglamp-oss/octo-cli/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/mininglamp-oss/octo-cli/claude-md"><img src="https://agentmods.dev/badge/instructions/mininglamp-oss/octo-cli/claude-md/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 octo-cli CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/mininglamp-oss/octo-cli/claude-md"><img src="https://agentmods.dev/badge/instructions/mininglamp-oss/octo-cli/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5,044 This file is loaded in full into every session.
When invoked 5,044 The same file — it is already loaded in full.
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.05044 $0.05044
Opus 5.5 $0.02018 $0.02018
Sonnet 5.5 $0.01009 $0.01009
Haiku 4.5 $0.00504 $0.00504

Measured 8d ago against content hash 0efa1f68de45, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

octo-cli CLAUDE.md 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 8d 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.

CLAUDE.md · 222 lines

How it starts

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

CLAUDE.md — octo-cli project instructions

What is octo-cli

octo-cli is the command-line interface for the Octo ecosystem, built for AI Agent Bots to call via exec from agent runtimes (OpenClaw, Claude Code, etc.). Output is a JSON envelope; agent-runtime commands take no interactive I/O. The sole exception is octo-cli auth login, an operator-only setup step that reads the token from a hidden terminal prompt (or stdin).

Architecture

  • Go single binary, cobra CLI framework.
  • Metadata-driven: the entire service command tree is auto-registered at startup from OpenAPI 3.x specs embedded into the binary via internal/registry. To add or change an endpoint, update a spec — not code. Spec extensions cover identity routing (x-octo-allowed-token-kinds, x-octo-mount-by-token-kind), output shaping (x-octo-response-fields, x-octo-lossless-id-fields), and log hygiene (x-octo-secret); each is opt-in, and omitting it keeps the historical behaviour byte-for-byte. x-octo-flag renames the flag for a query/header param or a promoted body field, and on a path param it adds an optional flag alternative to the positional slot (the escape hatch for base64url ids starting with -, which cobra would parse as a flag) — an operation with no such declaration keeps cobra.ExactArgs.
  • Thin client: all business logic lives in backend services (matters, dmworkim). CLI is transport + validation + formatting.
  • Unified gateway: every domain uses OCTO_API_BASE_URL; embedded OpenAPI paths carry module namespaces such as /market/api, /docs-html, and /fleet/api.
  • Factory DI: internal/cmdutil.Factory is the DI container; no package-level globals. Tests inject stubs through ConfigFunc / CredentialFunc / ClientFunc / RegistryFunc. Factory.ErrorEmitted tracks whether an error envelope was already written to stderr, preventing double-emit between RunE and the top-level main error handler.
  • JSON envelope I/O: {ok, identity, data, _pagination, _rate_limit} on stdout for success; {ok:false, error:{type,code,message,hint,detail}} on stderr for failure. Exit codes: auth=3, validation/config=2, rest=1.
  • Pre-flight validation (cmd/service/run.go, cmd/service/enum.go): the metadata-driven path checks the resolved request against the spec before any HTTP — required fields and minItems (VALIDATION_ERROR), spec enum vocabularies (ENUM_NOT_ALLOWED), uint64 id range, and a refusal of empty or . / .. path values (an empty value addresses the collection and a gateway that normalises dot segments retargets the request — and the engine emits DELETE). Loop Public API operations and services or operations that opt into x-octo-strict-request-schema (Marketplace service and selected group-update, Docs attachment, PPT, sheet and sharing operations) additionally enforce composition, closed-object and minimum-property constraints, Unicode string lengths and maximum array sizes; those extended checks remain backend-enforced for other legacy domains. Body checks walk the merged body, so --data is validated too, at every nesting depth and including format: uint64 — --data is not a raw passthrough on this path, and it decodes with UseNumber so an id above 2^53 is never rounded before it is checked. A property present with an explicit null is checked, not skipped: an enum admits it only when JSON null is an explicit member, and a uint64 format admits it only when the schema's OpenAPI 3.1 type union explicitly includes null. This preserves optional search-filter boundaries while refusing parent_id:null: a non-nullable scalar id would decode as folder 0, the documented root, i.e. a valid id addressing a place nobody named. A required field set to null is reported as missing instead, so both paths refuse it; a null on an unconstrained property is still forwarded, since a backend may accept it to clear the field. Enum and constant comparison is by canonical form, not ==, because the same wire value arrives as int, float64 or json.Number depending on how it was supplied; numbers compare by exact decimal text, so an integer vocabulary admits 1 but not 1.0 — the body keeps what the caller wrote, and a non-integer would fail at the backend on a value the local gate had called valid. Hand-written composites reuse the same walker via service.ValidateRequestBody, so a composite that replaces a generated leaf cannot enforce a weaker contract than the leaf did.
  • Schema-level x-octo-enum-hint appends actionable guidance to ENUM_NOT_ALLOWED. It survives allOf merging: an outer hint wins, otherwise the first nonempty inherited hint wins. Other enum validation semantics are unchanged.

Read the full file on GitHub · 222 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. 8d ago Changed · +2 lines · +27 tokens per session 0efa1f68de45
  2. 10d ago Changed · +14 lines · +184 tokens per session f09a6395cf20
  3. 14d ago Changed · +128 tokens per session 95cec3a9be69
  4. 17d ago Changed · +1 lines · +101 tokens per session 94f223028ec5
  5. 27d ago Changed · +1 tokens per session ada3d5ecc7de
  6. 1mo ago Changed · +5 tokens per session 23b3b8efd677
  7. 1mo ago Changed · +2 tokens per session 96103ae8d31e
  8. 1mo ago Changed · +1 lines · +55 tokens per session e07de3718abb
  9. 1mo ago Changed · +2 lines · +12 tokens per session 74153b8906c5
  10. 1mo ago First seen · 202 lines · 4,529 tokens per session scan A 5c681c48b42d

Subscribe to this mod's changes

octo-cli CLAUDE.md is an instructions file published in the GitHub repository Mininglamp-OSS/octo-cli (922 stars, last pushed yesterday), licensed Apache-2.0. It adds 5,044 tokens to every session, about $0.0202 per session on Opus 5.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-30.

Related

octo-cli CLAUDE.md compared with instructions from other repositories

octo-cli CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
octo-cli CLAUDE.mdMininglamp-OSS/octo-cliInstructions file922yesterdayApache-2.0A5,044Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode