Installs just this skill. Get the whole plugin for auto-invocation.
โก How it fires
How this skill gets triggered: by you, by Claude, or both.
Fires itselfClaude auto-loads it when your prompt matches the work.
You can call itInvoke it directly when you want it.
Slash command/skill-context-detection
๐๏ธ Context preview
The summary Claude sees to decide when to auto-load this skill.
Auto-detect work context (Dev vs Knowledge) โ use to tailor workflows based on current task type
๐ Stats
Stars3,869
Forks362
LanguageShell
LicenseMIT
๐ฆ Ships with octo
</> SKILL.md
skill-context-detection.SKILL.md
---name: skill-context-detection
effort: low
description: "Auto-detect work context (Dev vs Knowledge) โ use to tailor workflows based on current task type"
---# 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.
```bash
# 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
```
| Reviewing a plan or strategy | Consider `/octo:plan` for strategic planning |
| Debugging errors or failures | Consider `/octo:debug` for systematic investigation |
| Writing or running tests | Consider `/octo:tdd` for test-driven development |
| Code review before merge | Use Claude-native `/review` for ordinary review; suggest `/octo:review` for multi-AI escalation |
| Ready to deploy or ship | Consider `/octo:deliver` for quality-gated delivery |
| Researching a topic | Consider `/octo:research` for multi-source synthesis |
| Working on security | Use Claude-native `/security-review` for ordinary security review; suggest `/octo:security` for escalated OWASP or adversarial audit |
### Suggestion Format
Suggestions should be non-intrusive, appended as a brief note:
```
๐ก Tip: You appear to be debugging โ `/octo:debug` provides systematic investigation with multi-AI support.
```
### Persistent Opt-Out
- If user says "stop suggesting" or "no more tips": set `OCTO_PROACTIVE_SUGGESTIONS=off` in `.claude-octopus/preferences.json`
- If user says "be proactive" or "turn on tips": set `OCTO_PROACTIVE_SUGGESTIONS=on`
- Check preference at suggestion time โ never suggest when opted out
- Respect current mode: dev mode suggestions differ from knowledge work suggestions
### Re-Enable Suggestions
Users who previously opted out can re-enable suggestions at any time:
- Say "be proactive", "turn on tips", or "enable suggestions"
- Manually edit `~/.claude-octopus/preferences.json` and set `OCTO_PROACTIVE_SUGGESTIONS` to `on`
- Default state (no preference set) is suggestions enabled