context-monitor
Monitor conversation context and prevent MAX mode by warning at token thresholds and generating handoff summaries. Use when…
Analyze your Model Matchmaker override patterns and tune the local classifier to match your preferences. Use after collecting 50+ recommendations.
$ npx -y skills add coyvalyss1/model-matchmaker --skill optimize-classifier --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/optimize-classifierContext preview
The summary Claude sees to decide when to auto-load this skill.
Analyze your Model Matchmaker override patterns and tune the local classifier to match your preferences. Use after collecting 50+ recommendations.
name: optimize-classifier description: Analyze your Model Matchmaker override patterns and tune the local classifier to match your preferences. Use after collecting 50+ recommendations.
This skill helps you personalize your Model Matchmaker classifier based on your actual usage patterns. After you've collected 50+ recommendations, this skill analyzes when you disagreed with the advisor and tunes your local classifier to match your preferences.
1. **Reads** your local Model Matchmaker logs (`~/.cursor/hooks/model-matchmaker.ndjson`) 2. **Analyzes** when you overrode the advisor's recommendations 3. **Finds patterns** in the prompts where you disagreed (common words, task types) 4. **Suggests** keyword additions to your `model-advisor.sh` file 5. **Updates** your classifier (with your approval) so future recommendations match your preferences
**Privacy:** Everything happens locally. No data leaves your machine. You review and approve every change.
You are helping the user optimize their Model Matchmaker classifier based on their personal override patterns. Follow these steps:
Read the NDJSON log file at `~/.cursor/hooks/model-matchmaker.ndjson`.
Check if there's enough data:
Filter to `action: "OVERRIDE"` events and group by model direction:
**Group A: User preferred Opus over recommended Haiku/Sonnet**
**Group B: User preferred Sonnet over recommended Opus**
**Group C: User preferred Sonnet over recommended Haiku**
**Group D: User preferred Haiku over recommended Sonnet/Opus**
For each group, find words that appear in 3+ override prompts (minimum frequency threshold).
**Exclude common stop words:**
**Focus on action verbs and technical terms:**
For each keyword group, map to the correct section of `model-advisor.sh`:
**For Group A keywords (user prefers Opus):** → Add to `opus_keywords` list around line 46
**For Group B/C keywords (user prefers Sonnet):** → Add to `sonnet_patterns` list around line 63
**For Group D keywords (user prefers Haiku):** → Add to `haiku_patterns` list around line 53
For each proposed keyword:
Output in this format:
# Classifier Optimization Report
## Your Usage Summary
- Total recommendations: N
- Overrides: M (X.X%)
- Ready for optimization: [Yes/No - need 5+ overrides]
## Patterns Found
### You prefer Opus for:
**Keyword: "debug"**
- Frequency: 5 overrides
- Current behavior: Recommends Sonnet
- Proposed: Add "debug" to opus_keywords
- Impact: 5 past overrides would become correct recommendations
**Keyword: "investigate"**
- Frequency: 3 overrides
- Current behavior: Recommends Sonnet
- Proposed: Add "investigate" to opus_keywords
- Impact: 3 past overrides would become correct recommendations
[Repeat for other keywords]
### You prefer Sonnet over Opus for:
[Same structure]
### You prefer Haiku for:
[Same structure]
## Proposed Changes to ~/.cursor/hooks/model-advisor.sh
**Add to opus_keywords (line 46):**
```python
opus_keywords = [
"architect", "architecture", "evaluate", "tradeoff", "trade-off",
"strategy", "strategic", "compare approaches", "why does", "deep dive",
"redesign", "across the codebase", "investor", "multi-system",
"complex refactor", "analyze", "analysis", "plan mode", "rethink",
"high-stakes", "critical decision",
# NEW - Added based on your override patterns:
"debug", "investigate" # 8 overrides support this
]**Add to sonnet_patterns (line 63):** [Show specific regex additions if any]
Would you like me to apply these changes to your classifier?
1. **Yes** - I'll update ~/.cursor/hooks/model-advisor.sh with these keywords 2. **Some of them** - Tell me which keywords to add 3. **No** - Just show me the analysis, don't change anything
If you approve, I'll: 1. Read your current model-advisor.sh 2. Add the new keywords to the appropriate lists 3. Write the updated file back 4. Confirm the changes
You can test immediately by restarting Cursor or starting a new composer session.
### Step 7: Apply Changes (If User Approves) If user says "yes" or approves specific keywords: 1. Read `~/.cursor/hooks/model-advisor.sh` 2. Locate the appropriate keyword list (opus_keywords, sonnet_patterns, or haiku_patterns) 3. Add the new keywords to the list with a comment explaining they were auto-added 4. Write the file back using the StrReplace tool 5. Confirm: "Updated! Your classifier now recommends [model] for prompts containing [keywords]. Changes take effect in your next Cursor session." ### Important No
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.
Monitor conversation context and prevent MAX mode by warning at token thresholds and generating handoff summaries. Use when…
Build a sanitized analytics report from your Model Matchmaker usage for community contribution. Optional; use optimize-classifier…