optimize-classifier
Analyze your Model Matchmaker override patterns and tune the local classifier to match your preferences. Use after collecting 50+…
Monitor conversation context and prevent MAX mode by warning at token thresholds and generating handoff summaries. Use when context approaches 100K/150K/180K tokens or when working with high-cost files.
$ npx -y skills add coyvalyss1/model-matchmaker --skill context-monitor --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/context-monitorContext preview
The summary Claude sees to decide when to auto-load this skill.
Monitor conversation context and prevent MAX mode by warning at token thresholds and generating handoff summaries. Use when context approaches 100K/150K/180K tokens or when working with high-cost files.
name: context-monitor description: Monitor conversation context and prevent MAX mode by warning at token thresholds and generating handoff summaries. Use when context approaches 100K/150K/180K tokens or when working with high-cost files.
Cursor's MAX mode (Claude Opus 3.5, 200K token context) is expensive and should be reserved for truly complex tasks. Context can balloon quickly when:
**Once context exceeds 200K tokens, the conversation is forced into a new chat with a handoff summary.** This wastes user time and disrupts flow.
**Monitor context throughout the conversation (not just at start).** Warn at thresholds and proactively recommend starting a new chat with a clean handoff.
**Action**: Note the context size internally. No user warning yet.
**Action**: Warn the user and suggest wrapping up current work or starting a new chat if the task is open-ended.
**Warning format:**
⚠️ Context approaching 150K tokens. Consider starting a new chat after this task to avoid MAX mode. I can generate a handoff summary.
**Action**: Strongly recommend starting a new chat. Offer to generate a handoff summary immediately.
**Warning format:**
🚨 Context at 180K tokens (MAX mode limit: 200K). Recommend starting a new chat now. I can generate a handoff summary with: - Task description - Progress so far - Next steps - @file references
Issue a warning automatically when:
1. **Large file opened** (>3,000 lines):
2. **Multiple large files in context** (>5 files over 1,000 lines each)
3. **Long conversation** (>50 tool calls in current chat)
4. **Transcript search** (reading agent-transcripts/*.txt files)
5. **Plan file creation** (plans are meta-work that inflate context)
Track your project's largest files and add them to your monitoring list. Common examples:
**When opening these files**, immediately note context cost and warn if already over 100K.
**To find your largest files:**
find . -name "*.jsx" -o -name "*.tsx" -o -name "*.js" -o -name "*.ts" | \ xargs wc -l | sort -rn | head -20
When recommending a new chat, generate a concise handoff summary using this template:
## Handoff Summary for New Chat **Task**: [One-line description] **Progress**: - [Bullet point 1] - [Bullet point 2] - [Bullet point 3] **Next Steps**: 1. [Action item 1] 2. [Action item 2] 3. [Action item 3] **Key Files**: - @path/to/file1.jsx — [what was changed/what needs work] - @path/to/file2.js — [what was changed/what needs work] **Context**: [1-2 sentences of critical context that must be preserved]
**Handoff example:**
## Handoff Summary for New Chat **Task**: Fix chat component falling back to short responses when user profile is empty **Progress**: - Identified root cause: validation guard blocking all saves when user data incomplete - Removed guard from useChatManager.jsx (lines 2847-2863) - Added fallback examples to API helper function **Next Steps**: 1. Test save flow with empty profile 2. Verify data structure generation on first save 3. Deploy to production if test passes **Key Files**: - @src/hooks/useChatManager.jsx — Removed validation guard - @server/helpers/apiHelper.js — Added fallback examples **Context**: The short-response fallback was a symptom, not the root cause. Real issue was validation logic preventing data generation.
At the start of each response: 1. **Check conversation length** (tool call count, file read count) 2. **Check if large files are in context** (match against known high-cost files list) 3. **Estimate current token count** (rough heuristic: 50 tool calls = ~100K tokens; one 9K line file = ~70K tokens) 4. **Issue warning if threshold crossed**
After opening a large file:
📊 Context note: DashboardPage.jsx added (~70K tokens). Current context estimate: ~120K tokens.
After 30+ tool calls:
⚠️ Context approaching 150K tokens (30+ tool calls). Consider wrapping up or starting fresh chat.
When the user says:
**Immediately generate a handoff summary** without asking.
**Typical scenario without monitoring:**
**With monitoring:**
Don't warn if:
To verify this skill is working:
1. **Open a large file (>5,000 lines)** → Should see context note 2. **Ma
Stop paying Opus prices to rename files. Stop waiting 20 seconds for responses that should take 3. A local hook for Cursor and Claude Code that classifies every prompt before it's sent and recommends the right model.
Analyze your Model Matchmaker override patterns and tune the local classifier to match your preferences. Use after collecting 50+…
Build a sanitized analytics report from your Model Matchmaker usage for community contribution. Optional; use optimize-classifier…