Skip to content

feat(skills): configurable compact mode for skill index in system prompt - #33934

Closed
x7peeps wants to merge 1 commit into
NousResearch:mainfrom
x7peeps:feat/skill-compact-mode-clean
Closed

feat(skills): configurable compact mode for skill index in system prompt#33934
x7peeps wants to merge 1 commit into
NousResearch:mainfrom
x7peeps:feat/skill-compact-mode-clean

Conversation

@x7peeps

@x7peeps x7peeps commented May 28, 2026

Copy link
Copy Markdown
Contributor

Adds configurable compact mode for skill index rendering in system prompt.

  • New _get_compact_mode() function
  • Clean skill index rendering without deprecated regex pollution
  • +40/-2 lines in agent/prompt_builder.py

Add compact_mode config option (skills.compact_mode) to control
how the <available_skills> tree is rendered in the system prompt.

Three modes:
- 'full' (default): name + description for every skill
- 'compact': name only, per-category cap of 25 skills
- 'auto': auto-activate compact mode when total skills > 500

This addresses the token bloat problem where users with 1000+ skills
consume ~100K tokens per session just for the skill index. Compact
mode reduces this by ~60% while preserving discoverability.
@alt-glitch alt-glitch added type/feature New feature or request comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint tool/skills Skills system (list, view, manage) P3 Low — cosmetic, nice to have labels May 28, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Competing PR: #24448 implements a similar opt-in compact index_mode for the skills system prompt. Also related: #31847 (TOON-lite compact encoding) and #32335 (prompt compaction toggles).

@x7peeps

x7peeps commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by upstream #44342 (compact_categories via coding posture). Closing — the upstream implementation covers the same use case with a better design (per-category demotion rather than global mode toggle).

@x7peeps

x7peeps commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

Closing — superseded by upstream #44342 which implements compact_categories via coding posture (better design than our global compact_mode toggle).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P3 Low — cosmetic, nice to have tool/skills Skills system (list, view, manage) type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants