octo-km

octo-km is a command for Claude Code, Cursor from nyldn/claude-octopus. It costs 14 tokens per session (617 once invoked), scanned A, original, MIT.

A command that switches between Dev Work Mode and Knowledge Work Mode. Knowledge Work Mode is intended for research and learning, while Dev Work Mode is the default coding mode.

In plain words
What is it for?
Use it before research-heavy tasks or when returning to ordinary development work.
Why use it?
It lets the workflow adapt its behavior to whether you are building software or gathering and understanding information.

Command for Claude CodeCursor

Written for Claude Code and Cursor: disable-model-invocation in frontmatter, but also a Cursor plugin manifest.

Part of the octo plugin — 70 skills, 106 commands, 10 agents, 18 hooks shipped together

Good fit Use it before research-heavy tasks or when returning to ordinary development work.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/nyldn/claude-octopus/octo-km
About the project

Claude Octopus is an orchestration project that sends research, design, and coding tasks to Claude Code and other AI model providers so their results can be compared. Developers use it for multi-model work, disagreement detection, reviews, persistent context, and an optional workflow that moves from discovery through delivery. The catalogue entries are its commands, skills, agents, instructions, hooks, plugins, and settings.

nyldn/claude-octopus · 4,061 stars · on GitHub · reddit.com

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.

Clone the repo
git clone --depth 1 https://github.com/nyldn/claude-octopus

Made for: Claude Code, Cursor.

Or install octo, the plugin that ships this one along with the rest of its 70 skills, 106 commands, 10 agents, 18 hooks.

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-km

README.md
[![agentmods](https://agentmods.dev/badge/commands/nyldn/claude-octopus/octo-km/github.svg)](https://agentmods.dev/commands/nyldn/claude-octopus/octo-km)
Your own site
<a href="https://agentmods.dev/commands/nyldn/claude-octopus/octo-km"><img src="https://agentmods.dev/badge/commands/nyldn/claude-octopus/octo-km/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-km

Your own site · 80×15
<a href="https://agentmods.dev/commands/nyldn/claude-octopus/octo-km"><img src="https://agentmods.dev/badge/commands/nyldn/claude-octopus/octo-km.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 617 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.00014 $0.00617
Opus 5 $0.00007 $0.00309
Sonnet 5 $0.00003 $0.00123
Haiku 4.5 $0.00001 $0.00062

Measured 7d ago against content hash 575afd6cf5eb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

octo-km 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 7d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • km — 91% identical, 8 lines differ
.cursor-plugin/commands/octo-km.md · 57 lines

How it starts

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

Knowledge Mode Toggle

Toggle between Dev Work Mode and Knowledge Work Mode.

Implementation Instructions

When this command is executed:

  1. Parse the argument:

    • No argument or "on" → target mode = Knowledge Work (knowledge_mode: true)
    • "off" → target mode = Dev Work (knowledge_mode: false)
  2. Check current mode via .claude/claude-octopus.local.md:

    • Target is Dev Work AND file does NOT exist → user is already in Dev Work Mode (default). Do not create the file. Show confirmation only, then exit.
    • File exists AND current knowledge_mode already equals the target → Do not rewrite the file. Show confirmation only, then exit.
    • Otherwise → proceed to step 3 (real transition needed).
  3. Switch modes (only when a real transition is required):

    • Before writing, state one sentence: "Switching to Knowledge Work — creating .claude/claude-octopus.local.md (knowledge_mode: true)." (or the equivalent for Dev Work).
    • If the file does not exist, create it with minimal frontmatter containing only the fields being set.
    • If the file exists, update only the knowledge_mode field; preserve any other keys.
    • Confirm with the target mode's emoji (🎓 / 🔧) and active personas.

Rule (v9.30+): Never create or rewrite .claude/claude-octopus.local.md when the user is already in the target mode. The v9.29 behavior over-executed — it wrote config for a state the user was already in, without explanation. Skip the Write tool entirely when there's nothing to change. See agents/principles/write-intent.md for the general principle.

Usage

/octo:km         # Switch to Knowledge Work mode (default action)
/octo:km on      # Switch to Knowledge Work mode (explicit)
/octo:km off     # Switch to Dev Work mode (same as /octo:dev)

Two Work Modes

Dev Work Mode 🔧 (default)

  • Best for: Building features, debugging code, implementing APIs
  • Personas: backend-architect, code-reviewer, debugger, test-automator

Read the full file on GitHub · 57 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. 7d ago First seen · 57 lines · 14 tokens per session scan A 575afd6cf5eb

Subscribe to this mod's changes

octo-km is a command published in the GitHub repository nyldn/claude-octopus (4,061 stars, last pushed today), licensed MIT. It adds 14 tokens to every session and 617 once invoked, about $0.0001 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-09-03.