mode-awareness
Mode Awareness Framework
When This Activates
This skill activates when:
- Mode detection shows in
<pattern-context>with low confidence - User explicitly asks to "switch to X mode"
- Approach guidance is needed for a task type
Detected Modes
The system auto-detects these modes from your messages:
1. Debugging Mode
Signals: fix, broken, error, bug, issue, wrong, not working, fails, crash, exception
Approach:
- Check recent changes first
- Review error logs
- Identify root cause BEFORE fixing
- Don't change code until you understand the issue
Avoid:
- Making changes without understanding
- Multiple fixes at once (hard to isolate)
Tools: Error logs, git diff, debugger
2. Performance Mode
Signals: slow, fast, optimize, performance, speed, memory, cpu, latency, efficient
Approach:
- Measure before changing
- Profile to identify bottleneck
- Document baseline metrics
- Change one thing at a time
Avoid:
- Premature optimization
- Changing without measuring first
- Optimizing non-bottlenecks
Tools: Profiler, time command, resource monitors
3. Feature Mode
Signals: add, create, implement, build, new, feature, want, need to
Approach:
- Understand requirements fully
- Check existing patterns in codebase
- Plan before coding
- Consider edge cases
Avoid:
- Over-engineering
- Skipping tests
- Not checking for similar features
Tools: memory_query for similar features, project patterns
4. Refactor Mode
Signals: refactor, clean, reorganize, restructure, improve, simplify
Approach:
- Ensure tests exist first
- Make small incremental changes
- Verify behavior unchanged after each step
- Commit frequently
Avoid:
- Changing behavior during refactor
- Large changes without tests
- Refactoring untested code
Tools: Test suite, git diff, code review
5. Exploration Mode
Signals: how, what, where, why, explain, understand, find, show, look
Approach:
- Use memory query first (instant)
- Check existing documentation
- Explore systematically
- Build mental model before acting
Avoid:
- Modifying code while exploring
- Making assumptions
Tools: memory_query, memory_search, Grep, Read
6. Infrastructure Mode
Signals: docker, deploy, server, database, config, setup, install, environment
Approach:
- Check current state first
- Document all changes
- Test in isolation before applying
- Have rollback plan
Avoid:
- Making production changes without testing
- Undocumented configuration
- Assuming environment matches local
Tools: Docker, config files, environment variables
Mode Confidence
When mode is detected with low confidence (<0.5):
<pattern-context mode="exploration" confidence="0.33">
This means:
- Multiple modes match equally
- Signals are ambiguous
- May need clarification
Response: Ask which approach the user wants: "I could approach this as exploration (understanding the code) or as a feature (implementing something). Which would you prefer?"
Mode Switching
Users can explicitly switch:
- "Let's switch to debugging mode"
- "I want to explore first"
- "Time to refactor this"
When switching, acknowledge and adjust: "Switching to debugging mode. Let me check what changed recently and look at the error logs."
Multi-Mode Tasks
Some tasks span modes:
- Explore → understand the issue
- Debug → find root cause
- Feature → implement fix
- Refactor → clean up after
It's okay to move through modes naturally. The key is being intentional about which mode you're in.
Mode-Specific Memory Queries
Each mode benefits from different queries:
| Mode | Useful Queries |
|---|---|
| Debugging | memory_sessions category=bugfix query="topic" |
| Performance | memory_sessions category=pattern query="optimization" |
| Feature | memory_query "similar feature implementation" |
| Refactor | memory_similar file="file-being-refactored" |
| Exploration | memory_query "how does X work" |
| Infrastructure | memory_sessions category=gotcha query="docker" |
More from jamelna-apps/claude-dash
cost-tracking
When user mentions "spending", "usage", "tokens", "API cost", "budget", "expensive", or wants to understand Claude API costs. Provides cost awareness and optimization guidance.
11page-cro
When the user mentions "conversion", "CRO", "landing page", "not converting", "bounce rate", "optimize page", or asks about improving page performance.
7session-handoff
When user says "continue", "pick up where we left off", "last time", "previous session", "what were we doing", or wants explicit session continuity. Provides structured context handoff between sessions.
4error-diagnosis
When user encounters "error", "exception", "failed", "stack trace", "crashed", or needs error categorization. Provides structured root cause analysis and prevention strategies.
4code-review
When the user mentions "review", "PR", "pull request", "code review", "check my code", "feedback on", or asks for code quality assessment.
3smart-routing
When deciding which Claude model (Opus/Sonnet/Haiku) to use, or when "route", "which model", "complex task", "multi-file", "architectural", or "deep debugging" is mentioned. Guides quality-first model selection.
3