octo-cli CLAUDE.md

octo-cli CLAUDE.md is an instructions file for coding agents from Mininglamp-OSS/octo-cli. It costs 4,507 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

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 instructions/mininglamp-oss/octo-cli/claude-md
Clone the repo
git clone --depth 1 https://github.com/Mininglamp-OSS/octo-cli

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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 4,507 This file is loaded in full into every session.
When invoked 4,507 The same file — it is already loaded in full.
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.04507 $0.04507
Opus 5 $0.02253 $0.02253
Sonnet 5 $0.00901 $0.00901
Haiku 4.5 $0.00451 $0.00451

Measured today against content hash 536b67129b7a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 today.

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 · 201 lines

How it starts

The opening of the file, as written. The whole thing — 201 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 that opt into x-octo-strict-request-schema (currently Marketplace) 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: it is refused wherever the schema constrains the value (an enum or a uint64 format), because null matches no vocabulary member and decodes into a scalar field as the zero value — for a parent_id that is 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.

Read the full file on GitHub · 201 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. today Changed · +11 lines · +105 tokens per session 536b67129b7a
  2. 5d ago First seen · 190 lines · 4,402 tokens per session scan A 9ef15ce92bec

Subscribe to this mod's changes

octo-cli CLAUDE.md is an instructions file published in the GitHub repository Mininglamp-OSS/octo-cli (673 stars, last pushed today), licensed Apache-2.0. It adds 4,507 tokens to every session, about $0.0225 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-30.

Related

Other instructions, from other repositories