Feature request: Relevance-based skill filtering to prevent context budget overflow
Status Open
Maintainer reply None cached
Workaround ✓ Mentioned in description ↑
Activity 0 comments · opened Aug 24, 2026
Problem
When many skills are registered (plugins, MCP servers, user skills, built-in skills), the total token count of all skill descriptions exceeds the context budget allocated for skills. The system currently uses an all-or-nothing fallback: when the budget is exceeded, all skill descriptions are removed from the model-visible context, and excess skills are silently dropped.
This means the model cannot see what any skill does, defeating the purpose of having skills.
Example warning:
⚠ Exceeded skills context budget. All skill descriptions were removed and 1274 additional skills were not included in the model-visible skills list.
Proposed Solution
Implement relevance-based skill filtering: instead of loading all skill descriptions into the context window, only load the Top-K skills most relevant to the current conversation.
Suggested approach
- Embedding-based retrieval: Generate embeddings for each skill description at registration time. At session start, embed the user's first message and retrieve the Top-K most relevant skills.
- Keyword/tag matching: Allow skills to declare tags/keywords. Match against the conversation context.
- Priority tiers: Assign skills to tiers (always-load, on-demand, low-priority). Only Tier-1 skills get full descriptions; others get name-only.
- Dynamic loading: Load additional skill descriptions on-demand when the model attempts to invoke a skill by name.
Benefits
- Dramatically reduces skill-related token consumption
- Scales to hundreds/thousands of skills without degradation
- Better user experience — the model sees relevant skills with full descriptions
- Backward compatible — skills still work, just loaded intelligently
Alternatives Considered
- Increasing the budget: This is a temporary fix that doesn't scale as more skills are added
- Manually disabling plugins: This requires users to constantly manage their skill set, which is poor UX