skill-context-detection

skill-context-detection is a skill for Claude Code from nyldn/claude-octopus. It costs 25 tokens per session (2,365 once invoked), scanned A, original, MIT.

A workflow that identifies whether a task is mainly software development or knowledge work. It uses the request and optional user settings to choose the working context.

In plain words
What is it for?
It is for classifying requests involving coding, research, business strategy, or related topics so other workflows can adapt their behavior.
Why use it?
It helps tailor later workflows to the kind of work being requested instead of relying on a manual mode switch. Explicit settings take priority over automatic detection.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: reads .claude/ paths; mentions Codex.

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

Good fit It is for classifying requests involving coding, research, business strategy, or related topics so other workflows can adapt their behavior.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nyldn/claude-octopus/skill-context-detection
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,054 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.

Any agent
npx skills add nyldn/claude-octopus --skill skill-context-detection
Clone the repo
git clone --depth 1 https://github.com/nyldn/claude-octopus

Made for: Claude Code.

Or install octo, the plugin that ships this one along with the rest of its 69 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 skill-context-detection

README.md
[![agentmods](https://agentmods.dev/badge/skills/nyldn/claude-octopus/skill-context-detection.svg)](https://agentmods.dev/skills/nyldn/claude-octopus/skill-context-detection)
Your own site
<a href="https://agentmods.dev/skills/nyldn/claude-octopus/skill-context-detection"><img src="https://agentmods.dev/badge/skills/nyldn/claude-octopus/skill-context-detection.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,365 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00025 $0.02365
Opus 5 $0.00013 $0.01182
Sonnet 5 $0.00005 $0.00473
Haiku 4.5 $0.00003 $0.00236

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

Security

Grade A, and why

skill-context-detection 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/skills/skill-context-detection/SKILL.md · 276 lines

How it starts

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

Context Detection - Internal Skill

Purpose

This skill provides automatic context detection to determine whether the user is working in a Development context (code-focused) or Knowledge context (research/strategy-focused). This replaces the manual /octo:km toggle with intelligent auto-detection.

Detection Algorithm

When a workflow skill activates, detect context using these signals:

Step 1: Check for Explicit Override

If user has explicitly set mode via /octo:km on or /octo:km off, respect that setting.

# Check if knowledge mode is explicitly set
if [[ -f ~/.claude-octopus/config/knowledge-mode ]]; then
  EXPLICIT_MODE=$(cat ~/.claude-octopus/config/knowledge-mode)
  if [[ "$EXPLICIT_MODE" == "on" ]]; then
    echo "knowledge"
    exit 0
  elif [[ "$EXPLICIT_MODE" == "off" ]]; then
    echo "dev"
    exit 0
  fi
fi
# If "auto" or not set, proceed with auto-detection

Step 2: Analyze Prompt Content (Strongest Signal)

Knowledge Context Indicators (check prompt for these terms):

  • Business/strategy: "market", "ROI", "stakeholders", "strategy", "business case", "competitive"
  • Research: "literature", "synthesis", "academic", "papers", "research question"
  • UX: "personas", "user research", "journey map", "pain points", "interviews"
  • Deliverables: "presentation", "report", "PRD", "proposal", "executive summary"

Dev Context Indicators (check prompt for these terms):

  • Technical: "API", "endpoint", "database", "function", "class", "module"
  • Actions: "implement", "debug", "refactor", "test", "deploy", "build"
  • Artifacts: "code", "tests", "migration", "schema", "controller"

Scoring:

  • Count knowledge indicators in prompt
  • Count dev indicators in prompt
  • Higher count wins
  • If tied, check project context (Step 3)

Step 3: Analyze Project Context (Secondary Signal)

Dev Project Indicators:

  • Has package.json, Cargo.toml, go.mod, pyproject.toml, pom.xml
  • Has src/, lib/, app/ directories with code files
  • Recent files are .ts, .js, .py, .go, .rs, .java

Read the full file on GitHub · 276 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 First seen · 276 lines · 25 tokens per session scan A 4aca867a6a46

Subscribe to this mod's changes

skill-context-detection is a skill published in the GitHub repository nyldn/claude-octopus (4,054 stars, last pushed today), licensed MIT. It adds 25 tokens to every session and 2,365 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-08-30.

Related

Other skills, from other repositories

ai-context

Generates, updates, and audits AGENTS-first AI IDE context files. Builds canonical AGENTS.md plus thin bridges for Claude Code, Cursor (modern .cursor/rules/.mdc), Copilot, Cline (.clinerules/ directory), Windsurf, Gemini CLI, Codex CLI, and OpenCode. Use for creating, regenerating, fixing, or promoting context files…

littlebearapps/contextdocs · 86 tokens

architecture

This skill should be used when managing Architecture Decision Records or C4 diagrams.

jikig-ai/soleur · 17 tokens

invoice

This skill should be used when the founder wants to get paid through their own Stripe account: list who owes them, create and send an invoice behind a human-approval preview, or chase an overdue one. Test-mode only in v1.

jikig-ai/soleur · 50 tokens

agent-native-audit

This skill should be used when conducting a scored agent-native architecture review. It launches 8 parallel sub-agents to audit action parity, context injection, CRUD completeness, capability discovery, and prompt-native features.

jikig-ai/soleur · 46 tokens

gemini-imagegen

This skill should be used when generating or editing images via the Gemini API: text-to-image, edits, multi-turn refinement, style transfer, mockups.

jikig-ai/soleur · 36 tokens

legal-audit

This skill should be used when auditing existing legal documents for compliance gaps, outdated clauses, missing disclosures, and cross-document consistency. It scans a project for legal documents and displays findings inline.

jikig-ai/soleur · 41 tokens