Tooluck logoTooluck
SKILL.md

skill-context-detection

Agent skill fromnyldn/claude-octopus

Auto-detect work context (Dev vs Knowledge) — use to tailor workflows based on current task type

How to install skill-context-detection

install skill-context-detection
# install the claude-octopus pack with the skills CLI
npx skills add nyldn/claude-octopus

# or add only this skill to Claude Code: copy the folder

skills/skill-context-detection/

# into

~/.claude/skills/skill-context-detection/ (all projects)

.claude/skills/skill-context-detection/ (one project)

skills/skill-context-detection/SKILL.md

MITFull file
1> **Host: Codex CLI** — This skill was designed for Claude Code and adapted for Codex.
2> Cross-reference commands use installed skill names in Codex rather than `/octo:*` slash commands.
3> Use the active Codex shell and subagent tools. Do not claim a provider, model, or host subagent is available until the current session exposes it.
4> For host tool equivalents, see `skills/blocks/codex-host-adapter.md`.
5
6
7# Context Detection - Internal Skill
8
9## Purpose
10
11This 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.
12
13## Detection Algorithm
14
15When a workflow skill activates, detect context using these signals:
16
17### Step 1: Check for Explicit Override
18
19If user has explicitly set mode via `/octo:km on` or `/octo:km off`, respect that setting.
20
21```bash
22# Check if knowledge mode is explicitly set
23if [[ -f ~/.claude-octopus/config/knowledge-mode ]]; then
24 EXPLICIT_MODE=$(cat ~/.claude-octopus/config/knowledge-mode)
25 if [[ "$EXPLICIT_MODE" == "on" ]]; then
26 echo "knowledge"
27 exit 0
28 elif [[ "$EXPLICIT_MODE" == "off" ]]; then
29 echo "dev"
30 exit 0
31 fi
32fi
33# If "auto" or not set, proceed with auto-detection
34```
35
36### Step 2: Analyze Prompt Content (Strongest Signal)
37
38**Knowledge Context Indicators** (check prompt for these terms):
39…

Excerpt shown under the repository's MIT license.

More skills in claude-octopus

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates